Skip to content

A full-stack application for driver registration and dashboard management. The system allows users to register drivers, upload documents, and view driver details in a responsive dashboard..

Notifications You must be signed in to change notification settings

amponsemmichael/driver-registration-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚚 Driver Registration & Dashboard System

A full-stack system for truck driver registration, data management, and document handling. This application offers full CRUD operations, responsive design, and secure validation for accurate and efficient management.


πŸ“‹ Table of Contents

  • Overview
  • Features
  • Technologies Used
  • Installation
    • Prerequisites
    • Backend Setup
    • Frontend Setup
  • API Endpoints
  • Usage (with Postman)
  • Error Handling
  • Production Deployment
  • License
  • Acknowledgments

πŸ“Œ Overview

The Driver Registration & Dashboard System enables users to register and view driver records while managing associated documents. The system supports responsive UI, real-time validation, and a simple, intuitive interface for administrators.


✨ Features

πŸš› CRUD Operations

  • Create: Register drivers with optional document upload
  • Read: View driver details individually
  • Read: View drivers details in a list (implemented at backend)
  • Update: Modify driver info and optionally replace documents(implemented at backend)
  • Delete: Remove driver records(implemented at backend)

🧠 Data Validation

  • Prevents duplicate email and phone number entries
  • Enforces required fields through form validation

πŸ“Ž Document Management

  • Upload and view/download ID or truck documents (PDF/images)

πŸ“± Responsive Design

  • Built with a mobile-first approach
  • Clean and accessible UI

πŸ›  Technologies Used

Backend

  • Java 17
  • Spring Boot 3.x
  • Spring Data JPA
  • PostgreSQL
  • Global exception handling

Frontend

  • React
  • React Router
  • Axios
  • Custom CSS for responsiveness

βš™οΈ Installation

πŸ”§ Prerequisites

  • Java 17+
  • Node.js 16+
  • npm or yarn
  • Maven or Gradle

▢️ Backend Setup

git clone https://github.com/amponsemmichael/driver-registration-system.git
cd driver-registration-system

Run with Maven:

./mvnw spring-boot:run

Backend runs at http://localhost:4300


πŸ’» Frontend Setup

cd frontend
cd driver_registration_dashboard
npm install
npm run dev

Frontend runs at http://localhost:5173

πŸ”— Live Demo

Check out the live version here: driver-registration-dashboard.netlify.app πŸ“¦ Features

  • Built with Vite for blazing-fast development
  • Fully responsive and optimized for production
  • Hosted on Netlify for seamless deployment

πŸ”Œ API Endpoints

Method Endpoint Description
POST /api/drivers/register Register a new driver
GET /api/drivers/{id} Get driver by ID
GET /api/drivers List all drivers
PUT /api/drivers/{id} Update driver
DELETE /api/drivers/{id} Delete driver
GET /api/drivers/document/{id} Download driver's document

πŸ§ͺ Usage (Testing Backend With Postman Examples)

βœ… Create a Driver

  • Method: POST
  • URL: http://localhost:4300/api/drivers/register
  • Body (form-data):
    • fullName: Michael Mouse
    • email: [email protected]
    • phone: 23354356789
    • truckType: Semi-Truck
    • document: (Upload PDF/Image)

πŸ” Get All Drivers

  • Method: GET
  • URL: http://localhost:4300/api/drivers

πŸ“„ Get Driver by ID

  • Method: GET
  • URL: http://localhost:4300/api/drivers/1

✏️ Update Driver

  • Method: PUT
  • URL: http://localhost:4300/api/drivers/1
  • Body (form-data):
    • fullName: Micky Mouse Updated
    • email: [email protected]
    • phone: 1234567890
    • truckType: Box Truck
    • document: (Optional file)

❌ Delete Driver

  • Method: DELETE
  • URL: http://localhost:4300/api/drivers/1

πŸ“₯ Download Document

  • Method: GET
  • URL: http://localhost:4300/api/drivers/document/1

❗ Error Handling

All API responses follow a consistent error structure:

  • 404 Not Found: Driver not found
  • 409 Conflict: Duplicate email/phone
  • 500 Internal Server Error: File handling failure

πŸ“„ License

This project is licensed under the MIT License.
See the LICENSE file for details.


πŸ™Œ Future Enhancement

  • Modify Frontend to perform full crud operation
  • Add authentication and authorization
  • Contributors to open-source libraries used in this project

πŸ™Œ Acknowledgments

  • Java OpenJDK
  • Spring Boot
  • React + Vite
  • Contributors to open-source libraries used in this project

Releases

No releases published

Packages

No packages published