Skip to content

Coder-Jainish/ODOO-Hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš› TransitOps

Smart Transport Operations Platform

A centralized platform to digitize and manage the complete lifecycle of transport operations β€” from vehicle and driver management to dispatching, maintenance, and expense tracking.

Status Node React MySQL Tailwind


πŸ“‹ Table of Contents


🎯 Objective

Replace manual spreadsheets and logbooks with a single system that gives logistics teams real-time visibility into their fleet, enforces business rules automatically, and tracks operational costs end-to-end.


πŸ‘₯ Target Users

Role Icon Responsibility
Fleet Manager πŸ‘¨β€πŸ’Ό Manage vehicles, maintenance, and fleet lifecycle
Dispatcher πŸ“‘ Create and dispatch trips, monitor active deliveries
Safety Officer πŸ›‘οΈ Monitor license validity, driver compliance, safety scores
Financial Analyst πŸ’° Review fuel, maintenance costs, and vehicle ROI

✨ Features

πŸ” Authentication

  • Secure login using email and password
  • Role-Based Access Control (RBAC)
  • Registration creates a new organization automatically
  • Multi-tenant data isolation via organization_id

πŸ“Š Dashboard

  • Fleet Manager β€” KPI cards (Total Vehicles, Active, Available, In Shop), Fleet Utilization %, Pie charts for vehicle & trip status
  • Dispatcher β€” Profile card, My Trips metrics, Trip History table, Trip Status pie chart
  • Safety Officer β€” Profile card, Driver Safety table with license expiry/scores, Active Maintenance, Vehicle Overview
  • Financial Analyst β€” Profile card, Fleet Utilization with links to Finance & Reports

πŸš— Vehicle Registry

  • Master list with Registration Number (unique), Name, Type, Max Load Capacity, Odometer, Acquisition Cost, Status
  • Status values: Available Β· On Trip Β· In Shop Β· Retired
  • Full CRUD with org-scoped access

πŸ‘€ Driver Management

  • Profiles: Name, License Number, Category, Expiry Date, Contact, Safety Score, Status
  • Status values: Available Β· On Trip Β· Off Duty Β· Suspended
  • License expiry highlighting for Safety Officers

πŸ“¦ Trip Management

  • Create trips with source, destination, vehicle, driver, cargo weight, planned distance
  • Lifecycle: Draft β†’ Dispatched β†’ Completed β†’ Cancelled
  • Fleet Manager can assign trips to Dispatchers

πŸ”§ Maintenance

  • Create maintenance records per vehicle
  • Vehicle auto-switches to In Shop on active maintenance
  • Closing maintenance restores vehicle to Available
  • Removed from dispatch selection while in shop

β›½ Fuel & Expense Tracking

  • Record fuel logs (liters, cost, date)
  • Record other expenses (tolls, maintenance, etc.)
  • Auto-compute total operational cost per vehicle

πŸ“ˆ Reports & Analytics

  • Fuel Efficiency (Distance / Fuel)
  • Fleet Utilization %
  • Operational Cost per vehicle
  • Vehicle ROI: (Revenue - (Maintenance + Fuel)) / Acquisition Cost
  • CSV export

πŸ›  Tech Stack

Layer Technology
Backend Node.js Express + Sequelize ORM
Frontend React + Tailwind
Database MySQL
Auth JWT (JSON Web Tokens)
Charts Recharts

πŸ“œ Business Rules

Click to expand β€” 10 mandatory rules
# Rule
1 Vehicle registration number must be unique
2 Retired or In Shop vehicles must never appear in dispatch selection
3 Drivers with expired licenses or Suspended status cannot be assigned to trips
4 A driver or vehicle already On Trip cannot be assigned to another trip
5 Cargo Weight must not exceed the vehicle's max load capacity
6 Dispatching a trip β†’ vehicle & driver status β†’ On Trip
7 Completing a trip β†’ vehicle & driver status β†’ Available
8 Cancelling a dispatched trip β†’ restores vehicle & driver to Available
9 Creating active maintenance β†’ vehicle status β†’ In Shop
10 Closing maintenance β†’ restores vehicle to Available (unless retired)

πŸ—„ Database Entities

Users Β· Organizations Β· Vehicles Β· Drivers Β· Trips
Maintenance Logs Β· Fuel Logs Β· Expenses

Every data entity is scoped by organization_id for multi-tenant isolation.


πŸ”„ Example Workflow

1. πŸš› Register vehicle Van-05 (capacity 500 kg)        β†’ Status: Available
2. πŸ‘€ Register driver Alex (valid license)              β†’ Status: Available
3. πŸ“¦ Create trip (cargo 450 kg ≀ 500 kg)              β†’ Validation passes
4. πŸš€ Dispatch trip                                     β†’ Van-05 & Alex β†’ On Trip
5. βœ… Complete trip with final odometer + fuel          β†’ Van-05 & Alex β†’ Available
6. πŸ”§ Create maintenance (Oil Change)                   β†’ Van-05 β†’ In Shop
7. πŸ”“ Close maintenance                                 β†’ Van-05 β†’ Available
8. πŸ“Š Reports auto-update cost & fuel efficiency

πŸš€ Setup

Prerequisites

  • Node.js v18+ and npm
  • MySQL 8+ running

Quick Start

# 1. Clone and install backend
cd backend
npm install
cp .env.example .env          # Configure DB credentials
npx sequelize db:create        # Create database
node server.js                 # Starts on port 5001

# 2. Install and start frontend
cd ../frontend
npm install
npx vite --port 5173           # Starts dev server

Environment Variables

Variable Default Description
PORT 5001 Backend server port
DB_HOST localhost MySQL host
DB_USER root MySQL user
DB_PASS β€” MySQL password
DB_NAME transitops_db Database name
JWT_SECRET β€” Secret key for token signing

πŸ“¦ Build Priority

Build order for an 8-hour MVP sprint:

# Module Description
1 πŸ” Auth & RBAC Login, roles, org-scoped access control
2 πŸš— Vehicle Registry CRUD, statuses, uniqueness validation
3 πŸ‘€ Driver Management Profiles, license validation, statuses
4 πŸ“¦ Trip Management Create, dispatch, complete, cancel + auto-transitions
5 πŸ“Š Dashboard Role-specific KPIs, charts
6 πŸ”§ Maintenance Log creation, auto status β†’ In Shop
7 β›½ Fuel & Expense Logs, cost computation
8 πŸ“ˆ Reports Fuel efficiency, ROI, CSV export

βœ… Deliverables

Status Deliverable
βœ… Responsive web interface
βœ… Authentication with RBAC + multi-tenant org isolation
βœ… CRUD for Vehicles and Drivers
βœ… Trip Management with validations
βœ… Automatic status transitions
βœ… Maintenance workflow
βœ… Fuel & Expense tracking
βœ… Dashboard with role-specific KPIs
βœ… Charts and visual analytics
βœ… Reports with CSV export

Built with ❀️ for the Odoo Hackathon 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages