Skip to content

Latest commit

Β 

History

127 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ahaar Bonton Banner

A Surplus Food Redistribution Platform

Connecting Donors, NGOs, and Volunteers to Reduce Food Waste

Β 

πŸ“‘ Table of Contents

πŸ“Œ About the Project

AhaarBonton (আহার বণ্টন) is a web-based surplus food redistribution platform built specifically for the context of Bangladesh. Every day, significant amounts of food go to waste at restaurants, weddings, corporate events, and households, while many people struggle to meet their daily nutritional needs.

This platform provides a structured, community-driven solution to that contradiction. Donors can post surplus food listings, NGOs can claim and coordinate pickups, and volunteers can register to assist with deliveries – all through a single, unified platform designed to work within Bangladesh's existing social and organizational fabric.

"Ahaar" (আহার) means food, and "Bonton" (বণ্টন) means distribution – together, a name that speaks for itself.

✨ Key Features

  • πŸ₯˜ Food Donation Listings – Donors post surplus food with title, quantity, category, image, and GPS-based pickup location
  • 🏒 Priority-Sorted NGO Dashboard – NGOs browse available food sorted by expiry urgency, with category filters and live countdowns
  • 🚴 Volunteer Delivery System – Volunteers accept open delivery jobs and manage pickups/drop-offs from their dashboard
  • πŸ‘€ Flexible Authentication – Register and log in using either Email or Phone Number, with full Forgot Password support
  • πŸ” Dual OTP Delivery Verification – Two separate OTPs (Pickup OTP from Donor, Delivery OTP from NGO) ensure food is verifiably picked up and delivered β€” not just claimed
  • πŸ“ GPS Auto-Location – One-tap location detection auto-fills addresses using the browser's GPS and OpenStreetMap Nominatim
  • πŸ—ΊοΈ Interactive Food Map & Heatmap – View all available donations on a live map, or see donation density by area (Leaflet.js + OpenStreetMap)
  • ⭐ Trust Score System – Both Donors and Volunteers build a 0–100 trust score based on successful, on-time deliveries
  • πŸ† Community Leaderboard – Dual-view leaderboard ranking top Donors & Volunteers by Activity (donations/deliveries) or by Trust Score
  • πŸ’¬ Ratings & Reviews – NGOs rate Donors & Volunteers, Donors rate Volunteers β€” visible on public profiles
  • 🚩 Report System – Users can report inappropriate food posts or fraudulent accounts for Admin review
  • πŸ“Š Transparency Dashboard – A public-facing impact page with real-time statistics on food saved, deliveries completed, and communities served
  • πŸ–ΌοΈ Image Uploads – Food listings and user profiles support photo uploads via Pillow
  • πŸ“Ά Basic Offline Support (PWA) – Service Worker caches key pages for smoother reloads on unstable connections
  • πŸ› οΈ Custom Admin Panel – A dedicated dashboard for monitoring users, food posts, and platform-wide statistics

βš™οΈ How AhaarBonton Works

AhaarBonton follows a simple, transparent, and verified flow from food surplus to final delivery.


πŸ‘€ Step 1 – Donor Posts Food

A donor (restaurant, household, or event organizer) logs in and creates a food post with:

  • Food title, description, and quantity
  • Category (Cooked / Raw / Packaged / Bakery)
  • Pickup location (auto-filled via GPS)
  • Expiry date and time
  • Optional food image

The post immediately becomes visible to all registered NGOs on their dashboard.

🏒 Step 2 – NGO Requests Food

NGOs browse available food sorted by expiry priority (soonest expiring first). They can filter by category and see a live expiry countdown on each card.

When an NGO finds suitable food, they send a collection request with an optional message to the donor.

βœ… Step 3 – Donor Approves the Request

The donor reviews incoming requests and approves or rejects them.

On approval, the system automatically:

  • Marks the food post as Claimed
  • Creates a Delivery record
  • Generates two unique 6-digit OTPs:
    • Pickup OTP β†’ visible to the Donor (given to Volunteer at pickup)
    • Delivery OTP β†’ sent to the NGO via email (given to Volunteer at delivery)

🚚 Step 4 – Volunteer Accepts the Delivery

Volunteers browse open delivery jobs and accept one.

