Inspiration
Every day, massive amounts of wholesome surplus food from restaurants, bakeries, and caterers go to waste, while local non-profit organizations work tirelessly to feed vulnerable communities. We created RescueBite to bridge this gap. Our goal is to build a fast, reliable, and transparent community redistribution platform that turns commercial food waste into meals for those who need them most.
How we built it
We built RescueBite as a robust full-stack web application designed for speed, security, and real-time coordination:
Backend & API: Node.js with Express.js supplying RESTful APIs, paired with MongoDB Atlas and Mongoose for flexible data modeling.
Geospatial Discovery: Implemented MongoDB $near and 2dsphere indexing to allow NGOs to locate nearby food listings dynamically based on proximity.
State Machine & Data Integrity: Designed an atomic reservation state machine (active → reserved → completed/cancelled) to prevent double-booking and race conditions during food collection.
Authentication & RBAC: Secure authentication using JWT and bcryptjs, enforcing role-based access control (RBAC) across Donors, NGOs, and Administrators.
Frontend UI: Built with HTML5, CSS3 tokens (supporting dynamic Light/Dark mode), and Vanilla JavaScript for a lightweight, fast-loading client.
Challenges we ran into
Concurrency & Race Conditions: Ensuring two NGOs couldn't reserve the same surplus listing simultaneously required strict atomic database operations and state transition checks.
Role Verification: Crafting a secure workflow where Donors and NGOs must undergo admin verification before listing or reserving food without creating friction during onboarding.
Geospatial Querying: Setting up precise 2dsphere location indexes to efficiently serve distance-based marketplace queries across varying coordinates.
What we learned
How to design safe, transactional workflows in MongoDB to handle real-time inventory reservations.
The importance of strict schema validation using Zod to prevent malformed requests across complex multi-role workflows.
Best practices for designing an intuitive, multi-role workspace dashboard (Donor Workspace, NGO Hub, and Admin Console) within a clean single-origin architecture.
Built With
- atlas
- bcryptjs
- css3
- express.js
- geojson
- html5
- javascript
- jwt
- mongodb
- mongoose
- multer
- node.js
- restapi
- zod
Log in or sign up for Devpost to join the conversation.