We frequently find ourselves late a nice craving a good snack but in the cosmopolitan city of Singapore, delivery fees are sky-high. A $3 McSpicy sometimes finds itself with a $10 delivery fee attached to it by the time you order it. In due time, this leads to huge problems with cost, especially as the exam season looms near. This project aims to better manage everyone's wallet by helping to split the cost.


Our bot consists of a simple python script which is constantly listening out for user messages. Once we detect user input, we in turn guide the user through our 3 pre-defined slows

  1. Registration => Here we get information from the User about his preferred supper restaurants and location. This will in turn help us to notify the user in the future when someone in his location orders from his list of preferred restaurants.

  2. Order Placement => When users want to place orders, they simply indicate on the bot where they plan to order from and when they want to order. Relevant users will then be notified once his order is confirmed.

  3. Viewing of Orders => Users can also see existing orders which have not been placed yet. This allows them to potentially hop on to new restaurants that they might be interested in and explore new options!

Challenges we Faced and how we overcame them.

We initially envisioned the service to have a very complicated microservice architecture. As a result, we originally built a small flask application hosted on Heroku, with a dockerized PostgreSQL database to work with the telegram bot script. This however, threw a lot of problems for us when we tried to integrate the microservices. The dockerization also proved difficult because of some configuration issues.

As such, we decided to host the bot locally, with a local database. After attempting to use the TelePot Python Framework, we ended up using the Telegram Bot API directly. Although reading through all the relavant documentation was a tedious process, we managed to implement all the features we wanted after a total of 20 hours of coding.

What We Learned

  • Building a telegram bot for the first time
  • Implementing a conversation handler that users can select from multiple choice options
  • Storing user input data locally
  • Keeping things simple for Hackathons

What's next for our bot

  • ** Automatic Payments ** : One of the biggest limitations of our bot is that we rely on participants to manually handle the payment for the food delivery on their own. This could be potentially solved by integrating an escrow mechanism where their money is held in a 3rd party account or directly linking up with Grab/FoodPanda to allow for this functionality

  • ** Recomender System** : As we collect more data on the preferences of individual users, this will allow us to build a stronger recommender system to help them discover new supper haunts and options which they would otherwise not discover!

  • ** Secure User Data ** : Currently our user data is stored locally in a csv file. We plan to migrate this to using a managed database to allow for safe and secure storage of user data.

  • ** Managed Hosting ** : We plan to migrate our bot to a managed cloud provider to allow for more reliable uptime.

  • ** Delete Old/Expired Orders ** : Implement CronJob to periodically check and delete outdated orders.

Built With

Share this project: