Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 2.8 KB

README.md

File metadata and controls

79 lines (59 loc) · 2.8 KB

Crewstand Frontend

This is a Next.js-based application for controlling and monitoring industrial actuators, including solenoid valves, proportional valves, and pumps. The application utilizes Ant Design for its user interface and API client generated by OpenAPI-TS.

Features

  • Real-time monitoring and control of actuators
  • Support for multiple types of actuators (solenoid valves, proportional valves, and pumps)
  • User-friendly interface with interactive sliders and switches
  • API client generated using OpenAPI-TS for seamless integration with the backend API

Getting Started

Installation

The project is configured to use pnpm as the package manager. If you don't have pnpm installed, you can install it using npm:

corepack enable pnpm

To set up the project, run the following command:

pnpm install

Development

To start the development server, run:

pnpm dev

This will start the Next.js development server, and you can access the application at http://localhost:3000.

Building and Deployment

To build the application, run:

pnpm build

This will create a production-ready build of the application.

Configuration

The application uses the following configuration files:

  • next.config.js: Next.js configuration file
  • openapi-ts.config.ts: OpenAPI-TS configuration file
  • package.json: npm package file

Environment Variables

The application uses the following environment variables:

Variable Description
BACKEND_URI The URI of the backend API

Details

  • BACKEND_URI: This variable specifies the URI of the backend API endpoint that the server-side code will interact with. It is generally safe to use localhost or 127.0.0.1 if your backend is running on the same server where the Next.js application is deployed.

API Client

The API client is generated using OpenAPI-TS and is located in the app/api directory. To generate the API client, run the following command:

pnpm generate-client

Docker Support

The application includes a Dockerfile that allows you to containerize the application for easy deployment.