How iqbalussain/iqbook works
Iqbook is an invoice and accounting application with a React interface and an Electron desktop mode. Users manage parties, create sales and purchase documents, record payments and vouchers, and review statements and reports. App.tsx routes users into those workflows; AppContext coordinates business state and accounting postings, with local storage and an optional LAN server path. The README documents backup/restore and offline desktop use. Some subsystems are represented by their known directory paths because their source was not sampled; the graph avoids inferring their internal wiring.
Main entry points: App.tsx App routing · AppContext.tsx Business state · useRemoteCollection.ts Remote collection sync · apiClient.ts LAN API client
Components 24
Application shell
- App routing
src/App.tsx - App layout
src/components/layout/AppLayout.tsx - Dashboard
src/pages/Dashboard.tsx
Business operations
- Party management
src/pages/ClientsList.tsx - Sales documents
src/pages/InvoiceForm.tsx - Purchase invoices
src/pages/PurchaseInvoiceForm.tsx - Payments and receipts
src/pages/PaymentsReceipts.tsx - Quotations
src/pages/QuotationForm.tsx
Accounting and reports
- Voucher workflows
src/pages/VoucherDashboard.tsx - Chart of accounts
src/pages/ChartOfAccounts.tsx - Financial reports
src/pages/reports - Account statements
src/pages/ClientStatement.tsx
State and integrations
- Business state
src/contexts/AppContext.tsx - Posting engine
src/lib/postingEngine.ts - Accounting calculations
src/lib/accounting.ts - Local persistence
src/hooks/useLocalStorage.ts - Remote collection sync
src/hooks/useRemoteCollection.ts - LAN API client
src/lib/apiClient.ts - LAN server
server/server.js
Desktop and support
- Backup and restore
src/components/BackupRestore.tsx - Electron main process
main.cjs - MCP tools
src/lib/mcp/tools - MCP function
supabase/functions/mcp/index.ts
Other components
- User
Connections 20
- User → App routing: uses
src/App.tsx - App routing → App layout: renders
src/App.tsx - App routing → Dashboard: routes to
src/App.tsx - App routing → Sales documents: routes to
src/App.tsx - App routing → Payments and receipts: routes to
src/App.tsx - App routing → Quotations: routes to
src/App.tsx - App routing → Business state: provides state
src/App.tsx - Business state → Local persistence: persists state
src/contexts/AppContext.tsx - Business state → Remote collection sync: uses sync
src/contexts/AppContext.tsx - Remote collection sync → LAN API client: calls
src/hooks/useRemoteCollection.ts - LAN API client → LAN server: HTTP requests
src/lib/apiClient.ts - Business state → Posting engine: builds postings
src/contexts/AppContext.tsx - Business state → Accounting calculations: validates postings
src/contexts/AppContext.tsx - User → Party management: manages parties
- User → Purchase invoices: tracks purchases
- User → Voucher workflows: records vouchers
- User → Chart of accounts: manages accounts
- User → Financial reports: reviews results
- User → Account statements: reviews balances
- User → Backup and restore: backs up data