How ishamishra0408/agent-kyc works
Agent KYCReady is a driver-verification workflow: the driver submits identity evidence, readers and registries supply evidence, policy—not AI—decides, and approved drivers can add vehicles and book loads. Operations handles cases sent for human review. The README documents the product boundary and external integrations; several service internals were not excerpted, so only documented or indexed relationships are shown.
Main entry points: app.ts HTTP API · kyc.ts KYC service · api.ts API client · store.ts SQLite store
Components 28
Driver and ops clients
- Driver app
src/driver/PhoneApp.tsx - KYC screens
src/driver/Kyc.tsx - Loads and bookings
src/driver/Loads.tsx - Ops console
src/ops/OpsConsole.tsx - Case detail
src/ops/CaseDetail.tsx - API client
src/api.ts
Verification workflow
- HTTP API
server/api/app.ts - KYC service
server/services/kyc.ts - Onboarding and bookings
server/services/onboarding.ts - Review operations
server/services/ops.ts - Runtime wiring
server/index.ts - Review-note draft
server/ai/reviewDraft.ts
Evidence and decisions
- Photo reading
server/adapters/photoReader.ts - AI reader adapter
server/adapters/aiReader.ts - Submission verification
server/verify.ts - KYC policy contract
server/domain/rules.ts - Vehicle policy contract
server/domain/vehicle.ts - OPA policy engine
server/policy/opa.ts
Persistence and integrations
- OpenRouter models
server/adapters/openrouter.ts - Identity registries
server/adapters/registry.ts - Trust graph
server/adapters/graph.ts - Neo4j graph adapter
server/adapters/neo4jGraph.ts - SQLite store
server/db/store.ts
Follow-up
- Nudge cycle
server/services/nudges.ts - Nudge writer
server/ai/nudgeWriter.ts
Other components
- Driver
- Ops reviewer
- Load marketplace
Connections 36
- Driver → Driver app: uses
README.md - Ops reviewer → Ops console: uses
README.md - Driver app → KYC screens: shows
src/driver/PhoneApp.tsx - Driver app → Loads and bookings: shows
src/driver/PhoneApp.tsx - Ops console → Case detail: renders
src/ops/OpsConsole.tsx - KYC screens → API client: calls
src/driver/Kyc.tsx - Loads and bookings → API client: calls
src/driver/PhoneApp.tsx - Ops console → API client: calls
src/ops/OpsConsole.tsx - Case detail → API client: calls
src/ops/CaseDetail.tsx - API client → HTTP API: requests
README.md - HTTP API → KYC service: dispatches
server/api/app.ts - HTTP API → Nudge cycle: runs cycle
server/api/app.ts - HTTP API → Review operations: requests draft
server/api/app.ts - HTTP API → SQLite store: reads and writes
server/api/app.ts - KYC service → Submission verification: verifies submission
server/services/kyc.ts - KYC service → Onboarding and bookings: applies decision
server/services/kyc.ts - KYC service → SQLite store: updates state
server/services/kyc.ts - KYC service → Photo reading: reads photos
server/services/kyc.ts - Submission verification → KYC policy contract: decides
server/verify.ts - Submission verification → Identity registries: checks records
server/verify.ts - Submission verification → Trust graph: checks sharing
server/verify.ts - Photo reading → AI reader adapter: uses adapter
server/adapters/photoReader.ts - AI reader adapter → OpenRouter models: calls models
server/index.ts - Runtime wiring → Photo reading: configures
server/index.ts - Runtime wiring → Neo4j graph adapter: configures
server/index.ts - Neo4j graph adapter → Trust graph: implements
server/adapters/neo4jGraph.ts - KYC policy contract → OPA policy engine: runs policy
server/policy/index.ts - Onboarding and bookings → Vehicle policy contract: decides vehicle
server/services/onboarding.ts - Vehicle policy contract → OPA policy engine: runs policy
server/policy/index.ts - Onboarding and bookings → SQLite store: persists outcome
server/services/onboarding.ts - Onboarding and bookings → Load marketplace: books loads
README.md - HTTP API → Review-note draft: builds draft
server/api/app.ts - Review operations → KYC service: records decision
server/services/ops.ts - Review operations → SQLite store: reads case
server/services/ops.ts - Nudge cycle → SQLite store: reads history
server/services/nudges.ts - Nudge cycle → Nudge writer: writes message
server/services/nudges.ts