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)
Install dependencies
Run the standard npm install command:Key production dependencies installed:
| Package | Version | Purpose |
|---|---|---|
react | ^19.2.0 | UI framework |
@mui/material | ^7.3.7 | Component library |
@tanstack/react-query | ^5.90.21 | Server state management |
axios | ^1.13.5 | HTTP client |
recharts | ^3.7.0 | Charts and data visualization |
react-router-dom | ^7.13.0 | Client-side routing |
dayjs | ^1.11.19 | Date formatting |
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.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.Build for production
tsc -b) followed by the Vite production build. Output is written to red-dashboard/dist/.Available npm scripts
| Script | Command | Description |
|---|---|---|
dev | vite | Start the Vite development server with HMR |
build | tsc -b && vite build | Type-check and compile a production bundle |
lint | eslint . | Run ESLint across the entire project |
preview | vite preview | Serve the production build locally for testing |