TransitOps is an enterprise-grade web application built to streamline and manage fleet operations. This frontend application provides an intuitive, highly responsive, and accessible dashboard for tracking vehicles, drivers, trips, maintenance schedules, and associated expenses.
The current repository contains the Frontend Application which is functionally complete using mock data. It is designed to be fully responsive across desktop, tablet, and mobile devices.
- Core: React 18, TypeScript
- Routing: React Router v6 (with
React.lazyfor route-based code splitting) - Styling: Tailwind CSS (custom utility classes, dark mode, animations)
- Components: Radix UI (accessible primitives for Modals, Dialogs, etc.)
- Icons: Lucide React
- Forms: React Hook Form with Zod validation
- Data Visualization: Recharts
- Tooling: Vite, ESLint, TypeScript compiler
src/
├── components/
│ ├── common/ # Reusable UI elements (DataTable, Pagination, etc.)
│ ├── ui/ # Core UI primitives (Modal, Toast, Skeleton, etc.)
│ └── [feature]/ # Feature-specific components (fleet, drivers, trips, etc.)
├── context/ # React Context providers (Auth, Toast)
├── layouts/ # Page layouts (DashboardLayout)
├── mock/ # Mock JSON data mimicking a real backend
├── pages/ # Top-level route components (lazy-loaded)
├── routes/ # Application router configuration
├── services/ # API integration layer (currently exports mock data)
├── types/ # TypeScript interfaces and shared types
└── utils/ # Helper functions and utilities
- Command Palette (
Ctrl+K): Global fuzzy-search for quick navigation across the application. - Global Toast System: Non-blocking notifications for user actions (success, error, warning).
- Advanced DataTables: Sortable, paginated tables with customized cell renderers and empty state handling.
- Form Validation: Strict validation schemas utilizing Zod and React Hook Form.
- Loading Skeletons: Pre-built loading states (Tables, Cards) to smooth out perceived load times.
- Responsive Layouts: Collapsible sidebar for desktop and slide-over menu for mobile.
- Login: Professional split-screen UI.
- Dashboard: KPI summaries, active trip maps (mocked), and critical alerts.
- Fleet: Vehicle registration, status tracking, and details.
- Drivers: Driver profiles, license tracking, and vehicle assignments.
- Trips: Scheduling, dispatching, and trip lifecycle timeline.
- Maintenance: Service logging, status workflows, and cost tracking.
- Expenses: Financial recording and categorisation.
- Analytics: Rich charts, KPIs, and expense breakdowns.
- Profile: User information and avatar management.
- Settings: Multi-tab configuration (General, Security, Theme, Role Management).
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Build for production:
npm run build
To integrate with a real backend API:
- Update
src/services/files to replaceMOCK_DATAexports with actualfetchoraxioscalls. - Introduce a data fetching library like React Query (
@tanstack/react-query) or SWR. - Update
src/context/AuthContext.tsxto handle real JWT tokens and authentication states.