Backend APIBackend developer

ShareABite — Food Sharing API

Backend system for a food donation platform connecting restaurants and eateries with communities to reduce food waste.

Overview

ShareABite is the backend system for a food donation platform connecting restaurants and eateries with local communities. The idea is straightforward: food businesses list surplus food, community members request pickup — reducing waste on both sides.

The API was built as the complete backend for a Final Year Project, covering authentication, role management, donation workflows, and pickup request handling — all with a clean, consistent response structure.

The architecture supports three distinct client types — a restaurant portal, an eatery dashboard, and an admin panel — each with separate permissions managed through role-based access control.

Goal

The goal was to build a complete, well-structured backend that could realistically serve as the foundation for a production food donation platform.

  • Role-based access control for Admin, Eatery, and Restaurant users
  • JWT authentication with protected routes and token validation middleware
  • MongoDB schemas for users, donations, and pickup requests
  • RESTful APIs with consistent response formats throughout
  • Proper HTTP status codes and authorization checks on every route

Outcome

The result is a fully functional API covering all core workflows — auth, role separation, donations, and pickup requests — with a clean codebase.

  • Complete authentication system with JWT and protected routes
  • Three separate role types with distinct permission sets
  • Donation listing and pickup request workflows
  • Consistent API response format across all endpoints
  • Clean, well-structured codebase ready for team handoff

Tech Stack

  • Node.jsNode.js
  • Express.jsExpress.js
  • MongoDBMongoDB
  • JWTJWT