How kaffe-diem/kaffediem works
Main Components
Frontend Layer:
• Client-side application (Svelte)
• Public facing routes (/account, /tos)
• Admin routes (/admin/orders/kitchen, /admin/orders/frontdesk)
• Routes (/display)
• Component structure (under src/lib/components)
• Store management (src/lib/stores)
Backend Layer:
• PocketBase database (indicated by pocketbase directory and configuration)
• Server-side logic (hooks.server.ts)
• API endpoints
Infrastructure:
• Firebase Hosting (indicated by .firebaserc and firebase.json)
• GitHub Actions CI/CD (.github/workflows)
[Client Layer]
• ↑↓
[Application Layer]
• ↑↓
[Data Layer]
• ↑↓
[Infrastructure Layer]
Component Relationships
• Frontend stores (authStore, menuStore, messageStore, orderStore) and their corresponding components
• PocketBase client (src/lib/pocketbase) and the stores
• Admin interfaces and their respective backend services
• System and order management system
Detailed Component Breakdown
Frontend Modules:
[Public Routes] --- [Admin Routes] --- [Display Routes]
• ↓ ↓ ↓
[Shared Components: Nav, Footer, Rating, etc.]
• ↓
[Stores: Auth, Menu, Message, Order]
• ↓
[PocketBase Client]
Backend Services:
[PocketBase Database]
• ↑
[Server Hooks]
• ↑
[API Layer]
Additional Elements
Include:
• Environment configuration flow
• Build and deployment pipeline
• Error handling and state management
• User role separation (admin vs customer)