Back to Projects

Overview
Bike Servicing Management API
This project is a backend API for managing bike servicing operations. It is built with Node.js, Express, TypeScript, and Prisma ORM. Details of the project are given below:
Live API - Link
Tech Stack
Node.js, Express.js, TypeScript , Prisma ORM, PostgreSQL
Features
- Customer Management (CRUD operations)
- Bike Management (CRUD operations)
- Service Record Management
- Status tracking for services
- Pending/Overdue services tracking
- Standardized error handling
- Type-safe database operations with Prisma
Setup Instructions
- Clone the repository:
bash git clone https://github.com/syedfaysel/bike-service-management-api.git cd bike-service-management-api - Install dependencies:
bash npm install3. Set up environment variables: Create a.envfile in the root directory with the following:
DATABASE_URL="postgresql://username:password@localhost:5432/database_name" PORT=3000 NODE_ENV=development - Set up the database:
bash npm run prisma:migrate npm run prisma:generate - Start the development server:
bash npm run dev
API Documentation
Customer Endpoints
POST /api/customers- Create a new customerGET /api/customers- Get all customersGET /api/customers/:id- Get a specific customerPUT /api/customers/:id- Update customer detailsDELETE /api/customers/:id- Delete a customer
Bike Endpoints
POST /api/bikes- Add a new bikeGET /api/bikes- Get all bikesGET /api/bikes/:id- Get a specific bike
Service Endpoints
POST /api/services- Create a service recordGET /api/services- Get all service recordsGET /api/services/:id- Get a specific service recordPUT /api/services/:id/complete- Mark a service as completedGET /api/services/status- Get pending or overdue services