Dashboard Frontend¶
Next.js frontend for the CloudSherpa dashboard.
Runtime¶
- Node.js 20
- Next.js 16
- React 19
- Default local port:
3000 - Docker Compose host port:
3000
Local Setup¶
cd apps/dashboard-frontend
npm install
Environment files are initialized repo-wide by scripts/env-init.sh. Once that script has been run, this service should already have the .env file it needs for local development.
Development Server¶
npm run dev
The Next.js dev server starts on http://localhost:3000 unless a different port is provided.
Build and Production Run¶
npm run build
npm start
The production start script serves the built Next.js app on port 3000.
Lint¶
npm run lint
Docker¶
From the repository root:
docker compose -f infra/docker-compose.yml up --build dashboard-frontend
Dev Dependencies¶
This app uses development-only packages for:
- TypeScript types:
@types/node,@types/react,@types/react-dom - Linting:
eslint,eslint-config-next - Styling pipeline:
tailwindcss,@tailwindcss/postcss - TypeScript:
typescript
Install all dependencies with npm install for local development. The Docker production image installs runtime dependencies only with npm ci --omit=dev.
Environment Configuration¶
Local environment values should live in .env. Keep committed defaults and documentation in .env.example. Use scripts/env-init.sh to copy .env.example files into .env files across the repo.
Development¶
- If
scripts/env-init.shhas already been run, the local.envfile should be in place. - Client-exposed values must use the
NEXT_PUBLIC_prefix. - Point API URLs at the local dashboard backend, usually
http://localhost:3001.
Production¶
- Build with production API URLs.
- Run with
NODE_ENV=production.