How elkanajnrmanullang/pos-glorya-motor works
Glorya Motor POS is a web point-of-sale and workshop-management application for cashier, mechanic, and owner workflows. The main operational path is a cashier opening a session, creating a repair ticket or takeaway sale, recording payment, and closing the session; mechanics handle repair work, while owners manage stock and review performance. The tree and README document these capabilities, and the excerpts confirm dashboard queries and session-closing summaries use Supabase. Most route-level wiring and mutation details were not sampled, so those relationships are shown at subsystem level rather than as invented call chains.
Main entry points: owner/layout.tsx Owner Workspace · kasir/layout.tsx Cashier Workspace · client.ts Supabase Client · mekanik/layout.tsx Mechanic Workspace
Components 32
Access and Shell
- Login
app/(auth)/login/page.tsx - Login Actions
app/(auth)/login/actions.ts - Session Guard
middleware.ts - Cashier Workspace
app/kasir/layout.tsx - Mechanic Workspace
app/mekanik/layout.tsx - Owner Workspace
app/owner/layout.tsx
Cashier Operations
- Cashier Dashboard
app/kasir/dashboard/page.tsx - Close Cash Session
app/kasir/sesi/tutup/page.tsx - Close Session Form
components/kasir/TutupKasirForm.tsx - Customer Directory
app/kasir/customers/page.tsx
Workshop Operations
- Repair Tickets
app/kasir/tiket/[id]/page.tsx - Create Ticket
app/kasir/tiket/buat/page.tsx - Active Queue
app/kasir/tiket/aktif/page.tsx - Takeaway POS
app/kasir/takeaway/page.tsx - Mechanic Dashboard
app/mekanik/dashboard/page.tsx - Mechanic History
app/mekanik/riwayat/page.tsx
Owner Management
- Sales Dashboard
app/owner/dashboard/page.tsx - Stock Management
app/owner/stok/page.tsx - Service Catalog
app/owner/master-jasa/page.tsx - Customer Management
app/owner/customers/page.tsx - Employee Management
app/owner/karyawan/page.tsx - Shift Reports
app/owner/laporan-shift/page.tsx - Performance
app/owner/performa/page.tsx - Transaction History
app/owner/riwayat/page.tsx
Shared Services
- Owner Dashboard Query
hooks/use-owner.ts - Cashier Data Hooks
hooks/use-tiket.ts - Stock Data Hooks
hooks/use-owner-stok.ts - Supabase Client
lib/supabase/client.ts - Server Supabase Client
lib/supabase/server.ts - Database Types
lib/types/database.types.ts
Other components
- Staff
- Supabase Auth and Database
Connections 34
- Staff → Login: signs in
- Login → Login Actions: submits credentials
- Login Actions → Supabase Auth and Database: authenticates
- Session Guard → Supabase Auth and Database: validates session
- Staff → Cashier Workspace: uses cashier role
- Staff → Mechanic Workspace: uses mechanic role
- Staff → Owner Workspace: uses owner role
- Cashier Workspace → Cashier Dashboard: opens dashboard
- Cashier Workspace → Close Cash Session: closes session
- Close Cash Session → Close Session Form: renders form
- Close Session Form → Supabase Client: queries summaries
- Supabase Client → Supabase Auth and Database: reads and writes
- Cashier Workspace → Create Ticket: starts repair sale
- Create Ticket → Repair Tickets: opens ticket
- Cashier Workspace → Active Queue: checks queue
- Cashier Workspace → Takeaway POS: starts retail sale
- Cashier Workspace → Customer Directory: manages customers
- Customer Directory → Supabase Client: uses data client
- Cashier Data Hooks → Supabase Client: uses data client
- Mechanic Workspace → Mechanic Dashboard: opens dashboard
- Mechanic Workspace → Mechanic History: views history
- Owner Workspace → Sales Dashboard: opens dashboard
- Sales Dashboard → Owner Dashboard Query: requests metrics
- Owner Dashboard Query → Supabase Client: queries transactions
- Owner Workspace → Stock Management: manages inventory
- Stock Management → Stock Data Hooks: uses stock data
- Stock Data Hooks → Supabase Client: uses data client
- Owner Workspace → Service Catalog: manages service catalog
- Owner Workspace → Customer Management: manages customers
- Owner Workspace → Employee Management: manages employees
- Owner Workspace → Shift Reports: reviews shifts
- Owner Workspace → Performance: reviews performance
- Owner Workspace → Transaction History: reviews transactions
- Server Supabase Client → Supabase Auth and Database: connects server-side