LastBite

   page       attach   
sommario

Food waste represents one of the most significant sustainability challenges worldwide, with large quantities of edible products discarded daily across the food supply chain. Restaurants and food service activities contribute substantially to this issue, especially through unsold products remaining at the end of the day. This report details the design and implementation of LastBite, a distributed web application designed to mitigate food waste by enabling restaurants to sell surplus products at the end of the day. The project is built on top of the MEVN (MongoDB, Express.js, Vue.js, Node.js) stack and orchestrated using a Docker-based approach to ensure scalability and isolation. The system comprises multiple containerized services, including two backend instances, a Vue frontend, a MongoDB replica set, a Redis database for distributed locking and an Nginx reverse proxy for load balancing and fault tolerance. Furthermore, LastBite implements several security features required by the application domain, such as secure authentication, password hashing, Role-Based Access Control (RBAC) and distributed locks for handling product purchases and modifications. The system offers dedicated interfaces for restaurants, which manage products and orders, and for customers, who can search for nearby restaurants using geospatial filtering. Finally, the application also includes real-time notifications and an AI-powered “Food Advisor” assistant.

prodotti