How miladraza123/oht_acc_sys works
Client One is a static PWA for accounting, inventory, billing, and metal-cutting operations; Supabase provides authentication and the PostgreSQL backend, with no application server. Users work through the app shell and its business screens, while database functions, triggers, and row-level security implement business rules. A separate scheduled job exports Excel and restore-JSON backups by email. The README documents product capabilities not visible in the sampled source; those are represented at the documented directory or page level, and the graph omits uncertain internal wiring.
Main entry points: client1-index.html App shell · 02_tables.sql PostgreSQL data · backup.js Backup exporter · client1-masters.html Masters and reports
Components 18
Browser application
- App shell
client1-index.html - Masters and reports
client1-masters.html - Billing and inventory
client1-billing.html - Daily ledger
client1-daily-ledger.html - Cutting app
client1-cutting.html - Offline shell
sw.js
Business operations
- Accounting services
db - Cutting services
db - Costing engine
db/06_costing_engine.sql - Permissions and RLS
db/10_rls_policies.sql
Database backend
- PostgreSQL data
db/02_tables.sql
Backup
- Backup exporter
backup.js - Excel and restore JSON
backup.js
Other components
- User
- Supabase
- Supabase Auth
- Scheduled runner
- Email service
Connections 21
- User → App shell: opens
- App shell → Masters and reports: embeds
- App shell → Billing and inventory: embeds
- App shell → Daily ledger: embeds
- User → Cutting app: uses
- Masters and reports → Supabase: requests data
- Billing and inventory → Supabase: requests data
- Daily ledger → Supabase: requests data
- Cutting app → Supabase: requests data
- App shell → Offline shell: registers
- Supabase → Supabase Auth: authenticates
- Supabase → PostgreSQL data: accesses
- PostgreSQL data → Accounting services: runs
- PostgreSQL data → Cutting services: runs
- Accounting services → Costing engine: uses
- PostgreSQL data → Permissions and RLS: enforces
- Scheduled runner → Backup exporter: starts
- Backup exporter → Supabase: signs in and reads
- Backup exporter → Excel and restore JSON: generates
- Backup exporter → Email service: emails attachments
- Email service → User: delivers