Skip to main content

Prerequisites

Before you begin, make sure the following are available:
  • Node.js 18+nodejs.org
  • npm — bundled with Node.js
  • ICP backend API — the REST API must be reachable (see Configuration)

1

Clone the repository

2

Navigate to the app directory

3

Install dependencies

Run the standard npm install command:
Key production dependencies installed:
4

Configure environment variables

Create a .env file in the red-dashboard/ directory and set the backend API URL. See Configuration for all available variables and their meaning.
5

Start the development server

The development server defaults to http://localhost:5173. Vite also configures a proxy so that requests to /api are forwarded to http://127.0.0.1:8000, which means the backend must be running locally on port 8000 during development.
6

Build for production

This runs TypeScript compilation (tsc -b) followed by the Vite production build. Output is written to red-dashboard/dist/.
7

Preview the production build

Run npm run build && npm run preview to validate the full production bundle locally before deploying. This serves the compiled dist/ folder and closely mirrors what end users will experience in production.

Available npm scripts