How ergus457/siakoperasi works
This is a cooperative accounting and member-management application. Users maintain organizational records, record savings, loans, shop activity and journal transactions, then review financial reports. The sampled code confirms the account and savings clients call server actions and confirms authentication uses Prisma; most other business screens and report implementations are unsampled, so their internal links are not asserted. The report and transaction branches are retained based on the repository tree.
Main entry points: layout.tsx Dashboard shell · prisma.ts Database client · client.tsx Chart of accounts · auth.ts Credentials auth
Components 22
Access and shell
- Sign in and register
src/app/login/page.tsx - Credentials auth
src/lib/auth.ts - Auth endpoints
src/app/api/auth/[...nextauth]/route.ts - Account registration
src/app/api/auth/register/route.ts - Dashboard shell
src/app/dashboard/layout.tsx
Co-op operations
- Member records
src/app/dashboard/anggota/actions.ts - Savings transactions
src/app/dashboard/simpanan/actions.ts - Loan management
src/app/dashboard/pinjaman/actions.ts - Shop purchases
src/app/dashboard/toko-pembelian/actions.ts - Shop sales
src/app/dashboard/toko-penjualan/actions.ts
Accounting
- Chart of accounts
src/app/dashboard/akun/client.tsx - Journal entries
src/app/dashboard/jurnal/penerimaan-kas/actions.ts - Journal review
src/app/dashboard/jurnal/client.tsx - Accounting rules
src/lib/accounting.ts
Reports
- Financial statements
src/app/dashboard/laporan - Report preview
src/app/report-preview/page.tsx
Shared runtime
- Data table
src/components/data-table.tsx - Dynamic journal rows
src/components/dynamic-form-rows.tsx - Export controls
src/components/export-buttons.tsx - Database client
src/lib/prisma.ts - PostgreSQL database
Other components
- Co-op user
Connections 22
- Co-op user → Sign in and register: signs in
- Sign in and register → Credentials auth: authenticates
- Auth endpoints → Credentials auth: uses handlers
- Credentials auth → Database client: looks up user
src/lib/auth.ts - Account registration → Database client: stores account
src/app/api/auth/register/route.ts - Co-op user → Dashboard shell: uses dashboard
- Dashboard shell → Member records: opens records
- Dashboard shell → Savings transactions: opens transactions
- Dashboard shell → Loan management: opens loans
- Dashboard shell → Shop purchases: opens purchases
- Dashboard shell → Shop sales: opens sales
- Co-op user → Chart of accounts: maintains accounts
src/app/dashboard/akun/client.tsx - Chart of accounts → Accounting rules: gets normal balance
src/app/dashboard/akun/client.tsx - Chart of accounts → Data table: renders table
src/app/dashboard/akun/client.tsx - Co-op user → Savings transactions: records savings
- Co-op user → Loan management: manages loans
- Co-op user → Journal entries: records journals
- Journal entries → Database client: persists entries
src/app/dashboard/jurnal/penerimaan-kas/actions.ts - Co-op user → Journal review: reviews journals
src/app/dashboard/jurnal/client.tsx - Co-op user → Financial statements: reviews statements
- Co-op user → Report preview: previews report
- Database client → PostgreSQL database: connects to
src/lib/prisma.ts