This project is a Vehicle Service Management System designed for a workshop environment. It supports three types of users: Admin, Mechanic, and Customer. The system is built using Next.js and NextAuth for authentication, with Prisma as the ORM for managing the PostgreSQL database.
- Sign up / Login
- Register/Request service for a vehicle
- View service status
- Schedule service once a mechanic is assigned by the admin
- View service history 852A ul>
- Login via email and password
- Manage mechanics (create, update, delete mechanic accounts)
- Assign mechanics to customer service requests
- View mechanics' status
- Dashboard with workshop statistics (number of mechanics, completed services, etc.)
- View all pending and ongoing customer requests
- Login via credentials provided by the admin
- View assigned work details
- Access customer information related to assigned services
- Frontend: Next.js, React, ShadCn
- Backend: Next.js API Routes (Full-stack capabilities)
- Authentication: NextAuth
- ORM/Database: Prisma with PostgreSQL
- Deployment: Vercel (or local development)
- Node.js: Ensure that you have Node.js version 14 or later installed.
- PostgreSQL: Ensure you have access to a PostgreSQL database (either locally or via a cloud service).
-
Clone the repository:
git clone https://github.com/Habeel-Shamsudeen/Vehicle-Service-Management-Software.git cd vehicle-service-management-system
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root of your project directory and include the following environment variables:# .env file example DATABASE_URL="DB connection String" NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_secret_key
- DATABASE_URL: Your PostgreSQL connection string.
- NEXTAUTH_URL: The URL of your running application (adjust for production if necessary).
- NEXTAUTH_SECRET: A strong secret for securing NextAuth sessions. You can generate one using
openssl rand -base64 32
.
-
Set up Prisma:
Prisma is already configured in this project. You only need to apply the database migrations and seed the database.
To apply the migrations and set up the database schema, run:
npx prisma migrate dev --name init
If needed, you can manually generate the Prisma client by running the following command:
npx prisma generate
This will ensure that the Prisma client is up to date with your schema.
-
Seed the Database
You can seed the database with initial data (such as predefined admin and mechanic users) using the provided seed file.
Run the following command to seed the database:
npx prisma db seed
-
Run the application:
Once everything is set up, start the development server:
npm run dev
Your app should now be running at
http://localhost:3000
.