Skip to content

iAm-AliHaider/Car-management-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car Management App

A comprehensive car management application with service booking and spare parts ordering capabilities.

Features

Core Features

  • User Authentication: Secure login and registration system
  • Car Management: Add, edit, and manage your vehicles
  • Service Booking: Book maintenance and repair services
  • Spare Parts Ordering: Order spare parts for your vehicles
  • Fuel Tracking: Track fuel consumption and calculate MPG
  • Expense Management: Track and categorize vehicle expenses
  • Maintenance Reminders: Time and mileage-based reminders
  • Document Management: Store vehicle documents with expiry alerts

Advanced Features

  • Car Rental & Sharing: Rent your car or give temporary ownership to other users
  • Fleet Management: Manage multiple vehicles as a fleet with role-based access
  • Fleet Services: Bulk service scheduling for fleet vehicles
  • Accident Reporting: Comprehensive accident documentation with insurance tracking
  • Insurance Claims: Full claim lifecycle management with payment tracking

Quick Start with Docker

The easiest way to run the application is using Docker:

# Start all services (MongoDB, Backend, Frontend)
docker-compose up -d

# Access the application
# Frontend: http://localhost:5173
# Backend API: http://localhost:5000

For detailed Docker instructions, see DOCKER.md.

Tech Stack

Frontend

  • React 18
  • TypeScript
  • Vite
  • Tailwind CSS
  • React Router
  • Axios

Backend

  • Node.js
  • Express
  • TypeScript
  • MongoDB (Mongoose)
  • JWT Authentication
  • bcrypt

Project Structure

Car-management-app/
├── frontend/          # React frontend application
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   ├── services/
│   │   ├── types/
│   │   └── utils/
│   └── package.json
├── backend/           # Node.js backend API
│   ├── src/
│   │   ├── models/
│   │   ├── routes/
│   │   ├── controllers/
│   │   ├── middleware/
│   │   └── config/
│   └── package.json
└── README.md

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (v6 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd Car-management-app
  1. Install backend dependencies:
cd backend
npm install
  1. Install frontend dependencies:
cd ../frontend
npm install
  1. Configure environment variables:

Backend (.env):

PORT=5000
MONGODB_URI=mongodb://localhost:27017/car-management
JWT_SECRET=your-secret-key-here
NODE_ENV=development

Frontend (.env):

VITE_API_URL=http://localhost:5000/api

Running the Application

  1. Start MongoDB:
mongod
  1. Start the backend server:
cd backend
npm run dev
  1. Start the frontend development server:
cd frontend
npm run dev
  1. Open your browser and navigate to http://localhost:5173

API Documentation

Authentication Endpoints

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • GET /api/auth/me - Get current user

Car Endpoints

  • GET /api/cars - Get all user cars
  • POST /api/cars - Add new car
  • GET /api/cars/:id - Get car by ID
  • PUT /api/cars/:id - Update car
  • DELETE /api/cars/:id - Delete car

Service Booking Endpoints

  • GET /api/bookings/service - Get all service bookings
  • POST /api/bookings/service - Create service booking
  • GET /api/bookings/service/:id - Get booking by ID
  • PUT /api/bookings/service/:id - Update booking
  • DELETE /api/bookings/service/:id - Cancel booking

Spare Parts Endpoints

  • GET /api/parts - Get all spare parts
  • POST /api/parts/order - Order spare parts
  • GET /api/parts/orders - Get user's part orders
  • GET /api/parts/orders/:id - Get order by ID

Default Credentials

For testing purposes:

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

Support

For support, email support@carmanagement.com or open an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages