How alysibak/mizan works
Mizan is a personal zakat ledger and annual reckoning application: users configure their school, calendar, nisab standard and metal prices; record wealth and liabilities; assess zakat; track giving; then freeze a yearly snapshot and produce a statement. The graph also preserves the documented manual stock-screening, trust, and satellite calculation tools. Sampled API handlers show user-scoped persistence; other feature wiring follows README descriptions and the tree, so unsampled call relationships are left out.
Main entry points: index.ts SQLite database · page.tsx Settings · AssetManager.tsx Asset ledger · route.ts Snapshot endpoints
Components 30
Account and setup
- Register
src/app/(auth)/register/page.tsx - Sign in
src/app/(auth)/login/page.tsx - Auth endpoints
src/app/api/auth/register/route.ts - Begin wizard
src/components/BeginWizard.tsx - Settings
src/app/(app)/settings/page.tsx - Settings API
src/app/api/settings/route.ts
Wealth and assessment
- Asset ledger
src/components/AssetManager.tsx - Ledger import
src/components/AssetImport.tsx - Asset endpoints
src/app/api/giving/route.ts - Liability endpoints
src/app/api/liabilities/route.ts - Zakat assessment
src/app/(app)/zakat/page.tsx - Hawl calendar
src/lib/hijri.ts - Metal suggestions
src/app/api/metals/route.ts
Annual reckoning
- Yearly reckoning
src/app/(app)/year/page.tsx - Snapshot endpoints
src/app/api/snapshots/route.ts - Statement
src/app/(app)/statement/page.tsx - Backup import/export
src/app/api/export/route.ts - Import endpoint
src/app/api/import/route.ts
Giving and tools
- Giving log
src/components/GivingManager.tsx - Giving endpoints
src/app/api/giving/route.ts - Calculation tools
src/app/(app)/tools - Stock screening
src/app/(app)/screening/page.tsx - Trust guidance
src/app/trust/page.tsx
Persistence and calculations
- Zakat engine
src/lib/zakat.ts - SQLite database
src/db/index.ts - Data schema
src/db/schema.ts - Input validation
src/lib/validation.ts - Session services
src/lib/session.ts
Other components
- Account holder
- Free price sources
Connections 33
- Account holder → Register: creates account
- Account holder → Sign in: signs in
- Register → Auth endpoints: submits details
- Auth endpoints → Session services: creates session
- Sign in → Auth endpoints: submits credentials
- Account holder → Begin wizard: sets up ledger
- Account holder → Settings: sets preferences
- Settings → Settings API: saves settings
- Account holder → Asset ledger: records wealth
- Asset ledger → Asset endpoints: submits assets
- Asset ledger → Liability endpoints: submits debts
- Ledger import → Import endpoint: uploads backup
- Account holder → Zakat assessment: reviews assessment
- Zakat assessment → Zakat engine: calculates zakat
- Account holder → Yearly reckoning: closes year
- Yearly reckoning → Snapshot endpoints: freezes snapshot
- Account holder → Statement: prints statement
- Account holder → Giving log: records payment
- Giving log → Giving endpoints: submits gift
- Account holder → Calculation tools: uses tools
- Account holder → Stock screening: screens holdings
- Account holder → Trust guidance: reviews guidance
- Account holder → Backup import/export: exports backup
- Backup import/export → SQLite database: reads records
- Snapshot endpoints → Zakat engine: calculates snapshot
- Snapshot endpoints → SQLite database: reads and writes
- Asset endpoints → SQLite database: reads and writes
- Liability endpoints → SQLite database: reads and writes
- Giving endpoints → SQLite database: reads and writes
- Settings API → SQLite database: reads and writes
- Backup import/export → Import endpoint: restores backup
- Settings → Metal suggestions: requests suggestion
- Metal suggestions → Free price sources: fetches prices