How garibudimanoj-ops/financial-management-ai works
Financial Management AI is a multi-tenant bookkeeping and operations application with a CA co-pilot. A principal workflow is submitting a financial document, parsing it into a draft transaction for human review, and then using ledger reports to inspect balances and performance. The repository also exposes customer, invoice, inventory, purchasing, expense, and point-of-sale capabilities. The graph connects components only where the README or supplied source index/excerpts show the relationship; several business UI and service paths are represented without inferred call edges because their implementations were not sampled.
Main entry points: prisma.ts Application database · ingest/route.ts Document ingestion API · chat/route.ts CA assistant chat · service.ts Invoice management
Components 23
Access and tenancy
- Authentication and RBAC
src/lib/auth.ts - Sign-in and onboarding
src/app/login/page.tsx
Business operations
- Customer records
src/lib/customers/service.ts - Invoice management
src/lib/invoices/service.ts - Point of sale
src/components/pos/POSTerminal.tsx - Inventory management
src/lib/inventory/service.ts - Purchasing and suppliers
src/services/purchases/purchaseService.ts - Expense management
src/services/expenses/expenseService.ts
Accounting and reports
- Transaction API
src/app/api/transactions/route.ts - Double-entry transactions
src/services/accounting/transactionService.ts - Journal bridge
src/services/accounting/journalBridge.ts - Financial reports
src/services/accounting/reportService.ts - Report API endpoints
src/app/api/reports/trial-balance/route.ts - Report screens
src/app/reports/page.tsx
CA co-pilot
- Document ingestion API
src/app/api/ai/ingest/route.ts - Financial document parser
src/services/ai/documentParser.ts - Draft orchestration
src/services/ai/llmOrchestrator.ts - Deterministic computations
src/services/ai/computationEngine.ts - CA assistant chat
src/app/api/ca-assistant/chat/route.ts
Shared platform
- Application database
src/lib/prisma.ts - Audit logging
src/lib/audit.ts
Other components
- Business user
- Google Gemini
Connections 31
- Business user → Sign-in and onboarding: signs in
- Sign-in and onboarding → Authentication and RBAC: authenticates
- Authentication and RBAC → Application database: checks membership
src/lib/auth.ts - Business user → Document ingestion API: uploads document
README.md - Document ingestion API → Authentication and RBAC: checks permission
src/app/api/ai/ingest/route.ts - Document ingestion API → Financial document parser: parses document
src/app/api/ai/ingest/route.ts - Document ingestion API → Draft orchestration: builds draft
src/app/api/ai/ingest/route.ts - Draft orchestration → Deterministic computations: delegates calculations
src/services/ai/llmOrchestrator.ts - Document ingestion API → Application database: saves draft
src/app/api/ai/ingest/route.ts - Business user → CA assistant chat: asks question
- CA assistant chat → Authentication and RBAC: checks access
src/app/api/ca-assistant/chat/route.ts - CA assistant chat → Application database: reads business evidence
src/app/api/ca-assistant/chat/route.ts - CA assistant chat → Google Gemini: generates response
src/app/api/ca-assistant/chat/route.ts - CA assistant chat → Audit logging: records audit event
src/app/api/ca-assistant/chat/route.ts - Business user → Transaction API: submits transaction
README.md - Transaction API → Double-entry transactions: validates transaction
src/app/api/transactions/route.ts - Business user → Report API endpoints: requests report
README.md - Report API endpoints → Financial reports: computes report
src/app/api/reports/trial-balance/route.ts - Financial reports → Application database: reads ledger entries
src/services/accounting/reportService.ts - Business user → Report screens: views reports
- Invoice management → Customer records: uses customer records
src/lib/invoices/service.ts - Invoice management → Journal bridge: bridges to ledger
src/lib/invoices/service.ts - Purchasing and suppliers → Journal bridge: bridges to ledger
src/services/purchases/purchaseService.ts - Expense management → Journal bridge: bridges to ledger
src/services/expenses/expenseService.ts - Invoice management → Application database: persists records
src/lib/invoices/service.ts - Inventory management → Application database: persists stock
src/lib/inventory/service.ts - Purchasing and suppliers → Application database: persists purchases
src/services/purchases/purchaseService.ts - Expense management → Application database: persists expenses
src/services/expenses/expenseService.ts - Customer records → Application database: reads and writes
src/lib/customers/service.ts - Point of sale → Invoice management: uses sales flow
- Point of sale → Inventory management: uses stock flow