UniBite is a full-stack web application designed to help university students share surplus homemade food within their campus community.
The platform supports multiple user roles, food listings, pickup requests, ratings, a credit-based reward system, map-based discovery, and an administrative dashboard.
Collaborative university project developed by George Aggelis and Petros Fousekis.
![]() Authentication |
![]() Consumer Feed |
![]() Map-based Food Discovery |
![]() Cook Dashboard |
![]() Rating System |
![]() Administration Dashboard |
- User registration and login
- Session-based authentication
- Role-based workflows for Cook, Consumer, and Administrator
Cooks can create, edit, and remove food listings, define portions, pickup details, allergens, and upload photos.
Consumers can browse available food, view individual listings, explore pickup points through a Leaflet map, and request available portions.
Pending → Approved → Picked Up
↘ Rejected
↘ No-show
The system updates portions and user credits according to request outcomes.
| Event | Credit change |
|---|---|
| New user | +5 |
| Request a portion | -1 |
| Rejected request | +1 refund |
| Successful pickup | Cook +1 |
| Rating above 3/5 | Cook +1 bonus |
| Consumer no-show | -1 |
| Missing rating after 48h | -1 |
Consumers can rate cooks after successful pickups.
The admin interface includes platform statistics, activity overview, leaderboard functionality, and a responsive mobile layout.
| Layer | Technology |
|---|---|
| Backend | Node.js, Express.js |
| Database | MySQL |
| Authentication | Express Session, bcryptjs |
| Database Driver | mysql2 |
| File Uploads | Multer |
| Frontend | HTML, CSS, Vanilla JavaScript |
| Maps | Leaflet |
| Configuration | dotenv |
| Development | Nodemon |
Browser
│
▼
HTML / CSS / JavaScript
│
▼
Express.js REST API
│
├── Authentication
├── Listings
├── Requests
├── Ratings
└── Administration
│
▼
MySQL
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/auth/register |
Register user |
| POST | /api/auth/login |
Login |
| POST | /api/auth/logout |
Logout |
| GET | /api/auth/me |
Current user |
| GET | /api/allergens |
List allergens |
| GET | /api/listings |
Browse listings |
| GET | /api/listings/:id |
View listing |
| GET | /api/my/listings |
Cook listings |
| POST | /api/listings |
Create listing |
| PUT | /api/listings/:id |
Edit listing |
| DELETE | /api/listings/:id |
Delete listing |
| POST | /api/listings/:id/requests |
Request portion |
| GET | /api/my/requests |
Consumer requests |
| GET | /api/cook/requests |
Cook requests |
| PUT | /api/requests/:id/approve |
Approve request |
| PUT | /api/requests/:id/reject |
Reject request |
| PUT | /api/requests/:id/pickup |
Confirm pickup |
| PUT | /api/requests/:id/noshow |
Mark no-show |
| POST | /api/requests/:id/rating |
Submit rating |
| GET | /api/admin/stats |
Platform statistics |
| GET | /api/admin/leaderboard |
Cook leaderboard |
UniBite/
├── public/
│ ├── index.html
│ ├── feed.html
│ ├── cook.html
│ ├── requests.html
│ ├── admin.html
│ ├── css/
│ ├── js/
│ └── uploads/
├── Screenshots/
├── server.js
├── db.js
├── schema.sql
├── seed.js
├── .env.example
├── package.json
└── README.md
git clone https://github.com/aggelinho/UniBite.git
cd UniBitenpm installCopy .env.example to .env and configure your local database.
Example:
PORT=3000
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASS=yourpassword
DB_NAME=unibite
SESSION_SECRET=replace_with_a_long_random_secret
ADMIN_EMAIL=admin@unibite.local
ADMIN_PASSWORD=replace_with_a_strong_passwordNever commit your real
.envfile.
mysql -u root -p < schema.sqlnpm run seednpm run devor:
npm startOpen http://localhost:3000.
- Passwords are hashed with
bcryptjs. - Session secrets and database credentials come from environment variables.
.envis excluded from version control.- Administrator credentials are not hardcoded in the portfolio version.
- File uploads are handled using Multer.
Main entities:
- Users
- Food listings
- Allergens
- Listing–allergen relationships
- Portion requests
- Ratings
The portfolio repository keeps the database schema separate from environment-specific or user-generated data.
George Aggelis — @aggelinho
Petros Fousekis — @petrosfs
Original collaborative repository:
petrosfs/ProjectWeb---UniBite
- Full-stack web development
- REST API design
- Relational database modelling
- Session-based authentication
- Role-based application logic
- CRUD workflows
- File uploads
- Geolocation and interactive maps
- Gamification through credits
- Responsive interfaces
- Collaborative software development





