k-m-exam
v1.0.0
Published
A full-stack web application for managing car repair services, built for SmartPark in Rubavu District, Rwanda.
Readme
Car Repair Payment Management System (CRPMS)
A full-stack web application for managing car repair services, built for SmartPark in Rubavu District, Rwanda.
Features
- Car Management: Register and manage vehicle information
- Service Catalog: Define repair services with pricing
- Service Records: Track services performed on each car
- Payment Processing: Record payments for completed services
- Reporting: Generate daily reports and invoices
- Authentication: Secure login with encrypted passwords
Tech Stack
Frontend:
- React.js 18
- React Router v6
- Tailwind CSS
- Axios
Backend:
- Node.js
- Express.js
- MySQL
- bcrypt (password hashing)
- express-session (authentication)
Installation
Prerequisites
- Node.js (v14 or higher)
- MySQL Server (v8.0 or higher)
Database Setup
Create Database:
mysql -u root -p < database/crpms_schema.sqlUpdate credentials in
backend-project/.env:DB_HOST=localhost DB_USER=root DB_PASSWORD=your_mysql_password DB_NAME=CRPMSInitialize admin user:
cd backend-project node scripts/init-admin.jsDefault login:
admin/admin123
Backend Setup
cd backend-project
npm install
npm startServer runs on: http://localhost:5000
Frontend Setup
cd frontend-project
npm install
npm startApp runs on: http://localhost:3000
Usage
- Login with admin credentials
- Add Cars - Register vehicles that come for repair
- Add Services - Define available repair services
- Create Service Records - Link cars to services
- Record Payments - Add payment for completed services
- Generate Reports - View daily summaries and print invoices
Default Services
| Service | Price (Rwf) | |---------|-------------| | Engine repair | 150,000 | | Transmission repair | 80,000 | | Oil Change | 60,000 | | Chain replacement | 40,000 | | Disc replacement | 400,000 | | Wheel alignment | 5,000 |
Project Structure
k-m exam/
├── backend-project/
│ ├── server.js # Express server (all routes inline)
│ ├── db.js # MySQL connection pool
│ ├── package.json
│ └── .env
├── frontend-project/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Login.js
│ │ │ ├── Navbar.js
│ │ │ ├── CarForm.js
│ │ │ ├── CarList.js
│ │ │ ├── ServiceForm.js
│ │ │ ├── ServiceList.js
│ │ │ ├── ServiceRecordForm.js
│ │ │ ├── PaymentForm.js
│ │ │ ├── Reports.js
│ │ │ └── InvoiceModal.js
│ │ ├── services/
│ │ │ └── api.js
│ │ ├── App.js
│ │ ├── index.js
│ │ └── index.css
│ ├── package.json
│ └── tailwind.config.js
└── database/
└── crpms_schema.sqlEntity Relationships
- Car: One car can have many service records
- Services: One service can be used in many service records
- ServiceRecord: Links Car and Services; has one Payment
- Payment: Associated with one ServiceRecord
- User: For authentication
Security Features
- Password hashing with bcrypt
- Session-based authentication
- Protected API routes
- CORS configured for frontend only
Responsive Design
The application uses Tailwind CSS for a fully responsive layout that works on desktop, tablet, and mobile devices.
Notes
- All CRUD operations use proper foreign key relationships
- Daily reports show all services and payments for selected date
- Invoices can be generated and printed for any service record
- Error handling implemented throughout
SmartPark Car Repair Payment Management System Developed for National Practical Exam 2025
