A full-stack logistics platform built with modern architecture patterns, showcasing Clean Architecture in NestJS, React Native mobile app, and an admin dashboard.
- Real-time Driver Tracking β WebSocket-based live location updates using Socket.IO
- Trip Management β Full lifecycle from request to completion with fare calculation
- Complaint System β AI-powered complaint analysis (Gemini integration)
- Wallet System β Ledger-based financial operations with double-entry bookkeeping
- Multi-role Authentication β Passport JWT for passengers, drivers, and admins
- Background Jobs β BullMQ for trip completion and notification scheduling
omnilogistics-core/
βββ apps/
β βββ api/ # NestJS Backend (Clean Architecture)
β βββ mobile/ # Expo React Native App
β βββ admin/ # Admin Dashboard
βββ packages/
β βββ shared/ # Shared TypeScript types
β βββ db/ # Prisma Schema (PostgreSQL)
β βββ config/ # ESLint, TypeScript, Prettier configs
βββ docs/ # Architecture documentation
βββ turbo.json # Monorepo orchestration
- Node.js 20+
- npm 10+
- Docker & Docker Compose
# Clone and setup everything automatically
git clone https://github.com/yourusername/omnilogistics-core.git
cd omnilogistics-core
./scripts/setup-local.sh# 1. Clone the repository
git clone https://github.com/yourusername/omnilogistics-core.git
cd omnilogistics-core
# 2. Start Docker services (PostgreSQL, MongoDB, Redis)
docker compose up -d
# 3. Install dependencies
npm install
# 4. Environment variables are created automatically by the setup script
# Or manually: cp .env.example .env
# 5. Generate Prisma client and run migrations
cd packages/db && npx prisma generate && npx prisma migrate deploy
cd ../..# Start all apps in development mode
npm run dev
# Start specific app
npm run dev --filter=api # API only (http://localhost:3000)
npm run dev --filter=admin # Admin only (http://localhost:5173)
cd apps/mobile && npm start # Expo (requires Metro)# Build all apps
npm run build
# Type check all packages
npm run typecheck
# Lint all packages
npm run lint| Service | Port | Credentials |
|---|---|---|
| PostgreSQL | 5432 | postgres:postgres |
| MongoDB | 27017 | mongo:mongo |
| Redis | 6379 | No auth |
Database: omnilogistics
Connection URL:
postgresql://postgres:postgres@localhost:5432/omnilogistics?schema=public
To stop services: docker compose down
To reset data: docker compose down -v (deletes all data)
| App | Description | Tech Stack |
|---|---|---|
| apps/api | REST API + WebSocket server | NestJS, MongoDB, PostgreSQL, Redis |
| apps/mobile | Passenger & Driver app | Expo, React Native, Zustand |
| apps/admin | Admin dashboard | React, Vite |
| Package | Purpose |
|---|---|
@omnilogistics/shared |
Shared TypeScript types and constants |
@omnilogistics/db |
Prisma schema and database configuration |
@omnilogistics/config |
Shared ESLint, TypeScript, Prettier configs |
- Framework: NestJS 11 with TypeScript strict mode
- Databases: MongoDB (documents) + PostgreSQL (relational)
- Cache/Queue: Redis + BullMQ
- Real-time: Socket.IO
- Auth: Passport JWT with bcrypt
- Framework: Expo SDK 54
- State: Zustand for global state
- Navigation: Expo Router (file-based routing)
- API Client: Axios + React Query
- Maps: React Native Maps with Google Maps API
- Monorepo: Turborepo 2.4
- Linting: ESLint flat config
- Code Quality: Prettier + Husky + Commitlint
apps/
βββ api/
β βββ src/
β β βββ logistics/
β β β βββ domain/ # Entities, Value Objects, Ports
β β β βββ application/ # Use Cases, DTOs, Services
β β β βββ infrastructure/ # Controllers, Adapters, Gateways
β β βββ shared/ # Cross-cutting concerns
β β βββ main.ts
β βββ test/
β
βββ mobile/
β βββ app/ # Expo Router screens
β β βββ (auth)/ # Auth screens
β β βββ (passenger)/ # Passenger screens
β β βββ (driver)/ # Driver screens
β βββ components/ # Reusable UI components
β βββ services/ # API integration
β βββ store/ # Zustand stores
β βββ constants/ # App constants
β
βββ admin/
βββ index.html
βββ styles.css
βββ app.js
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/login |
User authentication |
| POST | /auth/register |
User registration |
| GET | /trips |
List all trips |
| POST | /trips |
Create new trip |
| GET | /trips/:id |
Get trip details |
| PATCH | /trips/:id |
Update trip status |
| POST | /complaints |
Submit complaint |
| GET | /complaints |
List complaints |
| PATCH | /complaints/:id |
Update complaint status |
| WS | /tracking |
Real-time driver location |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is proprietary and unlicensed.
Built with π using NestJS, React Native, and Turborepo