SERVER DETAILS FOR DRIVE360 ADMIN APPLICATION =========================================== FRONTEND DETAILS --------------- 1. Framework & Version: - React.js (v19.1.0) - React DOM (v19.1.0) - React Router DOM (v7.5.2) 2. Key Frontend Dependencies: - Chart.js (v4.4.9) for data visualization - React Chart.js 2 (v5.3.0) - ExcelJS (v4.4.0) for Excel file handling - Testing libraries (Jest, React Testing Library) 3. Development Scripts: - start: react-scripts start - build: react-scripts build - test: react-scripts test - server: nodemon admin.js - client: npm start - dev: concurrently "npm run server" "npm run client" BACKEND DETAILS -------------- 1. Server Framework: - Express.js (v5.1.0) - Node.js environment 2. Database: - MySQL (using mysql2 v3.14.0) - Database Name: eframe2 - Default Configuration: { host: 'localhost', user: 'root', password: 'Root', database: 'eframe2' } 3. Server Configuration: - Port: 3001 (default) - Environment variables: PORT=3001 DB_HOST=localhost DB_USER=root DB_PASSWORD=password DB_NAME=eframe2 4. API Routes: - Assessment routes (/api/vehicle-assessment-data) - User management routes (/api/users) - Leaderboard routes (/api/vehicle-leaderboard-admin) - Settings routes (/api/roles, /api/admin-location) 5. Middleware: - CORS enabled - Body Parser for JSON - Static file serving - Error handling DEVELOPMENT SETUP ---------------- 1. Development Tools: - Nodemon for server auto-reload - Concurrently for running both frontend and backend - ESLint for code linting 2. Project Structure: - Frontend: /src directory - Backend: /server directory - Routes: /server/routes - Database scripts: /setup-database.js 3. Build & Deployment: - Production build: npm run build - Development mode: npm run dev - Static files served from /build directory SECURITY FEATURES ---------------- 1. Environment variables for sensitive data 2. CORS protection 3. Database connection pooling 4. Error handling middleware DATABASE SETUP ------------- 1. Database initialization script available (setup-database.js) 2. Roles table creation and management 3. Connection pooling with limits: { waitForConnections: true, connectionLimit: 10, queueLimit: 0 } NOTES ----- This is a full-stack JavaScript application with a React frontend and Express.js backend, using MySQL as the database. The application follows a modular structure with separate routes for different functionalities and includes proper error handling and security measures.