Inspiration

Weddings and other large events often need to plan food for many guests, and attendance is hard to predict. This can leave good food unused, while NGOs may be able to put it to use.

The challenge is getting it to them in time. A provider needs to know who can collect it, an NGO needs to know where it is, and both need confidence in the handover. We built KalyanaKonnection to connect event food providers with NGOs for fast, verified and transparent pickup.

What it does

KalyanaKonnection is a role-based food surplus redistribution platform with three portals:

  • Providers add surplus food with mahal details, quantity, location and a photo, mark it ready for requests, and verify the pickup.
  • NGOs find surplus nearby, view provider details, request pickup, track allocations, and submit reviews or complaints.
  • Admins view analytics, manage users, events, allocations and complaints, and check system health.

How we built it

  • Backend: Flask, with a separate structure for models, role-based route blueprints and services
  • Database: PostgreSQL with SQLAlchemy, using Flask-Migrate (Alembic) for schema changes
  • Real-time updates: Flask-SocketIO events that refresh dashboards after important actions
  • Security: email OTPs for registration and password recovery, password hashing, CSRF protection with Flask-WTF, and rate limiting with Flask-Limiter
  • Location matching: geocoding with OpenStreetMap Nominatim and distance filtering with the haversine formula

Finding nearby food

We convert locations into coordinates, then calculate the great-circle distance between the NGO and the surplus food:

$$ d = 2R \arcsin\left(\sqrt{\sin^2\left(\frac{\phi_2 - \phi_1}{2}\right) + \cos\phi_1 \cos\phi_2 \sin^2\left(\frac{\lambda_2 - \lambda_1}{2}\right)}\right) $$

Here, \(\phi\) is latitude and \(\lambda\) is longitude (both in radians), and \(R \approx 6371\) km is the Earth's mean radius. A listing falls within the search area when \(d \le r\), where \(r\) is the NGO's chosen radius.

Verifying the handover

  1. The provider marks the surplus as ready.
  2. An NGO requests pickup and receives a 6-digit code.
  3. At handover, the provider enters the NGO's code.
  4. If the code is correct, the allocation is completed and the receiver status changes to received.

Challenges we faced

  • Turning addresses into useful matches: Event venues are described in text, but distance calculations need coordinates. We combined geocoding with radius-based filtering. Haversine gives straight-line distance over the Earth's surface, not road distance or travel time.
  • Designing a trustworthy handover: A pickup request alone doesn't show that food was collected. We linked completion to the receiver's pickup code.
  • Keeping dashboards current: Providers, NGOs and admins need to see changes made by others. We used Socket.IO events to trigger dashboard refreshes.
  • Managing three roles: Each role has different tasks, so we organized the app into separate portals and route blueprints.

What we learned

  • A useful platform has to support the whole process, from listing food to confirming its collection.
  • Separating routes, models and services gives each part of the app a clear responsibility.
  • Location matching depends on both the distance calculation and the quality of the coordinates.
  • Verification, security and moderation matter when different groups depend on the same platform.

What's next

We plan to add weather-aware pickup prioritization, trust scoring and predictive surplus analytics, and to expand automated testing.

Built With

Share this project:

Updates

Submission history