How yrmfernandez/dayong-temporary-system works
Dayong System is a company-operations web application. The primary clerk workflow is clearing receipts, encoding sales or collections, attaching receipt photos, and submitting remittances for approval. Other documented product areas include member/program administration, finance, staff management, attendance, leave, payroll, reports, MAM, SOA, and dashboards. The graph combines README-described capabilities with the sampled routes and modules; unsampled subsystems are represented by exact paths from the tree, without asserting internal calls that were not shown.
Main entry points: api API routes · route.ts Entry APIs · google-sheets-data.ts Operational data access · db.ts PostgreSQL database
Components 29
Daily operations
- Clearing
app/clearing/page.tsx - New Sales
app/new-sales/page.tsx - Collections
app/collections/page.tsx - Entry APIs
app/api/sales/route.ts - Collection API
app/api/collections/route.ts - My Entries
app/my-entries/page.tsx - Receipt photos
lib/photo-storage.ts - Remittance approval
app/remittances/page.tsx - Remittance workflow
lib/remittance-workflow.ts
Members and programs
- Member records
lib/member-records.ts - Programs
app/programs/page.tsx - Member directory
app/members/page.tsx - MAM
app/mam/page.tsx - Statement of account
app/soa/page.tsx
Finance and reporting
- Finance operations
lib/finance-operations.ts - Reports and dashboards
app/reports/page.tsx - Payroll
app/payroll/page.tsx
People and access
- Employees and attendance
lib/employees.ts - Attendance and leave
app/attendance/page.tsx - Authentication and access
lib/auth-server.ts
Application platform
- Next.js application
app/layout.tsx - API routes
app/api - Operational data access
lib/google-sheets-data.ts - PostgreSQL database
lib/db.ts - Database schema
db/schema.ts - Live refresh
lib/use-live-refresh.ts
Other components
- Operations clerk
- Staff user
- Supabase Realtime
Connections 32
- Operations clerk → Clearing: checks receipts
README.md - Operations clerk → New Sales: encodes sales
README.md - Operations clerk → Collections: encodes payments
README.md - Clearing → New Sales: selects cleared MAS
README.md - Clearing → Collections: selects cleared MAS
README.md - New Sales → Entry APIs: submits batch
- Entry APIs → Member records: creates records
app/api/sales/route.ts - Entry APIs → Remittance workflow: submits cash
app/api/sales/route.ts - Collections → Collection API: submits batch
- Collection API → Remittance workflow: submits cash
app/api/collections/route.ts - Operations clerk → My Entries: adds photos
README.md - My Entries → Receipt photos: stores photos
- Remittance workflow → Remittance approval: routes approval
README.md - Staff user → Next.js application: uses
- Next.js application → API routes: requests data
- API routes → Authentication and access: checks permissions
lib/auth-server.ts - API routes → Operational data access: reads and writes
app/api/sales/route.ts - Entry APIs → Operational data access: uses data access
app/api/sales/route.ts - Collection API → Operational data access: uses data access
app/api/collections/route.ts - Operational data access → PostgreSQL database: queries database
lib/google-sheets-data.ts - PostgreSQL database → Database schema: uses schema
- Programs → API routes: manages programs
- Member directory → API routes: manages members
- MAM → API routes: loads MAM data
- Statement of account → API routes: loads statements
- Finance operations → PostgreSQL database: uses database
- Reports and dashboards → API routes: loads reports
- Payroll → API routes: loads payroll data
- Employees and attendance → PostgreSQL database: queries employees
lib/employees.ts - Attendance and leave → API routes: loads attendance
- Next.js application → Live refresh: refreshes views
- Live refresh → Supabase Realtime: subscribes changes
lib/use-live-refresh.ts