All projects

Food Connections

A platform to connect foodies for the needies

Year
Aug 2024
Field
Social Impact
Built with
ReactJs, Microservice, JWT
Food Connections screenshot

Overview

A logistics platform matching food donors with beneficiaries and routing volunteer deliveries, built on a microservice architecture under hackathon time constraints.

Technical Challenges

Priority Queue for Dispatch

Beneficiaries are scored on a composite priority (health urgency, time since last delivery, number of dependants). The dispatch service maintains a min-heap keyed on this score so the highest-priority cases are matched first when a donor submits a batch. Scoring weights are configurable without a deployment.

Microservice Decomposition

Services are split along capability boundaries: Beneficiary, Donor, Volunteer, and Matching. Inter-service calls are synchronous HTTP for request/response flows and asynchronous events via a message queue for delivery status updates, avoiding tight coupling on the critical path.

Polyglot Persistence

User profiles and delivery history are relational and live in PostgreSQL. Donor food listings are document-shaped with variable attributes and stored in MongoDB. The matching service resolves references at the application layer rather than via a DB join.

Auth & RBAC

JWT tokens carry a role claim (beneficiary / donor / volunteer / admin). Middleware on each service validates the token and rejects requests that attempt actions outside the caller's role, keeping auth logic decoupled from business logic handlers.

System architecture

Mini Map
Frontend / ClientBackend ServicesExternal APIs / AIDatabases / StorageInfrastructure

Microservice architecture with a priority queue at the beneficiary layer — urgency is scored by health status, proximity, and time without food. RBAC at the auth layer ensures donors, volunteers, and admins have differentiated access.

Next project · E-commerceRegalE-commerce for the modern age