This guide provides instructions for building, running, and testing the OctoCAT Supply Chain Management application, which consists of an API component and a React Frontend.
- Node.js (version 18 or higher)
- npm (latest version recommended)
- Docker/Podman (optional, for containerization)
- Python 3.12 (or later)
- Java 23 (or later)
- Maven
- Clone the repository
- Install dependencies:
npm install
You can build the entire application or its individual components using the following npm commands:
# Build both API and Frontend components
npm run build
# Build only the API component
npm run build --workspace=api
# Build only the Frontend component
npm run build --workspace=frontendVS Code tasks have been configured to streamline the build process:
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) to open the Command Palette - Type
Tasks: Run Taskand select it - Choose from the following tasks:
Build All: Builds both API and Frontend componentsBuild API: Builds only the API componentBuild Frontend: Builds only the Frontend component
Alternatively, you can press Ctrl+Shift+B (or Cmd+Shift+B on macOS) to run the default build task (Build All).
# Start both API and Frontend in development mode with hot reloading
npm run dev
# Start only the API in development mode
npm run dev:api
# Start only the Frontend in development mode
npm run dev:frontend
# Start the application in production mode (runs start:install in the API workspace)
npm run start- Open the Debug panel (
Ctrl+Shift+DorCmd+Shift+Don macOS) - Select
Start API & Frontendfrom the dropdown menu - Click the green play button or press F5
This will start both the API and Frontend in development mode with the integrated terminal, allowing you to see the console output.
# Run all tests across all workspaces
npm run test
# Run tests for a specific workspace
npm run test --workspace=api# Run linting checks on the Frontend code
npm run lintThe API runs on port 3000 by default, and the Frontend runs on port 5137. When running in a Codespace environment, ensure that the API port visibility is set to public to avoid CORS errors when the Frontend tries to communicate with the API.
The project includes Dockerfiles for both API and Frontend components and a docker-compose.yml file for easy containerized deployment:
# Build and start using Docker Compose
docker-compose up --build