Web application project for the course "Web Applications and Services" Academic Year 2025/26.
LastBite is a MEVN (MongoDB, Express, Vue, Node. js) web application designed to help restaurants and shops publish surplus food at the end of the day. Users can purchase these limited-quantity items at reduced prices, contributing to a more sustainable world and helping reduce food waste. Inspired by "Too Good To Go".
Two user types:
- Restaurants/Commercial Activities – publish and manage surplus products
- Consumers – browse, search, filter, and purchase remaining food items
- Role-based authentication: customer/restaurant
- Restaurant dashboard: edit info, manage orders/products
- User pages: login, register, search restaurants, browse products, checkout
- Order management: place/cancel orders, time-window restrictions
- Food Advisor: AI-powered chat assistant
- Notifications:
- Users: when order status updates
- Restaurants: on new orders received
- Geospatial search & filtering: find nearby restaurants/products
- Clean, modular architecture: SOLID principles, code reusability, non-redundant practices
- UI: Built with shadcn-vue
This repository follows the Git Flow workflow with its default structure.
main: production-ready code.feature/*: new features or improvements (e.g.feature/frontend)
📁 LastBite
├── 📁 backend
│ ├── 📁 controllers
│ ├── 📁 models
│ ├── 📁 routes
│ ├── 📁 services
│ ├── 📁 uploads
│ ├── 📁 utils
│ ├── 📁 validators
├── 📁 frontend
│ ├── 📁 src
│ │ ├── 📁 api
│ │ ├── 📁 assets
│ │ ├── 📁 components
│ │ │ ├── 📁 ui
│ │ │ ├── 📁 common
│ │ │ └── ...
│ │ ├── 📁 composables
│ │ ├── 📁 lib
│ │ ├── 📁 router
│ │ ├── 📁 stores
│ │ ├── 📁 utils
│ │ ├── 📁 views
│ │ │ ├── 📁 restaurant
│ │ │ └── 📁 customer
│ │ │ └── ...
└── 📁 nginx
- JWT authentication, stored in HTTP-only cookies (frontend side)
- Passwords hashed with Argon2
- Input validation (both frontend and backend) and sanitization
- Role based access control
- Frontend: Vue 3 (Composition API), shadcn-vue, Vite
- Backend: Node.js, Express
- Database: MongoDB
- ORM: Mongoose
-
Clone the repository:
git clone https://github.com/piertv21/ASW-25-LastBite.git
-
Configure environment variables as needed (see
.env.example) in the root of the project. You will need a Groq API key for the AI to function.GROQ_API_KEY=<your_groq_api_key>
-
Build and start with Docker:
./start.bat
-
Access the app on http://localhost:5173
./start.batOr manually:
docker compose build
docker compose up -d./stop.batOr manually:
docker compose stop # Stop containers
docker compose down # Stop and remove containers and networks
docker compose down --rmi all # Remove containers, networks, and imagesThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.