How potlasrisharan/codebenders-project works
LabhSaathi is a local-first guidance app for navigating sample government benefit schemes, not an application or approval system. The main journey is profile intake, scheme matching, reviewing a scheme and its requirements, then tracking a claim; detail views also offer what-if simulations and sharing. Internally, a profile context, privacy shield, validated scheme repository, deterministic eligibility engine, and discovery service support these journeys. The tree and excerpts show a worker API surface, but not its clients or all routing behavior, so those links are limited.
Main entry points: repository.ts Scheme repository · Routes.tsx App routes · SchemeDetailPage.tsx Scheme detail · index.ts Worker dispatcher
Components 28
Guidance journey
- App routes
src/routes/Routes.tsx - Profile intake
src/routes/IntakePage.tsx - Scheme matches
src/routes/MatchesPage.tsx - Scheme detail
src/routes/SchemeDetailPage.tsx - Application checklist
src/routes/ChecklistPage.tsx - Claim tracker
src/routes/TrackerPage.tsx - Scheme review
src/routes/AdminReviewPage.tsx - Action graph
src/components/graph/UnifiedActionGraph.tsx - WhatsApp sharing
src/components/share/WhatsAppShareModal.tsx
Eligibility services
- Profile state
src/core/profile/ProfileContext.tsx - Citizen profile
src/core/profile/citizen-profile.ts - Scheme discovery
src/core/discovery/discovery-service.ts - Eligibility engine
src/core/engine/eligibility-engine.ts - What-if radar
src/core/simulator/what-if-service.ts - Claim records
src/core/tracker/claim-tracker.ts
Scheme data
- Scheme repository
src/core/data/repository.ts - Scheme catalog
src/core/data/schemes-dataset.ts - Coverage registry
src/core/data/coverage-registry.ts - Domain schemas
src/core/data/schema.ts
Privacy boundary
- Sensitive ID shield
src/core/privacy/sensitive-id-shield.ts - Privacy notice
src/components/privacy/SensitiveIdShieldNotice.tsx
Worker API
- Worker dispatcher
worker/index.ts - Shield middleware
worker/middleware/sensitive-shield.ts - Intake endpoint
worker/routes/intake.ts - Eligibility endpoint
worker/routes/eligibility.ts - Schemes endpoint
worker/routes/schemes.ts - Simulator endpoint
worker/routes/simulator.ts
Other components
- Citizen
Connections 48
- Citizen → App routes: opens
src/routes/Routes.tsx - App routes → Profile intake: routes to
src/routes/Routes.tsx - App routes → Scheme matches: routes to
src/routes/Routes.tsx - App routes → Scheme detail: routes to
src/routes/Routes.tsx - App routes → Application checklist: routes to
src/routes/Routes.tsx - App routes → Claim tracker: routes to
src/routes/Routes.tsx - App routes → Scheme review: routes to
src/routes/Routes.tsx - App routes → Profile state: provides context
src/routes/Routes.tsx - Profile intake → Profile state: updates
src/routes/IntakePage.tsx - Profile intake → Citizen profile: uses profile model
src/routes/IntakePage.tsx - Profile intake → Sensitive ID shield: checks identifiers
src/routes/IntakePage.tsx - Profile intake → Privacy notice: renders notice
src/routes/IntakePage.tsx - Scheme matches → Profile state: reads profile
src/routes/MatchesPage.tsx - Scheme matches → Scheme discovery: requests matches
src/routes/MatchesPage.tsx - Scheme matches → Claim records: reads claims
src/routes/MatchesPage.tsx - Scheme detail → Profile state: reads profile
src/routes/SchemeDetailPage.tsx - Scheme detail → Scheme repository: loads scheme
src/routes/SchemeDetailPage.tsx - Scheme detail → Eligibility engine: checks eligibility
src/routes/SchemeDetailPage.tsx - Scheme detail → Claim records: reads claim state
src/routes/SchemeDetailPage.tsx - Scheme detail → What-if radar: runs simulation
src/routes/SchemeDetailPage.tsx - Scheme detail → Action graph: renders graph
src/routes/SchemeDetailPage.tsx - Scheme detail → WhatsApp sharing: opens sharing
src/routes/SchemeDetailPage.tsx - Application checklist → Claim records: updates checklist
src/routes/ChecklistPage.tsx - Application checklist → Scheme repository: loads scheme
src/routes/ChecklistPage.tsx - Application checklist → WhatsApp sharing: opens sharing
src/routes/ChecklistPage.tsx - Claim tracker → Claim records: reads tracking
src/routes/TrackerPage.tsx - Claim tracker → Scheme repository: loads scheme
src/routes/TrackerPage.tsx - Claim tracker → What-if radar: checks changes
src/routes/TrackerPage.tsx - Scheme review → Scheme repository: reviews schemes
src/routes/AdminReviewPage.tsx - Scheme review → Coverage registry: reviews coverage
src/routes/AdminReviewPage.tsx - Profile state → Citizen profile: stores profile
src/core/profile/ProfileContext.tsx - Citizen profile → Sensitive ID shield: inspects text
src/core/profile/citizen-profile.ts - Scheme discovery → Scheme repository: gets candidates
src/core/discovery/discovery-service.ts - Scheme discovery → Eligibility engine: evaluates candidates
src/core/discovery/discovery-service.ts - Scheme repository → Scheme catalog: loads catalog
src/core/data/repository.ts - Scheme repository → Coverage registry: reads coverage
src/core/data/repository.ts - Scheme repository → Domain schemas: validates records
src/core/data/repository.ts - What-if radar → Eligibility engine: reevaluates profile
src/core/simulator/what-if-service.ts - Worker dispatcher → Shield middleware: registers
worker/index.ts - Worker dispatcher → Intake endpoint: dispatches
worker/index.ts - Worker dispatcher → Eligibility endpoint: dispatches
worker/index.ts - Worker dispatcher → Schemes endpoint: dispatches
worker/index.ts - Worker dispatcher → Simulator endpoint: dispatches
worker/index.ts - Shield middleware → Sensitive ID shield: uses inspection
worker/middleware/sensitive-shield.ts - Intake endpoint → Citizen profile: uses profile logic
worker/routes/intake.ts - Intake endpoint → Sensitive ID shield: checks identifiers
worker/routes/intake.ts - Eligibility endpoint → Scheme repository: loads schemes
worker/routes/eligibility.ts - Eligibility endpoint → Eligibility engine: evaluates rules
worker/routes/eligibility.ts