How klisarsana/warcoffe-13 works
Warcoffe 13 is an owner-only café management web app. The owner signs in, then records sales through POS or operational expenses, maintains the menu and stock, and reviews transaction history, dashboard summaries, and monthly reports; an AI assistant offers chat and owner-confirmed transaction drafts. The shared business context coordinates domain data and persistence, while calculation and formatting utilities support views. Relationships reflect README statements and source-index references; unsampled implementation details are not inferred.
Main entry points: warcoffe-context.tsx Business State · ai-adapter.ts AI Service Adapter · page.tsx AI Assistant UI · auth-context.tsx Auth Provider
Components 24
Owner Access
- Owner Login
src/app/page.tsx - Auth Provider
src/context/auth-context.tsx - Auth Helpers
src/lib/auth.ts - Protected App Shell
src/components/layout/app-shell.tsx
Business Operations
- Point of Sale
src/app/pos/page.tsx - Transaction History
src/app/transactions/page.tsx - Expense Management
src/app/expenses/page.tsx - Menu Management
src/app/menu/page.tsx - Stock Management
src/app/stock/page.tsx
Business Insights
- Dashboard
src/app/dashboard/page.tsx - Monthly Reports
src/app/reports/page.tsx
Shared Data and Services
- Business State
src/context/warcoffe-context.tsx - Persistence Adapter
src/lib/supabase.ts - Supabase Auth
- Business Data Store
- Business Calculations
src/lib/calculations.ts - Locale and CSV Utilities
src/lib/format.ts - Official Menu Seed
src/lib/menu-seed-data.ts
AI Assistant
- AI Assistant UI
src/app/ai-assistant/page.tsx - AI Service Adapter
src/lib/ai-adapter.ts - Transaction Parse Proxy
src/app/api/ai/parse-transaction/route.ts - Chat Proxy
src/app/api/ai/chat/route.ts
Other components
- Business Owner
- FastAPI AI Service
Connections 38
- Business Owner → Owner Login: signs in
README.md - Owner Login → Auth Provider: uses auth
src/app/page.tsx - Auth Provider → Auth Helpers: delegates auth
src/context/auth-context.tsx - Auth Helpers → Supabase Auth: authenticates with
src/lib/auth.ts - Auth Provider → Persistence Adapter: checks configuration
src/context/auth-context.tsx - Protected App Shell → Auth Provider: reads session
src/components/layout/app-shell.tsx - Protected App Shell → Business State: reads storage mode
src/components/layout/app-shell.tsx - Business Owner → Point of Sale: records sales
README.md - Business Owner → Expense Management: records expenses
README.md - Business Owner → Menu Management: manages catalog
README.md - Business Owner → Stock Management: updates stock
README.md - Business Owner → Transaction History: reviews records
README.md - Point of Sale → Business State: creates sales
src/app/pos/page.tsx - Expense Management → Business State: manages expenses
src/app/expenses/page.tsx - Menu Management → Business State: manages menu
src/app/menu/page.tsx - Stock Management → Business State: manages stock
src/app/stock/page.tsx - Transaction History → Business State: edits records
src/app/transactions/page.tsx - Business State → Persistence Adapter: loads and persists
src/context/warcoffe-context.tsx - Persistence Adapter → Business Data Store: reads and writes
src/lib/supabase.ts - Business State → Official Menu Seed: loads seed data
src/context/warcoffe-context.tsx - Dashboard → Business State: reads business data
src/app/dashboard/page.tsx - Monthly Reports → Business State: reads business data
src/app/reports/page.tsx - Dashboard → Business Calculations: calculates summaries
src/app/dashboard/page.tsx - Monthly Reports → Business Calculations: calculates reports
src/app/reports/page.tsx - Point of Sale → Business Calculations: validates sales
src/app/pos/page.tsx - Stock Management → Business Calculations: calculates stock
src/app/stock/page.tsx - Dashboard → Locale and CSV Utilities: formats values
src/app/dashboard/page.tsx - Monthly Reports → Locale and CSV Utilities: formats and exports
src/app/reports/page.tsx - Business Owner → AI Assistant UI: asks and drafts
README.md - AI Assistant UI → AI Service Adapter: sends requests
src/app/ai-assistant/page.tsx - AI Assistant UI → Business State: reads business context
src/app/ai-assistant/page.tsx - AI Service Adapter → Transaction Parse Proxy: posts draft request
src/lib/ai-adapter.ts - AI Service Adapter → Chat Proxy: posts chat request
src/lib/ai-adapter.ts - Transaction Parse Proxy → AI Service Adapter: uses adapter
src/app/api/ai/parse-transaction/route.ts - Chat Proxy → AI Service Adapter: uses adapter
src/app/api/ai/chat/route.ts - Transaction Parse Proxy → FastAPI AI Service: forwards parse request
README.md - Chat Proxy → FastAPI AI Service: forwards chat request
README.md - AI Assistant UI → Business State: saves confirmed drafts
README.md