A high-performance, distributed delivery ecosystem orchestrated via Apache Kafka & Zookeeper. Featuring distinct interfaces for Clients, Restaurants, and Couriers, plus a dedicated security layer for external developers.
- π Event-Driven Architecture
- π± The Trinity Experience (User Features)
- π Developer Experience & CLI
- π Security & Access Control
- π» Tech Stack
- π Installation & Setup
G-Faim moves beyond traditional REST communication by implementing an Event-Driven Architecture. Services are decoupled and communicate asynchronously, ensuring high scalability and fault tolerance.
- Message Broker: Apache Kafka handles the stream of events (Order Placed, Payment Validated, Courier Assigned).
- Coordination: Zookeeper manages the cluster state and configuration.
- Services: Autonomous Node.js microservices scaling independently.
Figure: Microservices architecture with Kafka Bus communication and Zookkeeper.
The platform is designed around three distinct personas, each with a dedicated workflow and feature set.
A seamless, consumer-facing application designed for speed.
- Marketplace Navigation: Browse restaurants, filter by categories, and view real-time availability.
- Smart Cart: Add items, customize dishes (toppings, sizes), and manage basket.
- Live Order Tracking: Real-time status updates consuming Kafka events (Preparing -> Picked Up -> Arriving).
A powerful dashboard for operational control.
- Order Governance: Real-time reception of incoming orders with the ability to Accept or Refuse based on kitchen load.
- Dynamic Menu Engineering:
- Create and edit articles.
- Manage complex customization options (sides, sauces, variations).
- Access Management: Granular control over staff access and permissions.
- Audit Logs: View detailed history of all interactions and order flows.
Location-based tooling for independent logistics.
- Proximity Radar: Receive order notifications for pick-ups within a specific radius (Geo-fencing logic).
- Self-Assignment: Freedom to browse available deliveries and choose which order to accept.
- Route Optimization: Detailed info on pickup and drop-off locations.
We treat external developers as first-class citizens. G-Faim includes a robust ecosystem for third-party integrations, secured by a dedicated Auth Service.
A custom command-line tool designed for speed and automation.
- Public Resource Fetching: Dedicated commands to download menus, restaurant lists, and public datasets.
- System Status: Check the health of the microservices grid from the terminal.
[INSERT SCREENSHOT HERE: Screenshot of the Terminal using the CLI]
- Renewable & Revocable: Developers can generate API keys that can be rotated for security or instantly revoked in case of compromise.
- Granular Scopes: Keys are bound to specific permissions, ensuring secure external access.
The platform implements a Hybrid Security Model:
-
JWT (JSON Web Tokens):
- Used for frontend user authentication (Clients/Couriers).
- Stateless authentication ensuring scalability across microservices.
- Token payload contains RBAC (Role-Based Access Control) claims.
-
API Keys (Hashed):
- Used for the CLI and external developer tools.
- Keys are hashed and validated against the Developer Service.
- Allows machine-to-machine communication without user sessions.
| Component | Technology |
|---|---|
| Core Backend | Node.js / Express.js / Typescript |
| Messaging & Broker | Apache Kafka |
| Orchestration | Apache Zookeeper |
| Database | MongoDB (Per-service databases) |
| Security | JWT (Users) + Hashed API Keys (Devs) |
| Interface | ReactJS + REST API + Custom CLI |
- Docker (for Kafka/Zookeeper)
- Node.js v16+
- MongoDB
Use Docker Compose to spin up the Kafka Cluster and Zookeeper.
docker-compose up -d zookeeper kafkaClone the repo and install dependencies for the ecosystem.
git clone https://github.com/TheotimeC/G-Faim.git
cd G-Faim
npm install # Installs dependencies for the workspaceCreate .env files for each service connecting them to the Kafka broker.
KAFKA_BROKER=
MONGO_URI=
JWT_SECRET=# Login with your Developer Key
./bin/gfaim-cli login --key=YOUR_API_KEY
# Fetch public data
./bin/gfaim-cli get-orders --status=pendingThΓ©otime Colinet Engineering Student






