Built for the Odoo Hackathon 2026 | 8-Hour Sprint
TransitOps is a full-stack transport management system that digitizes vehicle, driver, dispatch, maintenance, fuel, and expense tracking. It enforces strict business rules, provides real-time operational insights, and includes a clean, responsive UI.
- Features
- Architecture
- Tech Stack
- Setup & Installation
- Team Roles
- Business Rules Implemented
- API Endpoints
- Future Enhancements
- Contributors
- Secure JWT-based login (email + password)
- Role-Based Access Control (Fleet Manager, Driver, Safety Officer, Financial Analyst)
- Protected frontend routes — pages are inaccessible without a valid session
- Real-time KPIs: Active Vehicles, Available Vehicles, Vehicles in Maintenance, Active Trips, Pending Trips, Drivers On Duty
- Card-based layout for quick operational visibility
- Full CRUD operations
- Status lifecycle:
Available→On Trip→In Shop→Retired - Unique registration number enforcement
- License validation (expiry, category)
- Safety score tracking
- Status lifecycle:
Available→On Trip→Off Duty→Suspended - Expired license flagged directly in the table
- Full lifecycle:
Draft→Dispatched→Completed→Cancelled - Dropdowns only show Available vehicles/drivers
- Cargo weight validated against vehicle max load capacity before creation
- Auto status transitions for both vehicle and driver on dispatch
- Create and close maintenance records
- Auto-switches vehicle to
In Shopon creation, reverts toAvailableon closure
- Trip reporting page
- One-click CSV export using browser-native Blob API
transitops/
├── backend/
│ ├── src/
│ │ ├── config/ # Database connection config
│ │ ├── controllers/ # Route handlers (auth, vehicle, driver, trip)
│ │ ├── models/ # Sequelize models (User, Vehicle, Driver, Trip)
│ │ ├── routes/ # Express route definitions
│ │ ├── middlewares/ # Auth guard, error handler, validators
│ │ └── index.js # App entry point
│ ├── scripts/
│ │ └── seed.sql # Database seed script
│ ├── .env.example
│ └── package.json
│
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── assets/ # Images, icons
│ │ ├── components/ # Reusable UI (Sidebar, ProtectedRoute)
│ │ ├── pages/ # Login, Dashboard, Vehicles, Drivers, Trips, Maintenance, ReportsPage
│ │ ├── services/ # mockApi.js, mockData.js, realApi.js
│ │ ├── App.jsx # Route definitions
│ │ ├── main.jsx # App entry point
│ │ └── index.css # Global styles
│ ├── .env.example
│ └── package.json
│
├── docker-compose.yml
├── .gitignore
└── README.md
┌─────────────────────────────────────────────────────┐
│ Frontend │
│ React + Vite + React Router │
│ │ │
│ axios (REST API + JWT) │
│ ▼ │
│ Backend │
│ Node.js + Express + JWT │
│ │ │
│ Sequelize ORM │
│ ▼ │
│ MySQL │
│ (Local instance, port 3306) │
└─────────────────────────────────────────────────────┘
DevOps:
- Git feature-branch workflow (
develop→main) - Docker Compose for MySQL + Adminer (optional)
.env-based configuration for secrets
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, React Router, Axios |
| Backend | Node.js, Express, JWT, bcryptjs |
| Database | MySQL 8.0 (local), Sequelize ORM |
| DevOps | Git, Docker Compose, dotenv |
| Utilities | Nodemon, CORS, Postman (API testing) |
- Node.js (v18+)
- MySQL 8.0 (installed locally)
- Git
# 1. Clone the repository
git clone https://github.com/shellsri/transitops.git
cd transitops
# 2. Install backend dependencies
cd backend
npm install
# 3. Install frontend dependencies
cd ../frontend
npm install
# 4. Configure environment variables
# Backend: create backend/.env with:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=root
DB_NAME=transitops
JWT_SECRET=super_secret_hackathon_2026
PORT=3000
# Frontend: create frontend/.env with:
VITE_API_URL=http://localhost:3000
# 5. Set up the database
mysql -u root -p < scripts/seed.sql
# 6. Start the backend
cd backend
npm run dev
# 7. Start the frontend (in a separate terminal)
cd frontend
npm run dev
# 8. Access the app
# Open http://localhost:5173| Role | Name | Responsibilities |
|---|---|---|
| Frontend Lead | Swaran Abha | React UI, routing, components, forms, state management, API integration, JWT auth wiring, route protection |
| Backend Lead | Shubhangi Saxena | Sequelize models, Auth, CRUD APIs, business rules, transactions, database seeding |
| Integration / DevOps Lead | Shelly Srivastava | Database setup, Docker, .env config, Reports page, CSV export, Git workflow, final integration |
| Rule | Implementation |
|---|---|
| Unique registration number | MySQL UNIQUE constraint + Sequelize validation |
| Retired/In Shop vehicles excluded from dispatch | Backend query filter + frontend dropdown filtering |
| Expired/Suspended drivers cannot be assigned | License expiry check + status validation |
| Cargo weight ≤ vehicle max load | Validated on trip creation (frontend + backend) |
Dispatch → vehicle/driver On Trip |
Sequelize transaction (atomic update) |
Complete → vehicle/driver Available |
Sequelize transaction |
Active maintenance → vehicle In Shop |
Maintenance log creation triggers status update |
Close maintenance → vehicle Available |
Maintenance closure triggers status update |
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/login |
Authenticate user, return JWT |
| GET | /auth/me |
Get current user info (protected) |
| GET | /dashboard |
KPI counts |
| GET | /vehicles |
List all vehicles |
| POST | /vehicles |
Register a new vehicle |
| GET | /drivers |
List all drivers |
| POST | /drivers |
Register a new driver |
| GET | /trips |
List all trips |
| POST | /trips |
Create draft trip |
| PUT | /trips/:id/dispatch |
Validate rules + dispatch trip |
| PUT | /trips/:id/complete |
Complete trip, restore statuses |
| PUT | /trips/:id/cancel |
Cancel trip, restore statuses |
| POST | /maintenance |
Create maintenance log |
| PUT | /maintenance/:id/close |
Close maintenance, restore vehicle |
| GET | /reports/trips |
Get all trips for reporting |
- PDF export for reports
- Email reminders for expiring driver licenses
- Vehicle document management (photos, insurance)
- Advanced chart visualisations (D3.js / Recharts)
- Full dark mode toggle
- Fuel & expense management module
- Swaran Abha — Frontend Lead: React UI/UX, routing, state management, API binding, auth wiring
- Shubhangi Saxena — Backend Lead: API development, Sequelize, business logic, auth, transactions
- Shelly Srivastava — Integration/DevOps Lead: Database architecture,
.env, Reports + CSV, Git workflow, final integration
This project was built for the Odoo Hackathon 2026. It is not intended for commercial use.