Skip to content

sr5434/chatbot-kitchen

Repository files navigation

Project for the 2024 Taskformer AI Hackathon

Test here

Problem and Solution

Think about how many phone orders a restaurant manager cannot attend to during peak hours. This can make customers angry and cost the restaurant sales. Many restaurant owners have complained about their limitations online. One Reddit user writes, "Yes it’s a problem. I have expanded to a three line phone system and have 3 people answer phones constantly plus confirming online orders, doing curbside etc". Chatbot Kitchen can solve this problem by automating the handling of these orders. It allows restauranteurs to create custom chatbots for use by their customers easily. Once created, a restaurant's chatbot will post customer orders on a dashboard. After the chatbot takes the customer's order, they will be prompted to pay for their food, meaning a restaurant owner just has to hand the customer their food.

Development process

Initially, I wanted to make the chatbots WhatsApp-based. However, I soon found that it would be difficult to scale since there is a limit to how many bots can be created. Therefore, I decided to implement the chatbot interface myself. I created a basic NextJS dashboard with Clerk authentication and a Cloud Firestore database. When a user created their account, the backend creates a GPT-4o-powered assistant by plugging the user's inputs into a prompt template. It would then create a document in Firestore including the inputs provided by the user as well as the ID associated with the assistant. The frontend has polling so the business doesn't have to reload the page every time they wish to see the latest orders. Clerk was protecting the route when I tried to make the page for using the chatbots public. This would require a customer to have a business to use the app. After seeking help from Clerk support, I fixed the route protection code to make the chatbot page public. Then, I added the ability for businesses to edit their chatbots and a way to add ingredients to their dishes. On the customer side, I added the ability to track orders and pay for food online using Stripe. Instead of immediately adding the order to Firestore, we would redirect the user to Stripe Checkout. Upon payment, they would be redirected to a special page that creates the user's order, and finally redirected to the tracking page for the order. To implement order tracking, I set up polling on the frontend. Every ten seconds, the frontend would fetch the latest order status. After this, I deployed my app to Google Cloud Run. Because Google Cloud Run is a serverless platform, the app should never have too much or too little compute allocated.

Future

In the future, I plan to buy a domain and launch this in production. I can also get ads on platforms such as Facebook and Google to spread the word about my software.

About

An AI Agent builder for restauranteurs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published