# frontaccountingerp/fa architecture

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

- Interactive diagram: https://gitdiagram.com/frontaccountingerp/fa
- Repository: https://github.com/frontaccountingerp/fa

## Overview

FrontAccounting is a web-based ERP for small and medium enterprises. Users enter through the web interface, authenticate, configure company and accounting settings, then use document-based sales, purchasing, inventory, manufacturing, and accounting workflows; the README states that business activity can generate automatic general-ledger postings. Reports provide a separate output capability. The tree and README establish these product areas, but most runtime handlers were not sampled, so their internal calls are not inferred. The FPDI parser’s use of its context and wrapper helpers is directly evidenced in the sampled source.

Main entry points: [`index.php`](https://github.com/frontaccountingerp/fa/blob/master/index.php) (Application home), [`gl/gl_journal.php`](https://github.com/frontaccountingerp/fa/blob/master/gl/gl_journal.php) (General ledger), [`reporting/includes/fpdi/pdf_parser.php`](https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/pdf_parser.php) (PDF parser), [`access/login.php`](https://github.com/frontaccountingerp/fa/blob/master/access/login.php) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Access and setup"]
  node_login["Login<br/>[login.php]"]
  node_home["Application home<br/>[index.php]"]
  node_appmenu["Application menu<br/>[application.php]"]
  node_setup["Company setup"]
end

subgraph group_operations["Business operations"]
  node_sales["Sales documents"]
  node_salesmanage["Customer management<br/>[customers.php]"]
  node_purchasing["Purchase orders<br/>[po_entry_items.php]"]
  node_suppliermanage["Supplier management<br/>[suppliers.php]"]
  node_inventory["Inventory adjustments<br/>[adjustments.php]"]
  node_items["Item management<br/>[items.php]"]
  node_manufacturing["Manufacturing"]
  node_dimensions["Dimensions"]
end

subgraph group_finance["Accounting"]
  node_gl["General ledger<br/>[gl_journal.php]"]
  node_fixedassets["Fixed assets"]
  node_taxes["Tax configuration<br/>[tax_groups.php]"]
end

subgraph group_outputs["Reporting"]
  node_reports["Report catalog<br/>[reports_main.php]"]
  node_reportforms["Report forms<br/>[index.php]"]
end

subgraph group_pdf["PDF parsing"]
  node_pdfparser["PDF parser<br/>[pdf_parser.php]"]
  node_pdfcontext["PDF context<br/>[pdf_context.php]"]
  node_pdfwrappers["PDF wrappers"]
end

node_user(("ERP user"))

node_user -->|"signs in"| node_login
node_user -->|"opens application"| node_home
node_home -->|"loads session"| node_login
node_home -->|"displays menu"| node_appmenu
node_home -->|"redirects if unconfigured"| node_setup
node_user -->|"configures company"| node_setup
node_sales -->|"posts automatically"| node_gl
node_purchasing -->|"posts automatically"| node_gl
node_inventory -->|"posts automatically"| node_gl
node_reports -.->|"offers reports"| node_reportforms
node_pdfparser -->|"reads through"| node_pdfcontext
node_pdfparser -->|"uses helpers"| node_pdfwrappers

click node_login "https://github.com/frontaccountingerp/fa/blob/master/access/login.php"
click node_home "https://github.com/frontaccountingerp/fa/blob/master/index.php"
click node_appmenu "https://github.com/frontaccountingerp/fa/blob/master/applications/application.php"
click node_setup "https://github.com/frontaccountingerp/fa/blob/master/admin/company_preferences.php"
click node_sales "https://github.com/frontaccountingerp/fa/blob/master/sales/sales_order_entry.php"
click node_salesmanage "https://github.com/frontaccountingerp/fa/blob/master/sales/manage/customers.php"
click node_purchasing "https://github.com/frontaccountingerp/fa/blob/master/purchasing/po_entry_items.php"
click node_suppliermanage "https://github.com/frontaccountingerp/fa/blob/master/purchasing/manage/suppliers.php"
click node_inventory "https://github.com/frontaccountingerp/fa/blob/master/inventory/adjustments.php"
click node_items "https://github.com/frontaccountingerp/fa/blob/master/inventory/manage/items.php"
click node_manufacturing "https://github.com/frontaccountingerp/fa/blob/master/manufacturing/work_order_entry.php"
click node_dimensions "https://github.com/frontaccountingerp/fa/blob/master/dimensions/dimension_entry.php"
click node_gl "https://github.com/frontaccountingerp/fa/blob/master/gl/gl_journal.php"
click node_fixedassets "https://github.com/frontaccountingerp/fa/blob/master/fixed_assets/process_depreciation.php"
click node_taxes "https://github.com/frontaccountingerp/fa/blob/master/taxes/tax_groups.php"
click node_reports "https://github.com/frontaccountingerp/fa/blob/master/reporting/reports_main.php"
click node_reportforms "https://github.com/frontaccountingerp/fa/blob/master/reporting/forms/index.php"
click node_pdfparser "https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/pdf_parser.php"
click node_pdfcontext "https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/pdf_context.php"
click node_pdfwrappers "https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/wrapper_functions.php"

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_login,node_home,node_appmenu,node_setup,node_user toneBlue
class node_sales,node_salesmanage,node_purchasing,node_suppliermanage,node_inventory,node_items,node_manufacturing,node_dimensions toneAmber
class node_gl,node_fixedassets,node_taxes toneMint
class node_reports,node_reportforms toneRose
class node_pdfparser,node_pdfcontext,node_pdfwrappers toneIndigo
```

## Components

### Access and setup

- [Login](https://github.com/frontaccountingerp/fa/blob/master/access/login.php): `access/login.php`
- [Application home](https://github.com/frontaccountingerp/fa/blob/master/index.php): `index.php`
- [Application menu](https://github.com/frontaccountingerp/fa/blob/master/applications/application.php): `applications/application.php`
- [Company setup](https://github.com/frontaccountingerp/fa/blob/master/admin/company_preferences.php): `admin/company_preferences.php`

### Business operations

- [Sales documents](https://github.com/frontaccountingerp/fa/blob/master/sales/sales_order_entry.php): `sales/sales_order_entry.php`
- [Customer management](https://github.com/frontaccountingerp/fa/blob/master/sales/manage/customers.php): `sales/manage/customers.php`
- [Purchase orders](https://github.com/frontaccountingerp/fa/blob/master/purchasing/po_entry_items.php): `purchasing/po_entry_items.php`
- [Supplier management](https://github.com/frontaccountingerp/fa/blob/master/purchasing/manage/suppliers.php): `purchasing/manage/suppliers.php`
- [Inventory adjustments](https://github.com/frontaccountingerp/fa/blob/master/inventory/adjustments.php): `inventory/adjustments.php`
- [Item management](https://github.com/frontaccountingerp/fa/blob/master/inventory/manage/items.php): `inventory/manage/items.php`
- [Manufacturing](https://github.com/frontaccountingerp/fa/blob/master/manufacturing/work_order_entry.php): `manufacturing/work_order_entry.php`
- [Dimensions](https://github.com/frontaccountingerp/fa/blob/master/dimensions/dimension_entry.php): `dimensions/dimension_entry.php`

### Accounting

- [General ledger](https://github.com/frontaccountingerp/fa/blob/master/gl/gl_journal.php): `gl/gl_journal.php`
- [Fixed assets](https://github.com/frontaccountingerp/fa/blob/master/fixed_assets/process_depreciation.php): `fixed_assets/process_depreciation.php`
- [Tax configuration](https://github.com/frontaccountingerp/fa/blob/master/taxes/tax_groups.php): `taxes/tax_groups.php`

### Reporting

- [Report catalog](https://github.com/frontaccountingerp/fa/blob/master/reporting/reports_main.php): `reporting/reports_main.php`
- [Report forms](https://github.com/frontaccountingerp/fa/blob/master/reporting/forms/index.php): `reporting/forms/index.php`

### PDF parsing

- [PDF parser](https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/pdf_parser.php): `reporting/includes/fpdi/pdf_parser.php`
- [PDF context](https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/pdf_context.php): `reporting/includes/fpdi/pdf_context.php`
- [PDF wrappers](https://github.com/frontaccountingerp/fa/blob/master/reporting/includes/fpdi/wrapper_functions.php): `reporting/includes/fpdi/wrapper_functions.php`

### Other components

- **ERP user**

## Connections

- ERP user → Login: signs in (evidence: `README.md`)
- ERP user → Application home: opens application (evidence: `README.md`)
- Application home → Login: loads session (evidence: `index.php`)
- Application home → Application menu: displays menu (evidence: `index.php`)
- Application home → Company setup: redirects if unconfigured (evidence: `index.php`)
- ERP user → Company setup: configures company (evidence: `README.md`)
- Sales documents → General ledger: posts automatically (evidence: `README.md`)
- Purchase orders → General ledger: posts automatically (evidence: `README.md`)
- Inventory adjustments → General ledger: posts automatically (evidence: `README.md`)
- Report catalog → Report forms: offers reports
- PDF parser → PDF context: reads through (evidence: `reporting/includes/fpdi/pdf_parser.php`)
- PDF parser → PDF wrappers: uses helpers (evidence: `reporting/includes/fpdi/pdf_parser.php`)
