Food deserts are areas in the United States where it is difficult for citizens to buy local groceries because of a lack of transportation, and a lack of local grocery stores. That is why we decided to build FoodPoint, a connected platform bringing local farmers and local people who are in need, together.

How it works

Buyers who wish to find local food in their area would simply press the Buy button, enter in their name and email information, and their position in the world will be logged. In addition, Buyers have the option to be added to the list of a preexisting Farmer's Market, allowing Farmers to determine which areas are the most populated areas to sell. Buyers will receive updates from that particular trending farmer's market when the market has reached more than a certain number of farmers. On the other hand, sellers/farmers press the Sell Button and enter in their name and email information. They not only will be able to see every buyer's location, but preexisting markets that they can join. Once they join a preexisting market, a confirmation email is sent to them.

We used the iOS as the native application platform. We used FireBase's API to store the informations about Buyers, Sellers, and Markets, as well as the latitude and longitude of each object. We also used a Node.js server to not only process the FireBases's data and remove any unnecessary data, but be the intermediate step to sending emails through the SendGrid API. To make an email call, the iphone stores a request full of information about the event and the person is attending the event. This data is stored into Firebase which is immediately tracked by our Node.js server that parses the information, sends an email to the recipients, and then deletes the request from Firebase after it is done. It was a tedious process but we were able to complete it.

Challenges we ran into

One of the biggest challenges was perhaps getting the current location services to work on Google Maps. Supposedly when you open the app, you are automatically shown your current position. However, because of iOS 8, developers now have to add 2 lines to the end of the projects info.plist to activate the locations authentication and enable location services. Brian didn't realize this after 3 hours of researching for answers.

The second biggest challenge was the Firebase API. we had some massive issues with parsing because even though we would think that raw String data would go into the Firebase server, it always ended up looking like a weird reference to a UIWindow or a completion block address. We are still working on this problem, albeit it isn't a significant blow to our project.

Another big problem was getting the Sendgrid API to work. at one point it was not sending any emails, and at another point it was sending way too many. It was extremely fragile to handle the "real-time changes" that Firebase allowed us to utilize because the changes were constantly being called. We solved that by implementing rules for Firebase in the security section. We restricted the message calls by only writing when data exists and if there is new data: ".write": "!data.exists() && newData.child('from').val() ==".

Overall the project was very difficult, perhaps one of the largest projects that we've ever done. Even if it isn't exactly perfect, we learn so much from our experiences with the 3 APIs that it was worth working all night at HackDuke for.

Accomplishments that I'm proud of

We believe that our application is awesome because it addresses a serious issue in society. It fosters community participation and can be a potential gateway for a more integrated community of farmers, while also helping those who are in need of fresh, local, and organic groceries. We also believe that our system of gathering data is an excellent form of data collection and has a potential for large scale data analysis projects regarding food deserts. Finally, we implemented a lot of functionality into our program, from being able to send messages to Buyers and Sellers when markets are open, to being able to choose which market sellers can join and become a part of.

We are especially proud of ourselves, because this was a very large and difficult project for all of us. 3 brand new APIs that we've never worked on, and new languages to learn. We tested our limits with this project and we're very proud that we were able to come out with a product.

What I learned

I learned a lot about the Food Desert problem in America today. Many people are left to buy food from their local gas stations simply because of a lack of access to grocery stores. I also learned about parsing information, specifically JSON, learn much about iOS and it's syntax, and about the Google Maps, and Sendgrid APIs. The three APIs that we used were solid APIs and we look forward to working with them again.

What's next for FoodPoint

FoodPoint is looking for a big update. We may have a prototype but it's not quite there yet. We need to be able to optimize for real-time data and large scale data analysis. Our application became quite slow, so we also have to consider multi-threading and promoting efficiency in our algorithms. Running on low sleep is no way to code a very serious and important application. Expect an update on FoodPoint in the near future.

solving world hunger and hunger logistics

Share this project: