πŸ—οΈ Yorkie Bakery – System Architecture Overview

This page provides a technical high-level overview (HLD) of the Yorkie Bakery platform, including backend architecture, AI/ML pipeline, database design, and deployment infrastructure. This is intended for recruiters and engineers evaluating my work.

πŸ“„ View Full System Design (HLD) on GitHub

1. High-Level Architecture Diagram

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚      React + Vite      β”‚
                β”‚  (AI Demo Frontend)    β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚  REST + JSON
                            β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚       FastAPI        β”‚
                  β”‚  Auth / Menu / AI    β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό             β–Ό         β–Ό          β–Ό               β–Ό
PostgreSQL     ChromaDB   OpenAI    AWS S3 (Music)   AWS SES
(Menu/Users)   Vectors    Vision /   Audio Store    Email Verify
                         Embedding
  

2. Backend Architecture (FastAPI)

The backend is a modular FastAPI application deployed on AWS EC2 using Docker Compose. It includes:

API Modules

3. AI Menu Recommendation Pipeline

The AI system uses a two-stage hybrid retrieval approach combining LLM semantic understanding with vector similarity search and strict backend filtering.

Pipeline Steps

  1. **User sends text or image** from the React demo.
  2. FastAPI calls **OpenAI** to extract:
    • category (pastry / dessert / drink)
    • origin (japanese / french / thai / …)
    • flavor profile (sweet, fruity, chewy, creamy)
    • price range
  3. Use **ChromaDB vector store** to retrieve the top 50 candidate menu items.
  4. Apply **server-side filtering** with `apply_all_filters()`.
  5. Rank + return the final result set to React.

Vision Image Flow

Upload Image β†’ FastAPI β†’ OpenAI Vision β†’ Tags/Flavor β†’ Vector Search β†’ Recommendations
  

4. Database Schema

PostgreSQL Tables

ChromaDB Vectors

The embedding store uses OpenAI embedding vectors for each menu item:

{ id, title, tags, flavor_profiles, embedding_vector[] }
  

5. Deployment Architecture

6. Future Enhancements

Oscar avatar Chat with Oscar