Inspiration
Small transport operators in India don't run on enterprise software — they run on WhatsApp groups, paper bilty books, and a battered Excel sheet. That gap is where things break: trucks get double-booked, a driver with an expired license gets assigned anyway, and nobody knows if a trip actually made money until weeks later, if ever. We wanted to build a tool that a real fleet office would actually adopt — not a generic logistics CRUD app with a truck icon slapped on, but something designed around ₹, kilometers, bilty numbers, and e-way bill deadlines from day one.
What it does
TransitOps is a lightweight ERP for transport operations: fleet, driver, trip dispatch, maintenance, fuel, and expense management, wrapped in a dashboard with 7 KPI cards and exportable reports.
It enforces the rules that actually matter in a fleet office — server-side, not just in the UI:
- Retired or in-shop vehicles can't be dispatched
- Expired or suspended drivers can't be assigned
- Cargo weight can't exceed vehicle capacity
- Dispatching a trip atomically marks vehicle and driver as "On Trip"; completing it atomically restores both to "Available"
On top of the fleet core sits an India-first billing layer: add parties (consignors/consignees), book a bilty and watch charges auto-calculate as you type (₹15/qtl labour + ₹30 GR + door/PF/tax), get an auto-generated sequential bilty number, record payments, and link a bilty's revenue straight into a trip. Role-based access control (Fleet Manager, Dispatcher, Safety Officer, Financial Analyst) is enforced on every server action, not just hidden in the nav.
How we built it
Clean Architecture, four layers: pure domain functions with zero dependencies (lib/domain/), services that orchestrate use-cases, repositories for data access, and a Next.js App Router presentation layer on top. Next.js 16 + React 19 + TypeScript + Prisma + PostgreSQL, with Server Actions instead of a separate API service — no need for microservices on an MVP like this.
State transitions that touch multiple entities (dispatching a trip, closing maintenance) run inside prisma.$transaction() so we never end up with a truck marked "On Trip" while the trip itself is still stuck in "Draft." Validation logic is written once as Zod schemas and shared between React Hook Form on the client and Server Actions on the server, so a form can never pass something the backend then silently rejects.
Everything ships in Docker — docker compose up spins up Postgres, runs migrations, seeds 25 vehicles, 40 drivers, 50 trips, and more, and boots the app. No .env juggling required for a demo.
Challenges we ran into
Getting the atomic state machine right was the trickiest part — vehicle status, driver status, and trip status all have to move together or not at all, and we leaned hard on Prisma transactions and pure domain functions to keep that logic in exactly one place instead of scattered across every place a trip could change state.
Designing the billing layer (bilty, e-way bills, Fastag alerts) meant deliberately phasing scope — we shipped bilty generation and payments end-to-end rather than half-building five features. We were also honest about what's stubbed: alert plumbing is built but not wired to a real SMTP provider yet, and PDF/print layouts aren't done (jsPDF is installed but unused) — better to ship a real, working core than a wide surface of half-finished features.
What we learned
Domain rules as pure functions instead of OOP classes made the business logic dramatically easier to test and reason about — no this context issues, no framework coupling, just data in and a verdict out. We also learned the value of shipping a genuinely usable Phase 1 of a big feature (billing) instead of scaffolding all five phases at once.
What's next for TransitOps
Phase 2 (challan generation + printable documents), Phase 3 (e-way bill validity tracking with expiry alerts), Phase 4 (Fastag balance monitoring + real per-trip P&L), and Phase 5 (exportable PDF reports) are all mapped out on top of the existing schema. Beyond billing: GPS/telematics integration, real-time updates via WebSocket, and multi-tenant support for fleet operators managing multiple companies.
Built With
- css3
- docker
- nextjs
- postgresql
- prisma
- react
- tailwind
- typesscript
Log in or sign up for Devpost to join the conversation.