How iqbalussain/jobmanager works
Job Manager is an offline-aware, role-protected job-order application. Users sign in, work with job orders through dashboard and management views, and follow approval, execution, and invoicing states; administrators also manage users and reference data, while reports and alerts support oversight. The documented runtime pairs Supabase with a per-user Dexie cache and Realtime reconciliation. Some feature components are named in the route shell or README but were not excerpted, so their internal calls are not expanded here.
Main entry points: Index.tsx Authenticated workspace · App.tsx App shell and routes · jobOrdersApi.ts Job-order API · syncService.ts Synchronization
Components 23
Application workflow
- App shell and routes
src/App.tsx - Authenticated workspace
src/pages/Index.tsx - Dashboard
src/components/ModernDashboard.tsx
Job operations
- Job creation and editing
src/components/job-form/JobFormWithImageUpload.tsx - Job details
src/components/JobDetails.tsx - Job-order API
src/services/jobOrdersApi.ts - Job domain types
src/types/jobOrder.ts - Cache/UI transforms
src/utils/jobOrderTransforms.ts - Approved jobs
src/components/job-management/ApprovedJobsList.tsx - Reports and export
src/components/ReportsPage.tsx - PDF generation
src/utils/pdf/pdfContentGenerator.ts
Identity and sync
- Authentication
src/hooks/useAuth.tsx - Synchronization
src/services/syncService.ts - Offline job access
src/hooks/useDexieJobs.ts - Dexie cache
src/lib/dexieDb.ts - Supabase client
src/integrations/supabase/client.ts - Realtime subscription
src/lib/realtime.ts
Administration and alerts
- Admin management
src/components/AdminManagement.tsx - Admin job management
src/components/AdminJobManagement.tsx - Workflow alerts
src/components/WorkflowAlertManager.tsx - Notification state
src/contexts/NotificationContext.tsx - Supabase Edge Functions
supabase/functions
Other components
- Signed-in user
Connections 30
- Signed-in user → App shell and routes: uses
README.md - App shell and routes → Authentication: provides auth
src/App.tsx - App shell and routes → Authenticated workspace: routes to
src/App.tsx - Authenticated workspace → Dashboard: renders view
src/pages/Index.tsx - Authenticated workspace → Job details: opens details
src/pages/Index.tsx - Authenticated workspace → Approved jobs: renders view
src/pages/Index.tsx - Authenticated workspace → Admin job management: renders view
src/pages/Index.tsx - Authenticated workspace → Admin management: renders view
src/pages/Index.tsx - Authenticated workspace → Reports and export: renders view
src/pages/Index.tsx - Authenticated workspace → Offline job access: loads jobs
src/pages/Index.tsx - Job details → Job-order API: uses job details
- Job creation and editing → Job-order API: creates jobs
- Job-order API → Supabase client: reads and writes
src/services/jobOrdersApi.ts - Job-order API → Job domain types: uses types
src/services/jobOrdersApi.ts - Offline job access → Dexie cache: reads cache
src/hooks/useDexieJobs.ts - Offline job access → Synchronization: requests sync
src/hooks/useDexieJobs.ts - Synchronization → Dexie cache: updates cache
src/services/syncService.ts - Synchronization → Supabase client: syncs records
README.md - Cache/UI transforms → Job domain types: maps records
src/utils/jobOrderTransforms.ts - Reports and export → PDF generation: exports reports
- App shell and routes → Realtime subscription: subscribes edits
src/App.tsx - App shell and routes → Synchronization: checks sync
src/App.tsx - App shell and routes → Workflow alerts: mounts alerts
src/App.tsx - App shell and routes → Notification state: provides notifications
src/App.tsx - Workflow alerts → Job-order API: updates jobs
src/components/WorkflowAlertManager.tsx - Workflow alerts → Synchronization: updates cache
src/components/WorkflowAlertManager.tsx - Notification state → Authentication: gets user
src/contexts/NotificationContext.tsx - Admin management → Supabase client: manages records
- Admin job management → Job details: opens job
src/components/AdminJobManagement.tsx - Signed-in user → Supabase Edge Functions: requests secured actions
README.md