A full-stack car wash management application with React frontend and Node.js backend, using Firebase Firestore for data storage.
- Dashboard: Real-time analytics and business metrics
- Service Management: Add, edit, and track car wash services
- Records Management: View and search service records
- Payment Tracking: Support for Cash and M-Pesa payments
- Staff Performance: Track attendant performance and revenue
- Real-time Data: All data stored in Firebase Firestore
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Shadcn/ui components
- Lucide React icons
- Node.js with Express
- Firebase Admin SDK
- Firestore for database
- CORS enabled for frontend communication
- Node.js 24 and npm. Use nvm and run
nvm usein the project root (reads.nvmrc). - Firebase project with Firestore enabled
- Firebase service account key
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Set up environment variables:
- Copy your Firebase service account key to
backend/configs/firebase-service.json - Create a
.envfile with:DATABASE_URL=your_firebase_database_url PORT=3001
- Copy your Firebase service account key to
-
Start the backend server:
npm start
The backend will be available at http://localhost:3001
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.envfile with:VITE_API_URL=http://localhost:3001/api
- Create a
-
Start the development server:
npm run dev
The frontend will be available at http://localhost:5173
POST /api/records- Add a new car wash recordGET /api/records- Get all records (with optional filters)GET /api/records/:id- Get a specific recordPUT /api/records/:id- Update a recordDELETE /api/records/:id- Delete a recordGET /api/records/search?q=query- Search recordsGET /api/records/dashboard- Get dashboard statistics
POST /api/auth/login- Login (demo implementation)POST /api/auth/logout- LogoutGET /api/auth/verify- Verify session
GET /api/settings- Get system settingsPUT /api/settings- Update system settings
{
id: string; // Auto-generated service order ID
registrationNumber: string; // Vehicle registration
carModel: string; // Vehicle model
services: string; // Services provided
amountPaid: number; // Amount charged
paymentMethod: 'Cash' | 'Mpesa';
attendant: string; // Staff member name
date: string; // Service date
time: string; // Service time
status: 'Pending' | 'In Progress' | 'Completed';
mpesaCode?: string; // M-Pesa transaction code
createdAt: Timestamp; // Firestore timestamp
updatedAt: Timestamp; // Firestore timestamp
}records- Car wash service recordssessions- User sessions (demo auth)settings- System configuration
- The authentication system is simplified for demo purposes
- All data is stored in Firebase Firestore
- The frontend automatically connects to the backend API
- Error handling includes fallback to sample data if API is unavailable
- Service order IDs are auto-generated in format:
SO-YYYY-XXX
-
Build the frontend:
cd frontend npm run build -
The backend serves the built frontend files
-
Deploy the entire backend directory to your hosting platform
-
Update environment variables for production URLs
This project is for demonstration purposes.