Skip to content

piertv21/ASW-25-LastBite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

244 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍃 LastBite

Web application project for the course "Web Applications and Services" Academic Year 2025/26.

image

🍔 Overview

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

🎯 Main Features

  • 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

🚀 Branching Model

This repository follows the Git Flow workflow with its default structure.

Branch Types

  • main: production-ready code.
  • feature/*: new features or improvements (e.g. feature/frontend)

📂 Project Structure

📁 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

🔒 Security

  • 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

⚙️ Stack

  • Frontend: Vue 3 (Composition API), shadcn-vue, Vite
  • Backend: Node.js, Express
  • Database: MongoDB
  • ORM: Mongoose

📖 Getting Started

  1. Clone the repository:

    git clone https://github.com/piertv21/ASW-25-LastBite.git
  2. 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>
  3. Build and start with Docker:

    ./start.bat
  4. Access the app on http://localhost:5173

🐳 Docker Commands

Start the application

./start.bat

Or manually:

docker compose build
docker compose up -d

Stop the application

./stop.bat

Or manually:

docker compose stop # Stop containers
docker compose down # Stop and remove containers and networks
docker compose down --rmi all # Remove containers, networks, and images

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

Project for ASW course A.A. 2025/26

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages