Thanks to Servian Microsoft’s combined participation to initiate Azure Hackathon 2021. This proposal jolted our minds with surplus ideas for problems that we never imagined could have a solution.
After several brainstorming sessions on the weekdays and on the weekends, John and I came up with an organized system to minimise and reduce hunger as well as wasting foods.
To give a context on the problem statement, There are tons of food being disposed of every day. This excess in food can be otherwise utilized by people who are in great need of this. This project aims at forming a relationship between producer and consumer thereby completely minimizing the wastage of food and making sure that everyone in need gets a share of this surplus food.
We have 3 personas... Producer, Collector and Consumer Hub. Anyone who wants to share food is a Producer. A consumer hub is a centralized location where collected foods are stored and disbursed to Consumer persona. A Personnel who gets assigned a task to collect food from Producer to Consumer Hub is a Collector Persona. Collector Persona can also be a Producer if they intend to take up the delivery task themselves.
Mohamed Fazaary A S, Bengaluru — https://www.linkedin.com/in/fazaary/
John Lee, Sydney — https://www.crunchbase.com/person/john-lee-34
- Evenly distributed food for people
- Analyse the concentration of people where they are great in numbers and extend the capabilities of this project by exposing this data to encourage more philanthropic activities.
- Increase the number of hubs and establish a network of people and restaurants so we all always have food coming in from at least one restaurant to a hub once, twice or thrice a day.
- Implement demand forecasting algorithms to automatically have food sent to required hubs by potential producers.
- Encourage participation of restaurants by advertising top contributing statistics restaurants in social media platforms with hashtags.
This is going to be a simple web application where restaurants will specify the frequency of meals distribution, the location where they can deliver the food to and the headcount they can serve on their delivery.
We start simple with one hub, where we collect data of recipients such as their name and their preferred location to collect food. This raw information will be used to solve our problem by aggregating location and headcount information thereby helping us shape our distribution model so we can always make sure the Food reaches where there is great demand.
Another outcome of this data is that it enables us to look for restaurants within a radius, say, X, X+3, X+6 miles etc.. thereby finding more partners to a hub and also creating more hubs across the region. Collecting data from newly spawned hubs will enable Restaurants or Collector persona to pick a location where they should be delivering food based on the traffic insights from the data we collected.
The commanding force for “who should deliver where” will be dictated by the app with the help of our SMART algorithm which provides options for restaurants to deliver food in the order of their location preferences. Alternatively, Collector persona can also choose their own choice of hubs based on their proximity across different destination locations.
We forecast consumers to be ID-Verified so we can gather information about who collects what, how often and where. This helps to shape our demand forecast algorithm in the long run. We can present this data to open donations, attract philanthropists and actually make a change.
We built our POC as a web app as well as tested our endpoints through the Xamarin app.
Our App architecture is really Simple..
A user facing ReactJS app, Served by NodeJS based on REST API requests.
NodeJS uses Sequelize ORM to easily talk to Azure SQL DB. And as for Storing our credentials and secrets, we use Azure Key Vaults. We also make use of SignalR to inform updates to frontend Web app about job listings regarding food delivery real time.
Landing Page — This is where persona selection happens
Azure App Service
Owing to its simplicity and as per trusted Advisor’s advice, Nick ward from Microsoft, App service became our choice of deploying our ReactJS frontend and NodeJS endpoint as two app services.
Our hosted web app. Below is where producer persona would add entries for food that is to be dispatched to the Consumer Hub
Food Collector will be notified through Push events which appears as Toast notifications. They can choose and assign themselves to the job.
In Some cases, Producers themselves would like to deliver the food. We support that as well.
Collector can choose which hubs to deliver to.
Finally, Drop off happens when Collector authenticates OTP with the Consumer Hub.
We refresh OTP for Hubs every 24 hours to enforce some governance over random or untracked delivery.
Azure SQL DB
Establishes Relational DB hierarchy amongst Food Producer, Consumer, Consumer Hub and Collector who help producers deliver food. It is also used to store information about each food transaction and enable audits using timestamps per transit during the course of delivery, ie, Food prepared, Dispatched, Picked up for Delivery, Arrived at Consumer Hub and finally delivered.
Our simple schema design is here
https://raw.githubusercontent.com/Fazaarycode/AzureHackathonFoodShareApp/main/schema.sql and we used Sequelize ORM to push updates to Azure SQL DB from NodeJS App. We created seeders for our testing purposes.
Used to show the shortest, fastest route from Producer location to collectors’ as well as Consumer Hubs’ location based on real-time traffic. We also implemented Path-tracing as a functional assistant to refer to the routes.
Here’s a small glimpse of Azure Maps with Animated path tracing from our development changes with a high tolerance for Response Web Design :D
Azure KeyVaults help us secure our tokens using the Managed Identity feature. For local development, we made use of the default credentials strategy. These secrets include Database username, password, connection string as well as secret key for map accounts.
Visualize concentration of congregation in one given location and so on.., construct a SMART algorithm based on these analytics to engage restaurants to bring foods to X location of their choice. Exposing this corpus would enable more business to come along this way, even attempting for a government scheme, mandated in the path of philanthropy.
Azure DevOps, Microsoft Planner
We used pipelines to deploy our application. We used Kanban Methodology and kept track of our progress using Microsoft Planner.
Our Eagle view of our Past Present and Future.
Azure SignalR, EventHubs
Partial implementation of SignalR, EventHubs to send push notifications to our web app and our mobile-friendly Xamarin application in the event of assigning a collector for a pickup or informing producers about the delivery of their food to a consumer hub
Future technical goals involve integrating Azure Active Directory and fulfilling implementation of SignalR using webhooks and similar technologies as well as making the map more mobile-friendly.
The data collected such as food consumption patterns, age groups, ethnicity amongst consumers allow us to understand the required need for food as desired by people attracting potlucks for strangers, sponsored food fest or even organized daily-free-food initiatives by the government or through philanthropists.
We anticipate making the consumer hubs unmanned — such as vending machines, so as to reduce manual labour and automating the process of dispatching consumer verification & Identity card issuance as well as tagging their profile to the food collected which enable us to trace back every packet of food to each consumer thereby maintaining the integrity of the chain.
Blockchain is also likely to be a great candidate for this sort of transaction, all the way from a Producer to a consumer, thereby eliminating any excuses for starvation, misusing the process or unavailability of available resources.
We placed as first Runners up in Servian Microsoft Azure Hackathon 2021 for our MVP demonstration!