How kevj-github/au-electronic works
AU Electronic is an Indonesian order-management/POS app for owners and shop-floor helpers. The main workflow is to manage customers, create and fulfill orders, record owner-only payments, and produce invoices or receipts. Dashboard reporting, realtime refresh, role-aware access, and shop settings are important supporting capabilities. The graph follows documented flows and SOURCE INDEX references; unsampled action implementations are represented by their exact listed paths, but their internal calls are not inferred.
Main entry points: dashboard/page.tsx Dashboard · [id]/page.tsx Order fulfillment · server.ts Server client · client.ts Browser client
Components 27
App workflows
- Login / registration
src/app/(auth)/login/page.tsx - App shell
src/components/layout/AppShell.tsx - Customer management
src/app/(app)/pelanggan/page.tsx - Customer form
src/components/pelanggan/PelangganForm.tsx - Customer actions
src/app/(app)/pelanggan/actions.ts - Dashboard
src/app/(app)/dashboard/page.tsx
Orders and documents
- Order lists
src/components/pesanan/OrderList.tsx - Order entry
src/components/pesanan/OrderForm.tsx - Order actions
src/app/(app)/pesanan/actions.ts - Order fulfillment
src/app/(app)/pesanan/[id]/page.tsx - Order row mapping
src/components/pesanan/order-row.ts - Invoice data
src/lib/invoice-data.ts - PDF invoice
src/components/invoice/DocumentPDF.tsx - ESC/P receipt
src/lib/escp.ts - WhatsApp invoice
src/components/invoice/whatsapp.ts - Payments
src/components/pesanan/PaymentModal.tsx
Access and data
- Browser client
src/lib/supabase/client.ts - Server client
src/lib/supabase/server.ts - Request auth / settings
src/lib/supabase/request-cache.ts - Supabase data store
- Realtime refresh
src/components/realtime/RealtimeRefresh.tsx
Settings and integrations
- Shop settings
src/app/(app)/pengaturan/page.tsx - Settings actions
src/app/(app)/pengaturan/actions.ts - Printer setup
src/components/pengaturan/EpsonPrinterSetting.tsx - QZ Tray
src/lib/qz.ts
Other components
- Owner / helper
- Epson printer
Connections 33
- Owner / helper → Login / registration: signs in
README.md - Login / registration → Browser client: authenticates with
src/app/(auth)/login/page.tsx - Owner / helper → Customer management: manages customers
README.md - Customer management → Customer form: renders
src/app/(app)/pelanggan/page.tsx - Customer form → Customer actions: submits changes
src/components/pelanggan/PelangganForm.tsx - Owner / helper → Dashboard: views metrics
src/app/(app)/dashboard/page.tsx - Dashboard → Server client: queries
src/app/(app)/dashboard/page.tsx - Dashboard → Order row mapping: maps orders
src/app/(app)/dashboard/page.tsx - Dashboard → Order lists: renders
src/app/(app)/dashboard/page.tsx - Owner / helper → Order entry: creates orders
README.md - Order entry → Order actions: calls create action
src/components/pesanan/OrderForm.tsx - Order actions → Server client: persists orders
- Owner / helper → Order fulfillment: fulfills orders
README.md - Order fulfillment → Server client: fetches order
src/app/(app)/pesanan/[id]/page.tsx - Order fulfillment → Payments: renders payment UI
src/app/(app)/pesanan/[id]/page.tsx - Owner / helper → Payments: records payment
README.md - Order fulfillment → Invoice data: prepares invoice data
src/app/(app)/pesanan/[id]/page.tsx - PDF invoice → Invoice data: uses invoice data
src/components/invoice/DocumentPDF.tsx - Owner / helper → PDF invoice: exports invoice
README.md - Owner / helper → WhatsApp invoice: shares invoice
README.md - Owner / helper → ESC/P receipt: prints receipt
README.md - ESC/P receipt → Epson printer: prints ESC/P
README.md - Owner / helper → Shop settings: configures shop
README.md - Shop settings → Settings actions: uses settings actions
src/app/(app)/pengaturan/page.tsx - Printer setup → Settings actions: saves settings
src/components/pengaturan/EpsonPrinterSetting.tsx - Printer setup → QZ Tray: configures printer
src/components/pengaturan/EpsonPrinterSetting.tsx - QZ Tray → Epson printer: connects to
README.md - Server client → Supabase data store: reads / writes
src/lib/supabase/server.ts - Browser client → Supabase data store: accesses
src/lib/supabase/client.ts - Request auth / settings → Server client: creates client
src/lib/supabase/request-cache.ts - Order fulfillment → Request auth / settings: checks user / lock
src/app/(app)/pesanan/[id]/page.tsx - Dashboard → Request auth / settings: checks user
src/app/(app)/dashboard/page.tsx - Realtime refresh → Browser client: subscribes via hook
src/components/realtime/RealtimeRefresh.tsx