How landmark-github/dreamicecream works
This is a Thai-language store operations app for managing members, products, daily stock checkout/returns, bills, expenses, supplies, and business records. The main workflow is selecting a member and recording stock movement in the ledger, with shared state persisted through Firebase and bills available for print preview. Other pages cover administration, supply operations, reporting, and data export. Relationships reflect sampled code and SOURCE INDEX references; several page implementations were not excerpted, so their internal interactions are not inferred.
Main entry points: store.ts Application state · firebase.ts Firebase setup · ledger/page.tsx Checkout ledger · settings/page.tsx Settings
Components 27
Store Operations
- Home dashboard
app/page.tsx - Checkout ledger
app/ledger/page.tsx - Product table
components/product-table.tsx - Bill print preview
components/ledger/bill-print-preview-dialog.tsx - Transactions
app/transaction/page.tsx - Supply management
app/supply/page.tsx - Supply orders
app/supply-orders/page.tsx - Work mode
app/modework/page.tsx
Business Records
- Bill records
app/bills/page.tsx - Expense tracking
app/expenses/page.tsx - Activity logs
app/logs/page.tsx - Data export
app/data/page.tsx - Batch export
components/data/batch-export-dialog.tsx
Administration
- Member management
app/members/page.tsx - Product management
app/products/page.tsx - Settings
app/settings/page.tsx - Member settings
components/member-settings.tsx - Product settings
components/product-settings.tsx - User settings
components/user-settings.tsx - Login
app/login/page.tsx
Shared Services
- Ledger calculations
lib/ledger-utils.ts - Authentication guard
components/auth-guard.tsx - Application state
lib/store.ts - Domain models
lib/types.ts - Firebase setup
lib/firebase.ts
Other components
- Store staff
- Cloud Firestore
Connections 36
- Store staff → Home dashboard: opens app
- Store staff → Login: signs in
- Store staff → Checkout ledger: records stock
- Home dashboard → Authentication guard: checks access
app/page.tsx - Authentication guard → Application state: reads state
components/auth-guard.tsx - Home dashboard → Application state: reads state
app/page.tsx - Checkout ledger → Application state: updates bills
app/ledger/page.tsx - Checkout ledger → Product table: renders
app/ledger/page.tsx - Checkout ledger → Ledger calculations: uses calculations
app/ledger/page.tsx - Checkout ledger → Bill print preview: opens preview
app/ledger/page.tsx - Bill print preview → Ledger calculations: formats bill
components/ledger/bill-print-preview-dialog.tsx - Transactions → Application state: reads and updates
app/transaction/page.tsx - Bill records → Firebase setup: uses Firebase
app/bills/page.tsx - Expense tracking → Application state: reads and updates
app/expenses/page.tsx - Supply management → Application state: reads and updates
app/supply/page.tsx - Supply management → Firebase setup: uses Firebase
app/supply/page.tsx - Supply orders → Firebase setup: uses Firebase
app/supply-orders/page.tsx - Work mode → Application state: uses shared state
app/modework/page.tsx - Work mode → Firebase setup: uses Firebase
app/modework/page.tsx - Activity logs → Firebase setup: uses Firebase
app/logs/page.tsx - Data export → Application state: reads state
app/data/page.tsx - Data export → Firebase setup: uses Firebase
app/data/page.tsx - Data export → Batch export: opens export
app/data/page.tsx - Batch export → Application state: reads state
components/data/batch-export-dialog.tsx - Member management → Application state: manages members
- Product management → Application state: manages products
- Settings → Authentication guard: checks access
app/settings/page.tsx - Settings → Member settings: renders
app/settings/page.tsx - Settings → Product settings: renders
app/settings/page.tsx - Settings → User settings: renders
app/settings/page.tsx - Member settings → Application state: updates members
components/member-settings.tsx - Product settings → Application state: updates products
components/product-settings.tsx - Application state → Firebase setup: persists data
lib/store.ts - Firebase setup → Cloud Firestore: reads and writes
lib/firebase.ts - Application state → Domain models: uses domain models
lib/store.ts - Ledger calculations → Domain models: uses domain models
lib/ledger-utils.ts