# Frontend Deployment Notes ## Node.js Version Compatibility The current setup uses Vite 7.x and React Router 7.x which require Node.js >= 20.0.0. The current environment is running Node.js 18.19.1. ### Options to resolve: 1. **Upgrade Node.js** (Recommended) ```bash # Update to Node.js 20 or later nvm install 20 nvm use 20 ``` 2. **Downgrade dependencies** (Alternative) ```bash npm install vite@^5.0.0 react-router-dom@^6.0.0 ``` ## Production Build The build process works correctly despite version warnings: - TypeScript compilation: ✅ No errors - Bundle generation: ✅ Optimized chunks created - CSS processing: ✅ Tailwind compiled successfully ## Development Server Due to Node.js version compatibility, the dev server may not start. This is resolved by upgrading Node.js or using the production build for testing. ## Deployment Steps 1. Ensure Node.js >= 20.0.0 2. Install dependencies: `npm install` 3. Build: `npm run build` 4. Serve dist/ folder with any static file server ## Integration with Backend The frontend is configured to connect to: - API: `http://localhost:3000` - WebSocket: `http://localhost:3000` Update `.env.development` or `.env.production` as needed for different environments. ## Performance Optimizations - Code splitting by vendor, router, and UI libraries - Source maps for debugging - Gzip compression ready - Optimized dependency pre-bundling ## Security Considerations - JWT tokens stored in localStorage (consider httpOnly cookies for production) - CORS configured for local development - Input validation on all forms - Protected routes with authentication guards