Inspiration
The inspiration came from observing the friction in modern drive-thru experiences. Customers often struggle with unclear menu boards, language barriers, or complex ordering processes, while staff deal with repetitive order-taking tasks. I saw an opportunity to leverage advances in AI language models to create a more natural, conversational ordering experience that feels like talking to a knowledgeable friend rather than navigating a rigid menu system.
What it does
A drive-thru ordering system that understands normal human speech. You can say "I want two burgers and my friend wants fries" and it figures out that's 2 burgers + 1 fries. More importantly, you can modify existing orders naturally - "update order 1 with no fries and 2 more drinks" - without creating a new order. It handles placing, modifying, and canceling orders through conversational language.
How we built it
Backend: FastAPI with a clean service layer. Built an AI provider system that works with both OpenAI and Gemini APIs. The tricky part was getting consistent function calling from both providers and handling complex order modifications properly. Frontend: SvelteKit with functional programming patterns. Separated UI components from business logic completely. Used Svelte stores for state management and kept everything typed with TypeScript. AI Integration: Spent significant time on prompt engineering to handle edge cases like "remove all fries" vs "remove 2 fries" and multi-person orders. Used native function calling APIs from both providers. Deployed both to Vercel, though FastAPI on Vercel required some workarounds.
Challenges we ran into
- Getting AI to consistently parse complex modifications was harder than expected. "Update my order 1 with 2 more burgers and no fries" has multiple operations that need to be parsed correctly.
- Gemini's function calling documentation was sparse - I initially built manual JSON parsing before discovering it had native function calling support, requiring a complete rewrite.
- FastAPI deployment on Vercel needed specific structuring. Spent too much time debugging CORS issues that turned out to be app startup problems.
- Keeping order IDs consistent during modifications while maintaining data integrity required careful state management.
Accomplishments that we're proud of
- Built a working AI ordering system that actually handles complex requests reliably. The order modification feature works better than some commercial systems I've used.
- Created clean, maintainable code using functional programming principles. The codebase is genuinely easy to extend and test.
- Successfully abstracted AI providers so switching between OpenAI and Gemini is just a config change.
- Deployed a full-stack application to production with proper error handling.
What we learned
- AI APIs evolve quickly - designing flexible abstractions is crucial when working with rapidly changing technology.
- Functional programming patterns really do make complex state management more predictable and debuggable.
- Deployment architecture should be considered early in development. Some decisions I made for local development created unnecessary complexity in production.
- Natural language processing is only as good as your error handling and user feedback systems.
What's next for Drive Thru Ordering System
Immediate improvements: Add voice input, better error messages, and order history persistence. Advanced features: Menu item customizations ("no pickles"), dietary restriction parsing, and integration with actual POS systems. Scale considerations: Real-time order updates, analytics dashboard, and multi-location support.
The foundation is solid for expanding into a complete drive-thru solution, but the core ordering and modification system works well as-is.
Built With
- fastapi
- sveltekit
- vercel
Log in or sign up for Devpost to join the conversation.