How dmaman86/shiftly works
Shiftly is a shift-entry and payroll-estimation web app backed by an independent TypeScript payroll domain. Workers enter and edit shifts; the app computes inspectable daily breakdowns and monthly gross estimates, with authenticated persistence and guest drafts. The graph preserves the documented profile and public calculation-rules capabilities. Source evidence shows routing, day orchestration, month-session behavior, and domain layer construction; other documented branches are included, but their internal links are omitted where implementation was not sampled.
Main entry points: useWorkTableMonthSession.ts Month session · AppRoutes.tsx Language routes · daypaymap.builder.ts Daily pay mapping · useDayController.ts Day controller
Components 26
Web experience
- Language routes
apps/web/src/app/routes/AppRoutes.tsx - Daily page
apps/web/src/pages/DailyPage.tsx - Monthly summary
apps/web/src/pages/MonthlySummaryPage.tsx - Calculation rules
apps/web/src/pages/CalculationRulesPage.tsx - Usage analytics
apps/web/src/services/analytics/analytics.service.ts
Shift editing
- Month session
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Day controller
apps/web/src/features/work-table/hooks/day/useDayController.ts - Day editing state
apps/web/src/features/work-table/context/workTableDayState/workTableDayStateContext.ts - State change detection
apps/web/src/features/work-table/helpers/workTableStateChanges.ts - Shift persistence
apps/web/src/services/shift/shift.service.ts - Workday persistence
apps/web/src/services/workDay/workDay.service.ts - Guest drafts
apps/web/src/services/guestDraft/guestDraft.service.ts
Payroll domain
- Shift pay mapping
packages/domain/src/builder/shiftmap.builder.ts - Daily pay mapping
packages/domain/src/builder/daypaymap.builder.ts - Month workdays
packages/domain/src/builder/workdaysformonth.builder.ts - Day calculation
packages/domain/src/calculator/day-from-shifts.calculator.ts - Addition classification
packages/domain/src/calculator/additions/addition.classifier.ts - Fixed segments
packages/domain/src/calculator/fixed-segment.calculator.ts - Meal allowance
packages/domain/src/calculator/mealallowance/timeline-meal-allowance.calculator.ts - Per diem
packages/domain/src/calculator/perdiem/timeline-per-diem.calculator.ts - Monthly pay reducer
packages/domain/src/reducer/month-pay-map.reducer.ts - Date and timezone
packages/domain/src/services/date.service.ts
Accounts and history
- Profile charts
apps/web/src/pages/ProfilePage.tsx - Profile history
apps/web/src/features/profile/services/profileHistory.service.ts
Other components
- Worker
- Supabase
Connections 26
- Worker → Language routes: opens
README.md - Language routes → Daily page: routes daily
apps/web/src/app/routes/AppRoutes.tsx - Language routes → Monthly summary: routes monthly
apps/web/src/app/routes/AppRoutes.tsx - Language routes → Calculation rules: routes rules
apps/web/src/app/routes/AppRoutes.tsx - Language routes → Profile charts: routes profile
apps/web/src/app/routes/AppRoutes.tsx - Worker → Daily page: enters shifts
README.md - Day controller → Day editing state: edits state
apps/web/src/features/work-table/hooks/day/useDayController.ts - Day controller → Usage analytics: tracks additions
apps/web/src/features/work-table/hooks/day/useDayController.ts - Month session → Day editing state: hydrates state
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Month session → State change detection: detects changes
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Month session → Shift persistence: reads and writes
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Month session → Workday persistence: reads and writes
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Month session → Guest drafts: captures drafts
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Month session → Daily pay mapping: projects pay maps
apps/web/src/features/work-table/hooks/month/useWorkTableMonthSession.ts - Shift persistence → Supabase: persists records
- Workday persistence → Supabase: persists records
- Day controller → Day calculation: uses domain
apps/web/src/features/work-table/hooks/day/useDayController.ts - Day calculation → Shift pay mapping: builds shift maps
- Shift pay mapping → Addition classification: classifies additions
- Daily pay mapping → Fixed segments: uses fixed segments
- Daily pay mapping → Meal allowance: uses allowance
- Daily pay mapping → Per diem: uses per diem
- Month workdays → Date and timezone: uses dates
- Monthly summary → Monthly pay reducer: estimates pay
- Profile charts → Profile history: loads history
- Profile history → Supabase: reads saved data