EZGO is a dual-platform mobile and web solution designed to modernize Tunisia's public transportation system. It delivers real-time navigation, smart reservations, and data-driven operational tools that improve reliability for riders and profitability for transport operators.
- Seamless mobile app with live bus tracking
- Accurate ETAs and route visualization
- Seat availability and reservations
- Digital tickets and booking history
- Driver information and ratings
- Complete fleet management system
- Driver assignment and scheduling
- Real-time operations monitoring
- Profitability dashboard and analytics
- Performance insights and optimization
- Centralized user and company management
- System-wide analytics and reporting
- Permissions and roles management
- Quality assurance and compliance tools
This project is a Turborepo monorepo containing three applications:
ezgo/
├── apps/
│ ├── web/ # Next.js Admin & Company Dashboard
│ ├── api/ # NestJS Backend API
│ └── mobile/ # Expo React Native Mobile App
├── packages/ # Shared packages (future)
└── docker-compose.yml
- Framework: Next.js 16 (App Router)
- Styling: TailwindCSS v4
- UI Components: Shadcn UI
- State Management: Tanstack React Query
- Language: TypeScript
- Framework: NestJS
- Database: PostgreSQL (via Docker)
- ORM: Prisma 7
- Validation: Zod
- Language: TypeScript
- Framework: Expo (React Native)
- Styling: NativeWind (TailwindCSS for React Native)
- Navigation: React Navigation
- Language: TypeScript
- Monorepo: Turborepo
- Linting/Formatting: Biome.js
- Package Manager: npm
- Node.js 18+ and npm
- Docker and Docker Compose
- Git
-
Clone the repository
git clone <repository-url> cd EzGo
-
Install dependencies
npm install
-
Start PostgreSQL database
docker-compose up -d
-
Setup environment variables
Create
apps/api/.env:DATABASE_URL="postgresql://postgres:password@localhost:5432/ezgo?schema=public"
-
Generate Prisma Client
cd apps/api npx prisma generate npx prisma migrate dev --name init cd ../..
Run all applications concurrently:
npm run devOr run individually:
Web Dashboard:
cd apps/web
npm run dev
# Access at http://localhost:3000API Server:
cd apps/api
npm run start:dev
# Access at http://localhost:3001Mobile App:
cd apps/mobile
npm start
# Scan QR code with Expo Go appnpm run buildThe landing page provides a clean introduction to EZGO with quick access to the dashboard.
The admin dashboard displays key metrics including:
- Total Revenue with growth indicators
- Active Buses count
- Active Users statistics
- Real-time activity monitoring
- Overview charts and recent sales
The mobile app features:
- Passenger Mode: Real-time bus tracking, seat booking, and trip history
- Driver Mode: Assigned routes, passenger counts, and navigation assistance
The application uses the following main entities:
- User: Passengers, Drivers, Company Admins, and System Admins
- Company: Bus companies managing fleets
- Bus: Fleet vehicles with capacity and status
- Route: Bus routes with stops and coordinates
- Trip: Scheduled trips with real-time status
- Booking: Passenger reservations and tickets
The fatigue-detection.ipynb notebook implements driver fatigue detection using computer vision. This notebook must be run in the Kaggle environment.
Dataset: Drowsiness Dataset
Setup Instructions:
- Upload the notebook to Kaggle
- Add the dataset using the URL above
- Run the notebook in Kaggle's environment
The suspicious_behaviour_detection.ipynb notebook implements suspicious activity detection for passenger safety monitoring. This notebook is trained on a custom dataset and should be run on Kaggle.
Dataset: Suspicious Activity Detection
Setup Instructions:
- Upload the notebook to Kaggle
- Set up the dataset from Roboflow
- Run the notebook in Kaggle's environment
The project uses Biome.js for linting and formatting:
# Format code
npm run format
# Check code quality
npm run checkRecommended extensions are configured in .vscode/extensions.json:
- Biome
- Prisma
- Tailwind CSS IntelliSense
- Expo Tools
GET /company- List all companiesGET /company/:id- Get company by IDPOST /company- Create new companyPATCH /company/:id- Update companyDELETE /company/:id- Delete company
Additional endpoints for Users, Buses, Routes, Trips, and Bookings will be added.
- Complete API endpoints for all entities
- Implement authentication and authorization
- Add real-time tracking with WebSockets
- Integrate payment gateway
- Add push notifications
- Implement analytics dashboard
- Add map integration (Google Maps/Mapbox)
- Create mobile app screens for all features
- Add unit and integration tests
- Integrate IoT with AI
- Deploy to production

