How arya-satwika/dashboard-pws works
Dashboard PWS is a field-visit monitoring app for maternal and child health programs. Staff sign in, review coverage and follow-up priorities, identify a household/target, complete a structured visit checklist, and save the visit record locally. Separate routes cover activities, reports, and administration of checklist templates and staff. The checklist hook, local repository, dashboard route, and auth implementation are sampled; several route and feature connections are inferred only from names and are left unconnected where ownership is not established.
Main entry points: index.tsx Monitoring dashboard · useChecklistForm.ts Checklist workflow · sasaran.index.tsx Target listing · checklist.tsx Checklist route
Components 24
App navigation
- Route setup
src/router.tsx - Root layout
src/routes/__root.tsx - App shell
src/components/organisms/AppShell.tsx
Program monitoring
- Monitoring dashboard
src/routes/index.tsx - Dashboard data
src/lib/mock-data.ts - Dashboard views
src/components/organisms/ChartCard.tsx - Activities
src/routes/kegiatan.tsx - Reports
src/routes/laporan.tsx
Visit workflow
- Target listing
src/routes/sasaran.index.tsx - Target detail
src/routes/sasaran.$id.tsx - Checklist route
src/routes/checklist.tsx - Checklist workflow
src/features/checklist/hooks/useChecklistForm.ts - Visit form
src/features/checklist/components/SasaranForm.tsx - Visit validation
src/features/checklist/services/validateKunjungan.ts - Visit repository
src/lib/repositories/kunjungan.repository.ts - Local visit adapter
src/lib/repositories/localKunjungan.repository.ts
Administration
- Checklist templates
src/hooks/use-kr-templates.ts - Program management
src/routes/kelola.tsx - Template editor
src/features/kelola/components/FormKrSection.tsx
Identity and state
- Login route
src/routes/login.tsx - Auth provider
src/providers/auth.tsx - Session auth
src/lib/auth.ts - Browser storage
Other components
- Field staff
Connections 26
- Field staff → Login route: signs in
- Login route → Auth provider: requests login
- Auth provider → Session auth: checks and saves
- Session auth → Browser storage: reads and writes
- Field staff → Monitoring dashboard: reviews coverage
- Route setup → Root layout: mounts routes
- Root layout → App shell: wraps content
- Monitoring dashboard → App shell: renders within
- Monitoring dashboard → Dashboard data: loads rows
- Monitoring dashboard → Dashboard views: renders metrics
- Monitoring dashboard → Target listing: links targets
- Field staff → Target listing: selects target
- Target listing → Target detail: opens detail
- Target detail → Checklist route: starts visit
- Field staff → Checklist route: records visit
- Checklist route → Checklist workflow: uses workflow
- Checklist workflow → Visit form: provides form state
- Checklist workflow → Visit validation: validates submission
- Checklist workflow → Checklist templates: loads templates
- Checklist workflow → Visit repository: saves and lists
- Visit repository → Local visit adapter: implemented by
- Local visit adapter → Browser storage: reads and writes
- Field staff → Activities: views activities
- Field staff → Reports: views reports
- Field staff → Program management: manages program
- Program management → Template editor: edits templates