Skip to main content
SOLARQUACK // SYSTEM
CLICK TO ENTER✦
[ INITIATE AUDIO & ARCHIVES ]
CLICK ANYWHERE TO ENTER
000%
ΔPROJECT 04 // CASE STUDY DOSSIER

Moody Foody — AI Ordering Chatbot

Conversational food ordering assistant with structured LLM intent extraction.

PROJECT METADATA DOSSIERINDEX // 04
ROLEBackend & AI Engineer
YEAR2025
DURATION3 weeks
STACKPython, FastAPI, Google Dialogflow, LLM
STATUSLIVE
AUTHORJeel Nada (solarquack)
PROJECT 04 // PLACEHOLDERPENDING CASE STUDY
SEED: moody-foodyIN PROGRESS ↗
00 // SUMMARY STATEMENT

An LLM-driven food ordering conversational assistant with natural language intent extraction, asynchronous FastAPI REST APIs, and normalized MySQL 8 database persistence.

01 // PROBLEM

Standard food ordering websites rely on nested menus, multi-step checkout modals, and rigid search filters. Customers desiring customizations (e.g. "two paneer rolls without onions, and add extra mint sauce to the biryani") find traditional dropdown configurations frustrating and slow.

On the other hand, naive generative chatbots often output unvalidated text, inventing imaginary dishes, quoting wrong prices, or failing to bind customer orders reliably to back-office relational databases.

02 // APPROACH

I engineered Moody Foody as a deterministic intent-action bridge:

  1. 01.
    Intent Extraction Loop: Utilized Google Dialogflow and pluggable LLM integrations (Gemini, OpenAI, local Ollama) to parse unstructured colloquial English into strictly typed intent models (Add Item, Remove Item, Confirm Order, Track Status).
  2. 02.
    Offline Heuristic Fallback Engine: To guarantee 100% uptime during network anomalies or API outages, built a deterministic regex-and-token scoring parser that extracts quantities, items, and modifications locally with zero third-party API dependencies.
  3. 03.
    Atomic Relational Persistence: Enforced atomic multi-table transactions in MySQL 8, ensuring order headers and line item allocations commit or rollback together.
03 // BUILD

The platform is organized into clean, production-grade micro-layers:

  • ―
    Versioned REST API Endpoints: Built endpoints under /api/v1/ for catalog discovery, real-time cart manipulation, order lifecycle transitions (Pending, Preparing, Out for Delivery, Completed), and order history retrieval.
  • ―
    Relational Performance Optimization: Configured composite indices (user_id, created_at DESC) and normalized database schemas, eliminating redundant table scans when fetching past order statuses.
  • ―
    Neo-Brutalist Documentation & Frontend: Designed an accessible high-contrast user interface including an in-app API documentation reader for live testing.
SYSTEM ARCHITECTURE TOPOLOGY
clientCustomer ClientserviceDialogflow / LLM ExtractorworkerFastAPI Order ControllerworkerMenu & Inventory GuardstorageMySQL 8 Relational StoreNatural Language PromptStructured Action PayloadItem Availability CheckAtomic ACID Commit
CLICK "EXPAND & INTERACT" FOR FULLSCREEN CANVAS
04 // LEARNED

Balancing conversational flexibility with relational database constraints highlighted important practices:

  • ―
    Language models should never write directly to database tables; strictly treating LLMs as intent classification engines while delegating state mutations to transactional backend APIs guarantees zero data corruption.
  • ―
    Real-time order management requires immediate, explicit validation feedback so users know their specific customizations are recorded accurately.
EMPIRICAL METRICS & BENCHMARKS
API RUNTIMEAsync
TRANSACTIONSACID
FALLBACKDeterministic
TOOLING JUSTIFICATION
FastAPIAsynchronous ASGI request pipeline with automatic OpenAPI documentation and strict Pydantic validation.
MySQL 8Relational integrity, foreign key cascading, and composite indexing tuned for user order histories.
NEXT DOSSIER // 05✦Ε

Solarquack — Classical Marble Dossier

Classical Greek antiquity meets raw system telemetry and custom WebGL shaders.

↗