How pushkarjain93/ledgr works
Ledgr is an AI-assisted reconciliation product for e-commerce merchants. A reviewer signs in, syncs merchant records, and receives a deterministic reconciliation; unresolved records become persistent cases for AI-assisted investigation and human review. Reviewers can add notes, request evidence, and draft—but not send—messages. The frontend also presents dashboards, reports, transactions, and settings. Backend orchestration details are limited because api.py was not sampled; those links rely on the README’s architecture description.
Main entry points: api.py HTTP orchestration · App.tsx Ledgr web app · api.ts Typed API client · case_engine.py Case lifecycle and AI
Components 19
Merchant interface
- Ledgr web app
frontend/src/App.tsx - Session and app state
frontend/src/context/AppContext.tsx - Typed API client
frontend/src/lib/api.ts - Reconciliation views
frontend/src/pages/ReconciliationsPage.tsx - Case review
frontend/src/pages/CaseDetailPage.tsx - Reports and metrics
frontend/src/pages/ReportsPage.tsx - Transactions view
frontend/src/pages/TransactionsPage.tsx
API and access
- HTTP orchestration
api.py - Demo authentication
auth.py
Reconciliation domain
- Tiered matching
engine.py - COD remittance join
remittance.py
Case investigation
- Case lifecycle and AI
case_engine.py - AI provider failover
ai_client.py
State and providers
- Merchant state store
state_store.py - Shopify integration
shopify_client.py - Razorpay integration
razorpay_client.py - JSON state files
Other components
- Merchant reviewer
- AI providers
Connections 21
- Merchant reviewer → Ledgr web app: uses
- Ledgr web app → Session and app state: hosts
frontend/src/App.tsx - Session and app state → Typed API client: requests data
frontend/src/context/AppContext.tsx - Ledgr web app → Reconciliation views: routes to
frontend/src/App.tsx - Ledgr web app → Case review: routes to
frontend/src/App.tsx - Ledgr web app → Reports and metrics: routes to
frontend/src/App.tsx - Ledgr web app → Transactions view: routes to
frontend/src/App.tsx - Reports and metrics → Typed API client: fetches reports
frontend/src/pages/ReportsPage.tsx - Case review → Typed API client: loads case
frontend/src/pages/CaseDetailPage.tsx - Typed API client → HTTP orchestration: HTTP JSON
- HTTP orchestration → Demo authentication: authenticates
- HTTP orchestration → Tiered matching: orchestrates matching
- HTTP orchestration → Case lifecycle and AI: orchestrates cases
- Tiered matching → COD remittance join: COD matching
- Case lifecycle and AI → AI provider failover: investigates cases
case_engine.py - Case lifecycle and AI → Merchant state store: persists cases
case_engine.py - HTTP orchestration → Merchant state store: reads merchant state
- Merchant state store → JSON state files: stores JSON
- HTTP orchestration → Shopify integration: syncs store data
- HTTP orchestration → Razorpay integration: syncs settlements
- AI provider failover → AI providers: fails over
ai_client.py