Modern React dashboard for monitoring dealbot performance
This is the frontend web application for Deal Bot, built with React, TypeScript, and Vite.
- Framework: React 19.x
- Language: TypeScript 5.x
- Build Tool: Vite 7.x
- Styling: Tailwind CSS 4.x
- UI Components: Radix UI + shadcn/ui
- Charts: Recharts
- Icons: Lucide React
- Theme: next-themes (dark/light mode)
- Node.js 20+
- pnpm
- Backend API running (see
../backend/README.md)
pnpm installcp .env.example .envEdit .env to point to your backend API:
VITE_API_BASE_URL=http://localhost:8080Important: If you changed DEALBOT_PORT in the backend, update this URL accordingly.
pnpm devThe dashboard will be available at: http://localhost:5173
pnpm buildOutput will be in the dist/ directory.
pnpm preview| Variable | Description | Default |
|---|---|---|
VITE_API_BASE_URL |
Backend API base URL | http://localhost:8080 |
VITE_PLAUSIBLE_DATA_DOMAIN |
Enable Plausible site analytics | Empty (disabled) |
All environment variables must be prefixed with VITE_ to be accessible in the application.
For local development, Vite reads VITE_* variables from apps/web/.env at dev-server startup.
For production containers, runtime overrides are supported via runtime-config.js (generated on
container start). Set VITE_API_BASE_URL and/or VITE_PLAUSIBLE_DATA_DOMAIN as container env vars
to avoid rebuilds.
pnpm dev # Start development server with HMR
pnpm build # Build for production
pnpm preview # Preview production build locallypnpm format # Format code with Biome
pnpm format:check # Check formatting
pnpm lint # Lint and auto-fix
pnpm lint:check # Check linting
pnpm check # Run both format and lint
pnpm check:ci # CI checks (no auto-fix)The frontend communicates with the backend API using the base URL defined in VITE_API_BASE_URL.
All API calls should use the base URL from environment variables:
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;
// Example API call
const response = await fetch(`${API_BASE_URL}/deals`);
const deals = await response.json();Ensure the backend's DEALBOT_ALLOWED_ORIGINS includes your frontend URL:
# In backend/.env
DEALBOT_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173# Verify backend is running
curl http://localhost:8080/api
# Check VITE_API_BASE_URL in .env matches backend port
# Check DEALBOT_ALLOWED_ORIGINS in backend/.env includes frontend URL# Clear node_modules and reinstall
rm -rf node_modules
pnpm install
# Clear Vite cache
rm -rf node_modules/.vite# Vite will automatically try the next available port
# Or specify a different port:
pnpm dev --port 3000See the main README for contribution guidelines.
- React Documentation
- Vite Documentation
- Tailwind CSS Documentation
- shadcn/ui Documentation
- Recharts Documentation
Dual-licensed: MIT, Apache Software License v2 by way of the Permissive License Stack.