M-TRAVEL is a unified, multi-tenant digital travel ecosystem engineered specifically for the Kenyan and East African travel landscape. It eliminates industry fragmentation by consolidating four critical travel verticals onto a single, high-performance platform
# M-TRAVEL
An enterprise travel marketplace for Kenya — vehicle hire, bus reservations, tours, and
holiday homes on one platform, with M-Pesa built in.
This repo is a **working scaffold**, not a finished product: the core booking flow
(auth → search → book → owner accepts → wallet payout) is fully implemented end-to-end
on both frontend and backend. The remaining modules from the original spec (buses,
tours, holiday homes, notifications, payments providers, admin dashboard) are **modeled
in the database and documented**, but not yet wired up — see "What's implemented" below
before you demo this to anyone.
```
m-travel/
├── backend/ NestJS API (auth, vehicles, bookings, wallet, reviews)
├── frontend/ React + Vite + Tailwind client
└── docs/ API and architecture notes
```
## Quick start
### 1. Database
Create a free Supabase Postgres project (or point at any
Postgres instance) and copy the connection string.
### 2. Backend
```bash
cd backend
cp .env.example .env # fill in DATABASE_URL at minimum
npm install
npx prisma migrate dev --name init
npm run start:dev #
localhost
```
Swagger docs: `
localhost`
### 3. Frontend
```bash
cd frontend
cp .env.example .env # VITE_API_URL should point at the backend above
npm install
npm run dev #
localhost
```
## What's implemented
**Backend (NestJS + Prisma + PostgreSQL)**
- JWT auth (access + refresh tokens, argon2 password hashing, refresh-token
rotation stored hashed in the DB)
- Role-based access control (`@Roles()` + guards) across `TRAVELER`,
`VEHICLE_OWNER`, `ADMIN`, etc.
- Vehicles: create/update/delete, public search with type/price filters and
nearby-search (Haversine distance)
- Bookings: create → owner accept/reject → traveler cancel, with auto-computed
pricing from date range
- Wallet: balance, transaction ledger, withdrawal requests
- Reviews: tied to completed bookings, auto-recalculates vehicle rating
- S …