Skip to content

j-deku/Transbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transbook - Transport Booking System

Transbook is a full-stack transport booking system built around advance ride scheduling. Passengers book rides in advance, drivers get notified, and seat availability is managed per route — all backed by secure payments via Paystack.

What sets Transbook apart architecturally is its multi-app frontend structure: each user panel (passenger, driver, admin) is an independent React application, enabling isolated development, deployment, and scaling per role.

Status License


Architecture Overview

Unlike traditional monolithic frontends, Transbook is structured as three independent React apps sharing one Node.js/Express backend:

Transbook/
|-- apps/
|   |-- fy/           # React app for passengers
|   |-- driver/              # React app for drivers
|   `-- admin/               # React app for admins
|
|-- backend/                  # Shared Node.js + Express backend
|   |-- src/
|   |   |-- routes/          # API route definitions
|   |   |-- controllers/     # Business logic
|   |   |-- middleware/      # Auth, RBAC, rate limiting
|   |   |-- services/        # Paystack integration
|   |   `-- models/          # MongoDB schema definitions
|
`-- .env.example             # Environment variable template

Why multi-app?

  • Each panel can be developed, deployed, and scaled independently
  • Smaller bundle sizes per app — only loads what each role needs
  • Clear separation of concerns between passenger, driver, and admin concerns
  • Easier to onboard contributors to a specific panel without touching others

Features

Passenger App

  • Browse available routes and scheduled rides
  • Advance booking with seat selection
  • Secure checkout and payment via Paystack
  • Digital receipts after successful bookings
  • OAuth social login and JWT-based authentication
  • Real-time booking status updates

Driver App

  • Register vehicle with total seat capacity
  • Publish rides and manage seat availability per route
  • Reserve seats for regular agents and customers
  • Receive real-time notifications for new bookings
  • View and manage upcoming ride schedules

Admin App

  • Full platform oversight from a dedicated dashboard
  • Manage users, drivers, routes, and bookings
  • Assign or unassign routes
  • View system logs and operational reports
  • Role-based access control (RBAC) across all panels

Payments

  • Paystack payment gateway integration
  • Digital receipts generated after successful bookings

Tech Stack

Frontend (x3 independent React apps):

React Vite Redux CSS3

Backend (shared):

NodeJS Express.js

Data & Infra:

MongoDB

Auth & Payments:

JWT OAuth Paystack


Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB 6+ (or MongoDB Atlas)

1. Clone the repository

git clone https://github.com/j-deku/Transbook.git
cd Transbook

2. Set up environment variables

cp .env.example .env

Open .env and fill in your values:

# Database
MONGO_URI=your_mongodb_connection_string

# Auth
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=7d

# OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# Paystack
PAYSTACK_SECRET_KEY=your_paystack_secret_key
PAYSTACK_PUBLIC_KEY=your_paystack_public_key

# App
PORT=5000
PASSENGER_URL=http://localhost:5173
DRIVER_URL=http://localhost:5174
ADMIN_URL=http://localhost:5175

3. Install dependencies

# Backend
cd backend && npm install

# Passenger app
cd ../fy && npm install

# Driver app
cd ../driver && npm install

# Admin app
cd ../admin && npm install

4. Run the development servers

# Start backend (from /backend)
npm run dev

# Start passenger app (from /apps/fy)
npm run dev

# Start driver app (from /apps/driver)
npm run dev

# Start admin app (from /apps/admin)
npm run dev
App URL
Passenger http://localhost:5173
Driver http://localhost:5174
Admin http://localhost:5175
Backend API http://localhost:5000

User Roles

Role Access
Passenger Browse routes, book rides, manage bookings, make payments
Driver Publish rides, manage seat availability, receive notifications
Admin Full platform access, user management, operations oversight

Relationship to TOLI-TOLI

Transbook shares the same core booking concept as TOLI-TOLI but differs in two key ways:

Transbook TOLI-TOLI
Frontend architecture Multi-app (3 independent React apps) Single monorepo React app
Database MongoDB MySQL
Stage MVP Production-grade

Transbook served as the MVP validation ground for the booking flow that TOLI-TOLI later refined and scaled.


Roadmap

  • Deploy all three frontend apps
  • API documentation (Postman/Swagger)
  • Screenshots and demo GIFs
  • Driver earnings dashboard
  • Email notifications for booking updates

Acknowledgments


Author

Jeremiah Deku

LinkedIn GitHub Email


License

This project is licensed under the MIT License.

About

TransBook is a modern and scalable transport booking web application designed to simplify how users book, manage, and track their travel journeys. The platform supports customer reservations, ride management, admin controls, driver dashboards, and secure payments—all in one place.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors