FleetLink is a modern, full-stack logistics management platform designed to streamline vehicle booking and management. It provides a user-friendly interface for searching, booking, and managing vehicles, as well as a robust backend for handling the business logic.
- Vehicle Search: Search for available vehicles based on capacity, pincode, and start time.
- Booking: Book vehicles for a specific time slot.
- Vehicle Management: Add, view, and manage vehicles in the fleet.
- Booking Management: View and cancel bookings.
- Dockerized: The entire application is containerized using Docker for easy setup and deployment.
- Tested: The backend API is fully tested using Jest and Supertest.
- Node.js (v18 or higher)
- npm
- MongoDB
-
Clone the repository:
git clone https://github.com/AKASH-PRASAD7/FleetLink.git cd fleetlink -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root of the project and add the following:MONGODB_URI=mongodb://localhost:27017/fleetlink PORT=8000 -
Start the development servers:
# Start the backend server npm run dev:server # Start the frontend server npm run dev:client
The frontend will be available at
http://localhost:5173and the backend athttp://localhost:8000.
-
Build and start the containers:
docker-compose up
-
Access the application:
The frontend will be available at
http://localhost:5173and the backend athttp://localhost:8000.
POST /api/v1/vehicles: Create a new vehicle.GET /api/v1/vehicles/available: Get available vehicles based on search criteria.GET /api/v1/vehicles: Get all vehicles.
POST /api/v1/bookings: Create a new booking.GET /api/v1/bookings: Get all bookings.DELETE /api/v1/bookings/:id: Delete a booking by its ID.
To run the tests for the backend API, use the following command:
npm test