What inspired me

The idea came from something I noticed while looking at different businesses and physical work. A lot of businesses struggle to make enough profit, and there are many reasons for that. One thing that stood out to me was the cost of having too many workers, especially when the business isn't generating enough revenue to support them.

Restaurants are a good example. They have to deal with taking orders, managing menus, keeping track of orders, and understanding what customers are buying, while still trying to keep their costs under control.

That made me think: why not use an AI worker to handle some of that work?

That is where this project started. I wanted to build something that could actually act like a worker for a restaurant, not just a chatbot. Right now, the AI can interact with the restaurant's menu, answer customers, help build their orders, calculate the order, ask for their name, and send the confirmed order into the restaurant's system.

But that's not where I want to stop.

The bigger goal is to make the restaurant almost self-running from the digital side. I want the system to eventually help with search engine optimization so the restaurant can get discovered while the owner focuses on the actual business. The restaurant can advertise itself, receive orders, and manage information, while the person mainly has to focus on preparing and delivering those orders.

I also want the system to eventually send the restaurant weekly reports through email. Those reports could show how much the restaurant made, what it spent, and which products customers purchased the most. That way, the owner can actually see what is working and know what products they should focus on.

That's the end goal of the project: an AI worker that doesn't just take orders, but helps run the digital side of a restaurant.

What I learned

Honestly, the biggest thing I learned from building this was improvement.

There were a lot of areas where I had to improve my programming skills while working on the project. I became much more comfortable working with JavaScript and especially building the Node.js backend.

I also learned more about connecting a frontend to a real backend, working with APIs, databases, AI models, and making different parts of an application communicate with each other.

There were definitely things I didn't know at the beginning that I had to figure out along the way. That was probably the most valuable part for me because every problem forced me to understand something better instead of just knowing how to write the code.

How I built it

I built the application as a full-stack web application.

The frontend is built with HTML, CSS, and JavaScript. It has separate pages for the restaurant home page, menu, AI assistant, orders, and dashboard.

For the backend, I used Node.js with Express. I separated the backend into controllers, routes, and services so that different responsibilities weren't all mixed together.

I used Supabase for the database. The database stores things like menu items, orders, order items, and chat-related data.

For the AI part, I connected Google's Gemini API through the backend. The AI receives the restaurant's menu, relevant order information, conversation history, and the current order being built. It then returns structured information that the application can use to display the conversation and build the order.

One thing I specifically wanted was for the AI not to just say that it placed an order. The actual order is only sent to the database after the customer accepts the order. That keeps the AI conversation separate from the actual database operation.

Challenges I faced

There were quite a few small challenges during development.

One of the bigger ones was getting the AI, database, backend, and frontend to communicate correctly. It wasn't enough for one part to work. Everything had to understand the same data.

I also ran into database column mismatches while working on the order system. The backend and database were using different column names for some of the order relationships, which caused the order requests to fail. I had to trace the error back through the backend and database and correct the relationship.

Another challenge was making the AI return information in a format the application could actually use. Instead of just receiving normal text, I needed the AI to return structured order information such as the menu item, quantity, price, and total.

I also had to deal with API availability issues while testing the Gemini integration. At one point, the model returned a 503 error because it was experiencing high demand. That was a good reminder that when you're building on top of an external service, your application also has to deal with things that are outside your own code.

There were also smaller frontend and integration issues, like keeping page links, element IDs, API endpoints, and database fields consistent across the different parts of the application.

Overall, most of the challenges came down to getting all the individual pieces to work together as one actual system. That was also one of the most useful parts of building it.

Share this project:

Updates

Submission history