How krishna199766-arch/kannakuai works
Kannaku AI is an Indian GST accounting app. A user creates or selects a business, enters vouchers or submits bills/voice commands, reviews drafts, and confirms posting through the deterministic ledger engine; reports and registers expose the resulting books. The graph also preserves authentication, masters, inventory, and GST capabilities. Several subsystem links are documented or visible in imports, but unsampled route and screen internals limit certainty about some runtime connections.
Main entry points: routes.ts API routes · post.ts Voucher posting · api.ts HTTP client · client.ts PGlite database
Components 28
Web app
- Accounting screens
web/src/App.tsx - App state
web/src/state.tsx - HTTP client
web/src/api.ts - Voucher entry
web/src/screens/VoucherEntry.tsx - Bill review
web/src/screens/Review.tsx - Voice panel
web/src/components/Voice.tsx - Report screens
web/src/screens/Reports.tsx - Sign-in screens
web/src/screens/Auth.tsx
Accounting server
- API routes
server/src/api/routes.ts - Auth routes
server/src/auth/routes.ts - Accounts and sessions
server/src/auth/auth.ts
AI workflows
- Bill ingestion
server/src/ai/documents.ts - Name matching
server/src/ai/resolver.ts - Voice intent workflow
server/src/ai/voice/engine.ts
Books and tax
- Voucher posting
server/src/ledger/post.ts - Posting plans
server/src/ledger/plan.ts - Ledger context
server/src/ledger/context.ts - Business masters
server/src/ledger/masters.ts - India GST engine
server/src/tax/india-gst.ts - PGlite database
server/src/db/client.ts
Reports and inventory
- Stock valuation
server/src/inventory/valuation.ts - Stock operations
server/src/inventory/stock.ts - Financial reports
server/src/reports/financials.ts - Registers and ageing
server/src/reports/registers.ts - GST reports
server/src/reports/gst.ts - Dashboard
server/src/reports/dashboard.ts
Other components
- Business user
- Anthropic API
Connections 40
- Business user → Accounting screens: uses
README.md - Accounting screens → App state: reads state
web/src/App.tsx - Accounting screens → Voucher entry: shows
web/src/App.tsx - Accounting screens → Report screens: shows
web/src/App.tsx - Accounting screens → Voice panel: opens
web/src/App.tsx - App state → HTTP client: calls
web/src/state.tsx - Voucher entry → HTTP client: submits vouchers
web/src/screens/VoucherEntry.tsx - Bill review → HTTP client: submits review
web/src/screens/Review.tsx - Voice panel → HTTP client: sends commands
web/src/components/Voice.tsx - Sign-in screens → HTTP client: calls
web/src/screens/Auth.tsx - HTTP client → API routes: requests API
- API routes → Auth routes: registers routes
server/src/app.ts - Auth routes → Accounts and sessions: delegates to
server/src/auth/routes.ts - Accounts and sessions → PGlite database: reads and writes
server/src/auth/auth.ts - API routes → Voucher posting: invokes posting
server/src/api/routes.ts - API routes → Bill ingestion: ingests bills
server/src/api/routes.ts - Bill ingestion → Name matching: matches names
server/src/ai/documents.ts - Bill ingestion → Voucher posting: posts confirmed bill
server/src/ai/documents.ts - Bill ingestion → India GST engine: recomputes tax
README.md - API routes → Voice intent workflow: routes voice
server/src/api/routes.ts - Voice intent workflow → Name matching: finds candidates
server/src/ai/voice/engine.ts - Voice intent workflow → Voucher posting: previews and posts
server/src/ai/voice/engine.ts - Voice intent workflow → Registers and ageing: queries ageing
server/src/ai/voice/engine.ts - Voice intent workflow → Anthropic API: requests intent
server/src/ai/voice/engine.ts - Bill ingestion → Anthropic API: extracts bill
README.md - Voucher posting → Posting plans: builds plan
server/src/ledger/post.ts - Voucher posting → Ledger context: loads context
server/src/ledger/post.ts - Voucher posting → Stock operations: checks stock
server/src/ledger/post.ts - Voucher posting → PGlite database: writes ledger
README.md - Ledger context → PGlite database: loads company data
server/src/ledger/context.ts - API routes → Business masters: serves masters
server/src/api/routes.ts - API routes → Dashboard: serves dashboard
server/src/api/routes.ts - API routes → Financial reports: serves reports
server/src/api/routes.ts - API routes → Registers and ageing: serves registers
server/src/api/routes.ts - API routes → GST reports: serves GST reports
server/src/api/routes.ts - API routes → Stock operations: serves stock
server/src/api/routes.ts - Financial reports → PGlite database: queries books
server/src/reports/financials.ts - Registers and ageing → PGlite database: queries books
server/src/reports/registers.ts - Stock valuation → PGlite database: values inventory
- Report screens → HTTP client: requests reports