A comprehensive auto service management system built with React, TypeScript, Node.js, Express, and PostgreSQL. This MVP provides all essential features for managing customers, vehicles, work orders, inventory, appointments, and billing in an auto service shop.
- Customer Management: Complete customer profiles with contact information and service history
- Vehicle Management: Detailed vehicle records with maintenance history
- Work Order System: Create, track, and manage service jobs with status updates
- Inventory Management: Track parts and supplies with automatic stock alerts
- Appointment Scheduling: Schedule and manage service appointments
- Billing & Invoices: Generate professional invoices for completed work
- Role-Based Access: Separate permissions for Admin/Manager and Mechanic roles
- React 18 with TypeScript
- Tailwind CSS for styling
- Axios for API communication
- Lucide React for icons
- Vite for build tooling
- Node.js with Express
- PostgreSQL database
- JWT authentication
- bcryptjs for password hashing
- Express validation and security middleware
- Mobile-Responsive: Optimized for use on phones and tablets in the workshop
- Modern UI: Clean, professional design with intuitive navigation
- Real-time Updates: Live status updates and notifications
- Dashboard Analytics: Comprehensive overview of shop operations
-
Clone and start the application:
git clone <repository-url> cd auto-service-management docker-compose up -d
-
Access the application:
- Frontend: http://192.168.2.10:3000
- Backend API: http://192.168.2.10:5000
-
Default login credentials:
- Email: admin@autoservice.com
- Password: admin123
- Node.js 18+
- PostgreSQL 12+
- npm or yarn
-
Install dependencies:
cd server npm install
-
Set up environment variables:
cp .env.example .env # Edit .env with your database credentials
-
Set up PostgreSQL database:
# Create database createdb auto_service_db # Run migrations npm run migrate
-
Start the server:
npm run dev
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Edit .env if needed (default API URL is http://localhost:5000/api)
-
Start the development server:
npm run dev
POST /api/auth/login
- User loginPOST /api/auth/register
- User registrationGET /api/auth/me
- Get current user
GET /api/customers
- Get all customersPOST /api/customers
- Create customer (admin only)PUT /api/customers/:id
- Update customer (admin only)DELETE /api/customers/:id
- Delete customer (admin only)
GET /api/vehicles
- Get all vehiclesPOST /api/vehicles
- Create vehicle (admin only)PUT /api/vehicles/:id
- Update vehicle (admin only)DELETE /api/vehicles/:id
- Delete vehicle (admin only)
GET /api/work-orders
- Get work orders (filtered by role)POST /api/work-orders
- Create work order (admin only)PUT /api/work-orders/:id
- Update work orderGET /api/work-orders/:id/parts
- Get work order partsPOST /api/work-orders/:id/parts
- Add part to work order
GET /api/inventory
- Get all inventory itemsPOST /api/inventory
- Create inventory item (admin only)PUT /api/inventory/:id
- Update inventory item (admin only)PATCH /api/inventory/:id/stock
- Update stock quantity
GET /api/appointments
- Get all appointmentsPOST /api/appointments
- Create appointment (admin only)PUT /api/appointments/:id
- Update appointment (admin only)PATCH /api/appointments/:id/status
- Update appointment status
GET /api/dashboard/stats
- Get dashboard statisticsGET /api/dashboard/recent-orders
- Get recent work ordersGET /api/dashboard/today-appointments
- Get today's appointmentsGET /api/dashboard/low-stock
- Get low stock items
The application uses PostgreSQL with the following main tables:
users
- System users (admin/mechanic)customers
- Customer informationvehicles
- Vehicle records linked to customerswork_orders
- Service work ordersinventory_items
- Parts and supplies inventorywork_order_parts
- Parts used in work ordersappointments
- Service appointments
- Full access to all features
- Can manage customers, vehicles, inventory
- Can create and assign work orders
- Can schedule appointments
- Can generate billing and invoices
- Can view assigned work orders
- Can update work order status and add parts
- Can view customer and vehicle information
- Can view inventory (read-only)
- Can view appointments
-
Build and deploy:
docker-compose up -d
-
Environment variables for production:
- Set strong
JWT_SECRET
- Configure proper database credentials
- Set
NODE_ENV=production
- Configure CORS for your domain
- Set strong
-
Build frontend:
npm run build
-
Set up reverse proxy (nginx/Apache) to serve frontend and proxy API requests
-
Use process manager (PM2) for the Node.js backend:
npm install -g pm2 pm2 start server/server.js --name auto-service-api
- JWT-based authentication
- Password hashing with bcrypt
- Role-based access control
- Rate limiting
- CORS protection
- Input validation and sanitization
- SQL injection prevention with parameterized queries
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.