How itai-symon/shmirot works
Shmirot is an offline guard-duty scheduling app. The main workflow is configuring a platoon and activity, generating a fair roster, then viewing and adjusting the live board; local persistence, history, fairness explanations, backup/restore, and the algorithm lab support that workflow. Edges reflect the supplied excerpts, SOURCE INDEX references, and README; unsampled implementation details are not inferred.
Main entry points: App.tsx App coordinator · solve.ts Roster solver · planner.ts Plan orchestration · db.ts Device database
Components 28
App workflow
- App coordinator
src/App.tsx - Platoon setup
src/ui/PlatoonScreen.tsx - Activity setup
src/ui/ActivityScreen.tsx - Schedule board
src/ui/BoardScreen.tsx - Backup controls
src/ui/BackupCard.tsx - Onboarding
src/ui/Onboarding.tsx
Schedule planning
- Plan orchestration
src/ui/planner.ts - Shift generation
src/storage/shiftGenerator.ts - Solver client
src/ui/solverClient.ts - Solver worker
src/solver/worker.ts - Roster solver
src/solver/solve.ts - Cost matching
src/solver/matching.ts - Optimality certificate
src/solver/certificate.ts - Solver warnings
src/solver/warnings.ts
Local data
- Device database
src/storage/db.ts - Backup and restore
src/storage/backup.ts - Duty ledger
src/ui/ledger.ts - Activity history
src/ui/history.ts
Fairness and verification
- Fairness calculations
src/ui/fairness.ts - Board score
src/ui/BoardScore.tsx - Fairness panel
src/ui/FairnessPanel.tsx - Independent verifier
src/verifier/index.ts - Verifier model
src/verifier/model.ts - Verifier matching
src/verifier/matching.ts - Rest upper bound
src/verifier/upperBound.ts - Algorithm lab
src/lab/Lab.tsx - Lab scenarios
src/lab/scenario.ts
Other components
- Platoon user
Connections 35
- Platoon user → App coordinator: uses
- App coordinator → Platoon setup: shows
src/App.tsx - App coordinator → Activity setup: shows
src/App.tsx - App coordinator → Schedule board: shows
src/App.tsx - App coordinator → Device database: saves
src/App.tsx - App coordinator → Backup controls: offers
src/App.tsx - App coordinator → Onboarding: shows
src/App.tsx - App coordinator → Plan orchestration: replans
src/App.tsx - Activity setup → Plan orchestration: configures
src/ui/ActivityScreen.tsx - Plan orchestration → Shift generation: generates
src/ui/planner.ts - Plan orchestration → Solver client: requests solve
src/ui/solverClient.ts - Solver client → Solver worker: dispatches
src/ui/solverClient.ts - Solver client → Roster solver: falls back
src/ui/solverClient.ts - Solver worker → Roster solver: runs
src/solver/worker.ts - Roster solver → Cost matching: matches seats
src/solver/solve.ts - Roster solver → Optimality certificate: builds proof
src/solver/solve.ts - Roster solver → Solver warnings: checks risks
src/solver/solve.ts - Platoon setup → Device database: persists roster
src/ui/PlatoonScreen.tsx - Schedule board → Plan orchestration: edits plan
src/ui/BoardScreen.tsx - Schedule board → Fairness panel: renders
src/ui/BoardScreen.tsx - Schedule board → Board score: renders
src/ui/BoardScreen.tsx - Board score → Fairness calculations: calculates
src/ui/BoardScore.tsx - Fairness panel → Fairness calculations: calculates
src/ui/FairnessPanel.tsx - Backup controls → Backup and restore: exports imports
src/ui/BackupCard.tsx - Backup and restore → Device database: reads writes
src/storage/backup.ts - Device database → Duty ledger: stores data
src/storage/db.ts - Device database → Activity history: stores data
src/storage/db.ts - Algorithm lab → Roster solver: runs algorithm
src/lab/Lab.tsx - Algorithm lab → Independent verifier: checks result
src/lab/Lab.tsx - Algorithm lab → Lab scenarios: loads examples
src/lab/Lab.tsx - Independent verifier → Verifier model: checks presence
src/verifier/index.ts - Independent verifier → Verifier matching: uses matching
src/verifier/index.ts - Independent verifier → Rest upper bound: checks bound
src/verifier/index.ts - Rest upper bound → Verifier matching: uses matching
src/verifier/upperBound.ts - Rest upper bound → Verifier model: uses model
src/verifier/upperBound.ts