Each job shows:

  • Pickup location (Donor's address)
  • Drop-off location (NGO name)
  • Food quantity and expiry time

πŸ” Step 5 – Pickup Confirmed (OTP 1)

The volunteer visits the donor and collects the food. The Donor shares the Pickup OTP with the volunteer.

The volunteer enters the Pickup OTP in their dashboard:

  • βœ… Correct OTP β†’ Pickup confirmed, status updates to Picked Up
  • ❌ Wrong OTP β†’ Error shown, volunteer must try again

At this point, the NGO receives an email notification: "Food is on the way! Your Delivery OTP: XXXXXX"

🏁 Step 6 – Delivery Confirmed (OTP 2)

The volunteer arrives at the NGO and hands over the food. The NGO shares the Delivery OTP with the volunteer.

The volunteer enters the Delivery OTP in their dashboard:

  • βœ… Correct OTP β†’ Delivery confirmed, status updates to Delivered
  • ❌ Wrong OTP β†’ Error shown

πŸŽ‰ Step 7 – Completion & Impact

Once delivery is confirmed, the system automatically updates:

What Result
Food Post Status Delivered
Food Request Status Completed
Donor & Volunteer Trust Score +5 Points
Leaderboard & Transparency Dashboard Updated With New Delivery
Donor Notification Email Confirmation Sent

πŸ—‚οΈ Project Structure

AhaarBonton follows a multi-app Django architecture β€” functionality is split into four focused apps (core, users, food, delivery) instead of one monolithic app, keeping models and services organized by domain.

Ahaar_Bonton/
β”‚
β”œβ”€β”€ ahaarbonton/                 # Django project package (config)
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   β”œβ”€β”€ asgi.py
β”‚   └── wsgi.py
β”‚
β”œβ”€β”€ core/                         # Shared models, views & core logic
β”‚   β”œβ”€β”€ admin.py
β”‚   β”œβ”€β”€ backends.py
β”‚   β”œβ”€β”€ forms.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ urls.py
β”‚   β”œβ”€β”€ views.py
β”‚   β”œβ”€β”€ migrations/
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ matching.py
β”‚   β”‚   └── notification.py
β”‚   └── management/
β”‚       └── commands/
β”‚           └── expire_food.py
β”‚
β”œβ”€β”€ users/                        # Authentication & account app
β”‚   β”œβ”€β”€ backends.py
β”‚   β”œβ”€β”€ forms.py
β”‚   β”œβ”€β”€ models.py
β”‚   └── services/
β”‚
β”œβ”€β”€ food/                          # Food listings & donation app
β”‚   β”œβ”€β”€ forms.py
β”‚   β”œβ”€β”€ models.py
β”‚   └── services/
β”‚       └── matching.py
β”‚
β”œβ”€β”€ delivery/                      # Delivery & logistics app
β”‚   β”œβ”€β”€ models.py
β”‚   └── services/
β”‚       └── notification.py
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ home.html
β”‚   β”œβ”€β”€ transparency.html
β”‚   β”œβ”€β”€ leaderboard.html
β”‚   β”œβ”€β”€ food_map.html
β”‚   β”œβ”€β”€ heatmap.html
β”‚   β”œβ”€β”€ offline.html
β”‚   β”œβ”€β”€ 403.html
β”‚   β”œβ”€β”€ 404.html
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ login.html
β”‚   β”‚   β”œβ”€β”€ register.html
β”‚   β”‚   β”œβ”€β”€ profile.html
β”‚   β”‚   β”œβ”€β”€ password_reset.html
β”‚   β”‚   β”œβ”€β”€ password_reset_done.html
β”‚   β”‚   β”œβ”€β”€ password_reset_confirm.html
β”‚   β”‚   β”œβ”€β”€ password_reset_complete.html
β”‚   β”‚   β”œβ”€β”€ password_reset_email.html
β”‚   β”‚   └── password_reset_subject.txt
β”‚   β”œβ”€β”€ donor/
β”‚   β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”‚   β”œβ”€β”€ add_food.html
β”‚   β”‚   β”œβ”€β”€ edit_food.html
β”‚   β”‚   └── requests.html
β”‚   β”œβ”€β”€ ngo/
β”‚   β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”‚   β”œβ”€β”€ my_requests.html
β”‚   β”‚   └── request_confirm.html
β”‚   β”œβ”€β”€ volunteer/
β”‚   β”‚   └── dashboard.html
β”‚   β”œβ”€β”€ admin_panel/
β”‚   β”‚   └── dashboard.html
β”‚   β”œβ”€β”€ profiles/
β”‚   β”‚   └── user_profile.html
β”‚   β”œβ”€β”€ reports/
β”‚   β”‚   β”œβ”€β”€ report_post.html
β”‚   β”‚   └── report_user.html
β”‚   └── partials/
β”‚       └── rating_form.html
β”‚
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ manifest.json
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ main.js
β”‚   β”‚   └── service-worker.js
β”‚   β”œβ”€β”€ img/
β”‚   └── favicon/
β”‚
β”œβ”€β”€ media/                    # User-uploaded files (food images, profile pics)
β”œβ”€β”€ Assets/                   # README banners & screenshots
β”‚
β”œβ”€β”€ db.sqlite3
β”œβ”€β”€ manage.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

πŸ› οΈ Tech Stack

Layer Technology
Backend Framework Django 6.0.5
Language Python 3.13.0
Database SQLite (default)
Frontend HTML5, CSS3, JavaScript
Maps OpenStreetMap + Leaflet.js (Free, no API key)
Image Handling Pillow
Templating Django Templates
Offline Support Service Worker (PWA)

πŸš€ Getting Started

Prerequisites

  • Python 3.10 or higher
  • pip

Installation

1. Clone the repository

git clone https://github.com/TajkirHossen-14/AhaarBonton.git
cd Ahaar_Bonton

2. Create and activate a virtual environment

# Windows
python -m venv venv
venv\Scripts\activate

# Linux / macOS
python -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Apply migrations

python manage.py migrate

5. Create a superuser (Optional)

python manage.py createsuperuser

6. Run the development server

python manage.py runserver

Now open your browser and visit http://127.0.0.1:8000 πŸŽ‰

πŸ‘₯ User Roles

Role Description
πŸ‘€ Donor Individuals, restaurants, or businesses that post surplus food
🏒 NGO Organizations that claim food donations and manage distribution
🚴 Volunteer Individuals who help with pickup and delivery of food
πŸ› οΈ Admin Manages users, monitors food posts, and oversees platform activity

🀝 Contributing

Contributions are welcome! If you'd like to improve the platform:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

About

πŸ› A Django-based Surplus Food Redistribution Platform Connecting Donors, NGOs and Volunteers to Reduce Food Waste.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages