DriveRent: Car Rental Marketplace
A multi-vendor car rental marketplace for Morocco where private owners and rental agencies list cars and renters search, book, pay and review.

Overview
DriveRent is a peer-to-peer and agency car rental marketplace. Renters search cars on a map, book, message their host, check in and out and leave reviews; private owners and agencies manage their fleet from a host back office; platform staff run everything from a separate admin console. I built it as a pnpm and Turborepo monorepo with two Next.js apps and a NestJS API.
The problem
A rental marketplace has to serve very different users at once: individual owners with one car, agencies with several branches and staff roles, renters who want a simple booking, and a platform team that moderates listings, handles payments and resolves claims.
What I built
I built a NestJS API (REST and Swagger) with Prisma on PostgreSQL and PostGIS, JWT with rotating refresh tokens, Argon2id password hashing, role-based access control and Socket.IO messaging, plus a BullMQ worker on Redis for background jobs and MinIO for photos. Agencies have branches and scoped staff roles (manager, front-desk agent, accountant), and platform staff have their own scoped permissions (moderation, finance, support, claims). Payment can be online or paid to the agency at pickup, switched from an admin setting. Shared packages hold the typed API client, Zod validation schemas and the design system.
Results
- Marketplace, host back office and admin console in French, Arabic (right-to-left) and English
- Lint, strict typecheck, unit and API integration tests, and Playwright end-to-end tests
- CI/CD with GitHub Actions: images built, pushed to GHCR and deployed to a VM, with tag-based rollback
- Full local stack in one Docker Compose command (API, worker, web, admin, PostgreSQL, Redis, MinIO, Nginx, Mailpit)
Highlights
- Map-based car search with PostGIS
- Booking, check-in and check-out, messaging and reviews
- Agencies with branches and scoped staff roles
- Payment mode switch: online payment or pay at pickup
- Admin console with scoped staff permissions for moderation, finance, support and claims
- Shared typed API client, Zod schemas and a Radix and Tailwind design system


