# mahesh882r/erpnext architecture

> Architecture diagram of the GitHub repository mahesh882r/erpnext, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mahesh882r/erpnext
- Repository: https://github.com/mahesh882r/erpnext

## Overview

ERPNext is an open-source ERP. In the represented banking workflow, a user imports a bank statement or opens reconciliation, reviews and matches transactions, and records resulting accounting activity; account data can then be analyzed through financial reporting. The tree also exposes POS, manufacturing scheduling, and subcontracting code. The README documents broader order, asset, and project capabilities, but their implementation paths are not present in the supplied tree. Source excerpts are partial, so the graph avoids inferring unshown internal call chains.

Main entry points: [`banking/src/App.tsx`](https://github.com/mahesh882r/erpnext/blob/develop/banking/src/App.tsx) (Banking app), [`banking/src/pages/BankStatementImporterContainer.tsx`](https://github.com/mahesh882r/erpnext/blob/develop/banking/src/pages/BankStatementImporterContainer.tsx) (Import pages), [`erpnext/accounts/doctype/bank_transaction`](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_transaction) (Bank transactions), [`erpnext/accounts/doctype/bank_reconciliation_tool`](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_reconciliation_tool) (Reconciliation tool)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_banking["Banking workspace"]
  node_banking_app["Banking app<br/>[App.tsx]"]
  node_reconciliation_ui["Reconciliation workspace"]
  node_statement_import["Statement importer"]
  node_import_pages["Import pages"]
  node_import_log["Import log view"]
end

subgraph group_accounting["Accounting"]
  node_bank_transaction[("Bank transactions")]
  node_bank_reconciliation["Reconciliation tool"]
  node_bank_import_records[("Statement import records")]
  node_bank_rules[("Transaction rules")]
  node_ledger[("General ledger")]
  node_reports["Financial reports"]
  node_account_docs["Accounting documents"]
end

subgraph group_operations["Business operations"]
  node_pos["Point of sale<br/>[pos_controller.js]"]
  node_scheduling["Manufacturing scheduling<br/>[engine.py]"]
  node_subcontracting["Subcontracting workflows"]
  node_other_erp_capabilities["Other ERP capabilities"]
end

subgraph group_internal["Shared internals"]
  node_accounts_controller["Document accounting logic"]
  node_query_permissions["Query permissions<br/>[query.py]"]
  node_stock_controller["Stock controller"]
end

node_user(("ERP user"))
node_banking_api{{"Frappe API"}}

node_user -->|"opens"| node_banking_app
node_banking_app -->|"routes to"| node_reconciliation_ui
node_banking_app -->|"routes to"| node_import_pages
node_import_pages -->|"renders"| node_statement_import
node_import_pages -->|"routes to"| node_import_log
node_reconciliation_ui -->|"requests data"| node_banking_api
node_statement_import -->|"submits import"| node_banking_api
node_import_log -->|"requests log"| node_banking_api
node_banking_api -->|"serves transaction data"| node_bank_transaction
node_banking_api -->|"serves import records"| node_bank_import_records
node_bank_reconciliation -->|"reconciles"| node_bank_transaction
node_bank_reconciliation -->|"creates vouchers"| node_account_docs
node_bank_rules -->|"classifies transactions"| node_bank_transaction
node_accounts_controller -->|"updates accounting"| node_ledger
node_reports -->|"queries balances"| node_ledger
node_reports -->|"applies permissions"| node_query_permissions
node_pos -->|"creates sales invoices"| node_account_docs
node_subcontracting -->|"extends"| node_stock_controller
node_scheduling -->|"supports production planning"| node_other_erp_capabilities

click node_banking_app "https://github.com/mahesh882r/erpnext/blob/develop/banking/src/App.tsx"
click node_reconciliation_ui "https://github.com/mahesh882r/erpnext/tree/develop/banking/src/components/features/BankReconciliation"
click node_statement_import "https://github.com/mahesh882r/erpnext/tree/develop/banking/src/components/features/BankStatementImporter"
click node_import_pages "https://github.com/mahesh882r/erpnext/blob/develop/banking/src/pages/BankStatementImporterContainer.tsx"
click node_import_log "https://github.com/mahesh882r/erpnext/blob/develop/banking/src/pages/ViewBankStatementImportLog.tsx"
click node_bank_transaction "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_transaction"
click node_bank_reconciliation "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_reconciliation_tool"
click node_bank_import_records "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_statement_import"
click node_bank_rules "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_transaction_rule"
click node_ledger "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/gl_entry"
click node_reports "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/accounts/doctype/financial_report_template/financial_report_engine.py"
click node_account_docs "https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts"
click node_accounts_controller "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/controllers/accounts_controller.py"
click node_query_permissions "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/utilities/query.py"
click node_pos "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/selling/page/point_of_sale/pos_controller.js"
click node_scheduling "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/manufacturing/scheduling/engine.py"
click node_subcontracting "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/controllers/subcontracting_controller.py"
click node_stock_controller "https://github.com/mahesh882r/erpnext/blob/develop/erpnext/public/js/controllers/stock_controller.js"
click node_other_erp_capabilities "https://github.com/mahesh882r/erpnext/tree/develop/erpnext"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_banking_app,node_reconciliation_ui,node_statement_import,node_import_pages,node_import_log,node_user toneBlue
class node_bank_transaction,node_bank_reconciliation,node_bank_import_records,node_bank_rules,node_ledger,node_reports,node_account_docs toneAmber
class node_pos,node_scheduling,node_subcontracting,node_other_erp_capabilities,node_banking_api toneMint
class node_accounts_controller,node_query_permissions,node_stock_controller toneRose
```

## Components

### Banking workspace

- [Banking app](https://github.com/mahesh882r/erpnext/blob/develop/banking/src/App.tsx): `banking/src/App.tsx`
- [Reconciliation workspace](https://github.com/mahesh882r/erpnext/tree/develop/banking/src/components/features/BankReconciliation): `banking/src/components/features/BankReconciliation`
- [Statement importer](https://github.com/mahesh882r/erpnext/tree/develop/banking/src/components/features/BankStatementImporter): `banking/src/components/features/BankStatementImporter`
- [Import pages](https://github.com/mahesh882r/erpnext/blob/develop/banking/src/pages/BankStatementImporterContainer.tsx): `banking/src/pages/BankStatementImporterContainer.tsx`
- [Import log view](https://github.com/mahesh882r/erpnext/blob/develop/banking/src/pages/ViewBankStatementImportLog.tsx): `banking/src/pages/ViewBankStatementImportLog.tsx`

### Accounting

- [Bank transactions](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_transaction): `erpnext/accounts/doctype/bank_transaction`
- [Reconciliation tool](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_reconciliation_tool): `erpnext/accounts/doctype/bank_reconciliation_tool`
- [Statement import records](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_statement_import): `erpnext/accounts/doctype/bank_statement_import`
- [Transaction rules](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/bank_transaction_rule): `erpnext/accounts/doctype/bank_transaction_rule`
- [General ledger](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts/doctype/gl_entry): `erpnext/accounts/doctype/gl_entry`
- [Financial reports](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/accounts/doctype/financial_report_template/financial_report_engine.py): `erpnext/accounts/doctype/financial_report_template/financial_report_engine.py`
- [Accounting documents](https://github.com/mahesh882r/erpnext/tree/develop/erpnext/accounts): `erpnext/accounts`

### Business operations

- [Point of sale](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/selling/page/point_of_sale/pos_controller.js): `erpnext/selling/page/point_of_sale/pos_controller.js`
- [Manufacturing scheduling](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/manufacturing/scheduling/engine.py): `erpnext/manufacturing/scheduling/engine.py`
- [Subcontracting workflows](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/controllers/subcontracting_controller.py): `erpnext/controllers/subcontracting_controller.py`
- [Other ERP capabilities](https://github.com/mahesh882r/erpnext/tree/develop/erpnext): `erpnext`

### Shared internals

- [Document accounting logic](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/controllers/accounts_controller.py): `erpnext/controllers/accounts_controller.py`
- [Query permissions](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/utilities/query.py): `erpnext/utilities/query.py`
- [Stock controller](https://github.com/mahesh882r/erpnext/blob/develop/erpnext/public/js/controllers/stock_controller.js): `erpnext/public/js/controllers/stock_controller.js`

### Other components

- **ERP user**
- **Frappe API**

## Connections

- ERP user → Banking app: opens
- Banking app → Reconciliation workspace: routes to
- Banking app → Import pages: routes to
- Import pages → Statement importer: renders
- Import pages → Import log view: routes to
- Reconciliation workspace → Frappe API: requests data
- Statement importer → Frappe API: submits import
- Import log view → Frappe API: requests log
- Frappe API → Bank transactions: serves transaction data
- Frappe API → Statement import records: serves import records
- Reconciliation tool → Bank transactions: reconciles
- Reconciliation tool → Accounting documents: creates vouchers
- Transaction rules → Bank transactions: classifies transactions
- Document accounting logic → General ledger: updates accounting
- Financial reports → General ledger: queries balances
- Financial reports → Query permissions: applies permissions
- Point of sale → Accounting documents: creates sales invoices
- Subcontracting workflows → Stock controller: extends
- Manufacturing scheduling → Other ERP capabilities: supports production planning
