How tharungowda03/cake-box-bakery works
Cake Box Kakinada is a bakery storefront and operations platform. Customers browse the live catalogue, build a cart, check out for delivery or pickup, and track orders; custom-cake requests follow a separate owner-reviewed quotation workflow. Owners manage orders, products, settings, and business knowledge. The server validates commerce and delivery rules, while the chat assistant retrieves approved knowledge and live catalogue context before answering. The map combines sampled client/service code with README-documented capabilities; unsampled route internals are represented only where documented.
Main entry points: apiService.ts API client · App.tsx Application router · app.ts API application · supabase.ts Supabase access
Components 24
Storefront
- Application router
client/src/App.tsx - Catalogue browsing
client/src/services/catalogueService.ts - Home showcase
client/src/services/showcaseService.ts - Authentication
client/src/contexts/AuthContext.tsx
Ordering
- Cart
client/src/contexts/CartContext.tsx - Checkout
client/src/pages/CheckoutPage.tsx - Orders and tracking
client/src/pages/OrdersPage.tsx - Custom cake requests
client/src/pages/CustomCakePage.tsx
Bakery operations
- Owner dashboard
client/src/pages/OwnerDashboardPage.tsx
Backend services
- API client
client/src/services/apiService.ts - API application
server/src/app.ts - Order endpoints
server/src/routes/orders.ts - Custom-order endpoints
server/src/routes/customOrders.ts - Owner endpoints
server/src/routes/owner.ts - Delivery calculation
server/src/services/deliveryService.ts - Supabase client
client/src/lib/supabase.ts - Supabase access
server/src/config/supabase.ts
AI assistant
- Chat interface
client/src/components/chat/ChatWidget.tsx - Chat endpoint
server/src/routes/chat.ts - Knowledge retrieval
server/src/services/ragService.ts
Other components
- Customer
- Owner
- Supabase PostgreSQL
- Gemini AI
Connections 34
- Customer → Application router: uses
- Owner → Application router: uses
- Application router → Catalogue browsing: loads catalogue
- Catalogue browsing → Supabase client: queries products
- Supabase client → Supabase PostgreSQL: reads catalogue
- Application router → Home showcase: loads slides
- Home showcase → API client: requests slides
- Application router → Authentication: provides session
- Authentication → Supabase client: authenticates
- Customer → Cart: adds products
- Cart → Checkout: supplies cart
- Checkout → API client: submits order
- API client → API application: sends API request
- API application → Order endpoints: dispatches orders
- Order endpoints → Delivery calculation: checks delivery
- Order endpoints → Supabase access: validates and stores
- Supabase access → Supabase PostgreSQL: reads and writes
- API client → Orders and tracking: returns order data
- Application router → Custom cake requests: opens request flow
- Custom cake requests → API client: submits request
- API application → Custom-order endpoints: dispatches requests
- Custom-order endpoints → Supabase access: stores requests
- Owner → Owner dashboard: manages bakery
- Owner dashboard → API client: requests operations
- API application → Owner endpoints: dispatches owner APIs
- Owner endpoints → Supabase access: manages business data
- Customer → Chat interface: asks question
- Chat interface → API client: sends chat
- API application → Chat endpoint: dispatches chat
- Chat endpoint → Knowledge retrieval: builds context
- Knowledge retrieval → Gemini AI: embeds query
- Knowledge retrieval → Supabase access: retrieves knowledge and products
- Knowledge retrieval → Chat endpoint: returns context
- Chat endpoint → Gemini AI: generates answer