How mayur-anand-cys/residueguard works
ResidueGuard is an agri-tech compliance prototype whose main workflow is entering spray and market details, calculating harvest safety, and presenting the result to FPO staff or buyers. Its dashboard also exposes policy checks and audit verification; the README describes additional environmental and anti-fraud capabilities that are represented within the dashboard rather than as separately verified services. The excerpts confirm the dashboard’s kinetics and audit dependencies and the app’s routing, auth, and preview bridge. Several feature details and backend relationships are documented but their implementations were not sampled.
Main entry points: residue-guard.tsx Compliance dashboard · __root.tsx App shell · router.tsx App router · provider.tsx Auth provider
Components 21
Compliance product
- Compliance dashboard
src/components/residue-guard.tsx - Chemical reference data
src/mockData.js - MSI kinetics
src/lib/kinetics.ts - Market policy checks
src/components/residue-guard.tsx - Environmental modifiers
src/components/residue-guard.tsx - Anti-fraud checks
src/components/residue-guard.tsx
Audit integrity
- Buyer audit view
src/components/residue-guard.tsx - Hash-chain verification
src/lib/audit/chain.ts - Audit event store
src/lib/audit/store.ts
App platform
- App router
src/router.tsx - Route tree
src/routeTree.gen.ts - App shell
src/routes/__root.tsx - Auth provider
src/lib/auth/provider.tsx - Auth service
src/lib/auth/server.ts - App database
src/lib/db.ts - Preview host bridge
src/lib/preview-host-bridge.ts
Localization
- Language provider
src/i18n/LanguageProvider.tsx - Translation messages
src/i18n/translations.ts
Other components
- FPO user
- Buyer auditor
- Grok preview host
Connections 19
- FPO user → App router: opens app
README.md - Buyer auditor → App router: opens app
README.md - App router → Route tree: loads routes
src/router.tsx - App shell → Auth provider: renders
src/routes/__root.tsx - App shell → Language provider: renders
src/routes/__root.tsx - Language provider → Translation messages: uses messages
- Compliance dashboard → Chemical reference data: reads data
src/components/residue-guard.tsx - Compliance dashboard → MSI kinetics: calculates MSI
src/components/residue-guard.tsx - Compliance dashboard → Market policy checks: presents checks
README.md - Compliance dashboard → Environmental modifiers: applies modifiers
README.md - Compliance dashboard → Anti-fraud checks: presents alerts
README.md - Compliance dashboard → Hash-chain verification: uses verification
src/components/residue-guard.tsx - Compliance dashboard → Audit event store: uses audit events
src/components/residue-guard.tsx - Buyer audit view → Hash-chain verification: verifies chain
README.md - Buyer audit view → Audit event store: reads history
src/components/residue-guard.tsx - Auth provider → Auth service: configures auth
- Auth service → App database: persists sessions
src/lib/auth/server.ts - App shell → Preview host bridge: renders bridge
src/routes/__root.tsx - Preview host bridge → Grok preview host: posts messages
src/lib/preview-host-bridge.ts