# gaumlorenz-web/standalone-finance architecture

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

- Interactive diagram: https://gitdiagram.com/gaumlorenz-web/standalone-finance
- Repository: https://github.com/gaumlorenz-web/standalone-finance

## Overview

This is a hospitality ERP with a central financial system and five operational subsystems. Users enter through the subsystem shell, authenticate to an operational dashboard, and can exchange financial activity with the FMS; finance users manage accounting and treasury workflows, with selected actions persisted through a database service. The graph preserves the finance capabilities and cross-subsystem bridge documented by the source index. Some dashboard and backend internals were not excerpted, so uncertain connections are omitted or marked unverified.

Main entry points: [`Finance/page.tsx`](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/page.tsx) (Financial management system), [`src/App.tsx`](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/App.tsx) (Subsystem shell), [`src/services/fmsBridge.ts`](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/fmsBridge.ts) (FMS interoperability bridge), [`src/components/SubsystemDisbursementSection.tsx`](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemDisbursementSection.tsx) (Subsystem disbursements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application and Access"]
  node_app["Subsystem shell<br/>[App.tsx]"]
  node_login["Subsystem login"]
  node_auth["Subsystem authentication<br/>[subsystemAuth.ts]"]
  node_password["Password authentication<br/>[passwordAuth.ts]"]
  node_config["Multi-user config<br/>[multiUserConfig.ts]"]
end

subgraph group_operations["Operational Subsystems"]
  node_hotel["Hotel operations"]
  node_restaurant["Restaurant operations"]
  node_payroll["HR and payroll"]
  node_supply["Supply chain"]
  node_fleet["Fleet operations"]
  node_disbursement["Subsystem disbursements"]
  node_incoming["Subsystem incoming AR"]
end

subgraph group_finance["Financial Management"]
  node_fms["Financial management system<br/>[page.tsx]"]
  node_payables["Accounts payable"]
  node_receivables["Accounts receivable"]
  node_collections["Collections<br/>[Collection.tsx]"]
  node_disbursements["FMS disbursements"]
  node_ledger["General ledger<br/>[GeneralLedger.tsx]"]
  node_tax["Tax management<br/>[TaxManagement.tsx]"]
  node_cash["Cash management<br/>[CashManagement.tsx]"]
  node_reporting["Financial reporting"]
  node_forecast["Budget and forecasting"]
  node_audit["Audit trail<br/>[AuditTrail.tsx]"]
  node_charts["Financial dashboards"]
  node_fpa["FP&amp;A<br/>[DatarailsFPA.tsx]"]
  node_ai["AI budget allocation"]
  node_users["Finance user management<br/>[UserManagement.tsx]"]
  node_data["Hospitality finance data<br/>[hospitalityData.ts]"]
  node_export["Report export<br/>[ExportButton.tsx]"]
end

subgraph group_integration["Interoperability and Persistence"]
  node_bridge["FMS interoperability bridge<br/>[fmsBridge.ts]"]
  node_dbservice["Database service<br/>[databaseService.ts]"]
  node_server["Backend API server<br/>[server.ts]"]
  node_sqlite[("Finance SQLite database<br/>[horeca_finance.db]")]
end

node_user(("Staff user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_login -->|"authenticates with"| node_auth
node_login -->|"loads config"| node_config
node_login -->|"checks password"| node_password
node_auth -->|"uses hashes"| node_password
node_config -->|"uses"| node_password
node_app -->|"routes to"| node_fms
node_app -->|"routes to"| node_hotel
node_app -->|"routes to"| node_restaurant
node_app -->|"routes to"| node_payroll
node_app -->|"routes to"| node_supply
node_app -->|"routes to"| node_fleet
node_hotel -->|"uses"| node_disbursement
node_hotel -->|"uses"| node_incoming
node_restaurant -->|"uses"| node_disbursement
node_restaurant -->|"uses"| node_incoming
node_payroll -->|"uses"| node_disbursement
node_supply -->|"uses"| node_disbursement
node_fleet -->|"uses"| node_disbursement
node_hotel -->|"uses"| node_bridge
node_restaurant -->|"uses"| node_bridge
node_payroll -->|"uses"| node_bridge
node_supply -->|"uses"| node_bridge
node_fleet -->|"uses"| node_bridge
node_disbursement -->|"checks budget"| node_bridge
node_incoming -->|"uses"| node_bridge
node_fms -->|"renders"| node_payables
node_fms -->|"renders"| node_receivables
node_fms -->|"renders"| node_collections
node_fms -->|"renders"| node_disbursements
node_fms -->|"renders"| node_ledger
node_fms -->|"renders"| node_tax
node_fms -->|"renders"| node_cash
node_fms -->|"renders"| node_reporting
node_fms -->|"renders"| node_forecast
node_fms -->|"renders"| node_audit
node_fms -->|"renders"| node_charts
node_fms -->|"renders"| node_fpa
node_fms -->|"renders"| node_ai
node_fms -->|"renders"| node_users
node_fms -->|"uses"| node_data
node_fms -->|"reads and writes"| node_dbservice
node_dbservice -.->|"calls API"| node_server
node_server -.->|"persists data"| node_sqlite
node_fms -->|"renders"| node_export
node_receivables -->|"exports ledger"| node_export

click node_app "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/App.tsx"
click node_login "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemLoginPage.tsx"
click node_auth "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/subsystemAuth.ts"
click node_password "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/passwordAuth.ts"
click node_config "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/multiUserConfig.ts"
click node_hotel "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Hotel-MNGT/components/SimpleDashboard.tsx"
click node_restaurant "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Resto-MNGT/components/SimpleDashboard.tsx"
click node_payroll "https://github.com/gaumlorenz-web/standalone-finance/blob/main/HR-Payroll/components/SimpleDashboard.tsx"
click node_supply "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Supply-Chain/components/SimpleDashboard.tsx"
click node_fleet "https://github.com/gaumlorenz-web/standalone-finance/blob/main/FleetOps/components/SimpleDashboard.tsx"
click node_disbursement "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemDisbursementSection.tsx"
click node_incoming "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemIncomingArSection.tsx"
click node_fms "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/page.tsx"
click node_payables "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AccountsPayable.tsx"
click node_receivables "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AccountsReceivable.tsx"
click node_collections "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/Collection.tsx"
click node_disbursements "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DisbursementManagement.tsx"
click node_ledger "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/GeneralLedger.tsx"
click node_tax "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/TaxManagement.tsx"
click node_cash "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/CashManagement.tsx"
click node_reporting "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/FinancialReporting.tsx"
click node_forecast "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/BudgetRegressionForecast.tsx"
click node_audit "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AuditTrail.tsx"
click node_charts "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DashboardFinancialCharts.tsx"
click node_fpa "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DatarailsFPA.tsx"
click node_ai "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AiBudgetAllocationModal.tsx"
click node_users "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/UserManagement.tsx"
click node_data "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/data/hospitalityData.ts"
click node_bridge "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/fmsBridge.ts"
click node_dbservice "https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/databaseService.ts"
click node_server "https://github.com/gaumlorenz-web/standalone-finance/blob/main/server.ts"
click node_sqlite "https://github.com/gaumlorenz-web/standalone-finance/blob/main/data/horeca_finance.db"
click node_export "https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/ExportButton.tsx"

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_app,node_login,node_auth,node_password,node_config,node_user toneBlue
class node_hotel,node_restaurant,node_payroll,node_supply,node_fleet,node_disbursement,node_incoming toneAmber
class node_fms,node_payables,node_receivables,node_collections,node_disbursements,node_ledger,node_tax,node_cash,node_reporting,node_forecast,node_audit,node_charts,node_fpa,node_ai,node_users,node_data,node_export toneMint
class node_bridge,node_dbservice,node_server,node_sqlite toneRose
```

## Components

### Application and Access

- [Subsystem shell](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/App.tsx): `src/App.tsx`
- [Subsystem login](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemLoginPage.tsx): `src/components/SubsystemLoginPage.tsx`
- [Subsystem authentication](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/subsystemAuth.ts): `src/services/subsystemAuth.ts`
- [Password authentication](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/passwordAuth.ts): `src/services/passwordAuth.ts`
- [Multi-user config](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/multiUserConfig.ts): `src/services/multiUserConfig.ts`

### Operational Subsystems

- [Hotel operations](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Hotel-MNGT/components/SimpleDashboard.tsx): `Hotel-MNGT/components/SimpleDashboard.tsx`
- [Restaurant operations](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Resto-MNGT/components/SimpleDashboard.tsx): `Resto-MNGT/components/SimpleDashboard.tsx`
- [HR and payroll](https://github.com/gaumlorenz-web/standalone-finance/blob/main/HR-Payroll/components/SimpleDashboard.tsx): `HR-Payroll/components/SimpleDashboard.tsx`
- [Supply chain](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Supply-Chain/components/SimpleDashboard.tsx): `Supply-Chain/components/SimpleDashboard.tsx`
- [Fleet operations](https://github.com/gaumlorenz-web/standalone-finance/blob/main/FleetOps/components/SimpleDashboard.tsx): `FleetOps/components/SimpleDashboard.tsx`
- [Subsystem disbursements](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemDisbursementSection.tsx): `src/components/SubsystemDisbursementSection.tsx`
- [Subsystem incoming AR](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/components/SubsystemIncomingArSection.tsx): `src/components/SubsystemIncomingArSection.tsx`

### Financial Management

- [Financial management system](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/page.tsx): `Finance/page.tsx`
- [Accounts payable](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AccountsPayable.tsx): `Finance/components/AccountsPayable.tsx`
- [Accounts receivable](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AccountsReceivable.tsx): `Finance/components/AccountsReceivable.tsx`
- [Collections](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/Collection.tsx): `Finance/components/Collection.tsx`
- [FMS disbursements](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DisbursementManagement.tsx): `Finance/components/DisbursementManagement.tsx`
- [General ledger](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/GeneralLedger.tsx): `Finance/components/GeneralLedger.tsx`
- [Tax management](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/TaxManagement.tsx): `Finance/components/TaxManagement.tsx`
- [Cash management](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/CashManagement.tsx): `Finance/components/CashManagement.tsx`
- [Financial reporting](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/FinancialReporting.tsx): `Finance/components/FinancialReporting.tsx`
- [Budget and forecasting](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/BudgetRegressionForecast.tsx): `Finance/components/BudgetRegressionForecast.tsx`
- [Audit trail](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AuditTrail.tsx): `Finance/components/AuditTrail.tsx`
- [Financial dashboards](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DashboardFinancialCharts.tsx): `Finance/components/DashboardFinancialCharts.tsx`
- [FP&A](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/DatarailsFPA.tsx): `Finance/components/DatarailsFPA.tsx`
- [AI budget allocation](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/AiBudgetAllocationModal.tsx): `Finance/components/AiBudgetAllocationModal.tsx`
- [Finance user management](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/UserManagement.tsx): `Finance/components/UserManagement.tsx`
- [Hospitality finance data](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/data/hospitalityData.ts): `Finance/data/hospitalityData.ts`
- [Report export](https://github.com/gaumlorenz-web/standalone-finance/blob/main/Finance/components/ExportButton.tsx): `Finance/components/ExportButton.tsx`

### Interoperability and Persistence

- [FMS interoperability bridge](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/fmsBridge.ts): `src/services/fmsBridge.ts`
- [Database service](https://github.com/gaumlorenz-web/standalone-finance/blob/main/src/services/databaseService.ts): `src/services/databaseService.ts`
- [Backend API server](https://github.com/gaumlorenz-web/standalone-finance/blob/main/server.ts): `server.ts`
- [Finance SQLite database](https://github.com/gaumlorenz-web/standalone-finance/blob/main/data/horeca_finance.db): `data/horeca_finance.db`

### Other components

- **Staff user**

## Connections

- Staff user → Subsystem shell: uses (evidence: `src/App.tsx`)
- Subsystem shell → Subsystem login: routes to (evidence: `src/App.tsx`)
- Subsystem login → Subsystem authentication: authenticates with (evidence: `src/components/SubsystemLoginPage.tsx`)
- Subsystem login → Multi-user config: loads config (evidence: `src/components/SubsystemLoginPage.tsx`)
- Subsystem login → Password authentication: checks password (evidence: `src/components/SubsystemLoginPage.tsx`)
- Subsystem authentication → Password authentication: uses hashes (evidence: `src/services/subsystemAuth.ts`)
- Multi-user config → Password authentication: uses (evidence: `src/services/multiUserConfig.ts`)
- Subsystem shell → Financial management system: routes to (evidence: `src/App.tsx`)
- Subsystem shell → Hotel operations: routes to (evidence: `src/App.tsx`)
- Subsystem shell → Restaurant operations: routes to (evidence: `src/App.tsx`)
- Subsystem shell → HR and payroll: routes to (evidence: `src/App.tsx`)
- Subsystem shell → Supply chain: routes to (evidence: `src/App.tsx`)
- Subsystem shell → Fleet operations: routes to (evidence: `src/App.tsx`)
- Hotel operations → Subsystem disbursements: uses (evidence: `Hotel-MNGT/components/SimpleDashboard.tsx`)
- Hotel operations → Subsystem incoming AR: uses (evidence: `Hotel-MNGT/components/SimpleDashboard.tsx`)
- Restaurant operations → Subsystem disbursements: uses (evidence: `Resto-MNGT/components/SimpleDashboard.tsx`)
- Restaurant operations → Subsystem incoming AR: uses (evidence: `Resto-MNGT/components/SimpleDashboard.tsx`)
- HR and payroll → Subsystem disbursements: uses (evidence: `HR-Payroll/components/SimpleDashboard.tsx`)
- Supply chain → Subsystem disbursements: uses (evidence: `Supply-Chain/components/SimpleDashboard.tsx`)
- Fleet operations → Subsystem disbursements: uses (evidence: `FleetOps/components/SimpleDashboard.tsx`)
- Hotel operations → FMS interoperability bridge: uses (evidence: `Hotel-MNGT/components/SimpleDashboard.tsx`)
- Restaurant operations → FMS interoperability bridge: uses (evidence: `Resto-MNGT/components/SimpleDashboard.tsx`)
- HR and payroll → FMS interoperability bridge: uses (evidence: `HR-Payroll/components/SimpleDashboard.tsx`)
- Supply chain → FMS interoperability bridge: uses (evidence: `Supply-Chain/components/SimpleDashboard.tsx`)
- Fleet operations → FMS interoperability bridge: uses (evidence: `FleetOps/components/SimpleDashboard.tsx`)
- Subsystem disbursements → FMS interoperability bridge: checks budget (evidence: `src/components/SubsystemDisbursementSection.tsx`)
- Subsystem incoming AR → FMS interoperability bridge: uses (evidence: `src/components/SubsystemIncomingArSection.tsx`)
- Financial management system → Accounts payable: renders (evidence: `Finance/page.tsx`)
- Financial management system → Accounts receivable: renders (evidence: `Finance/page.tsx`)
- Financial management system → Collections: renders (evidence: `Finance/page.tsx`)
- Financial management system → FMS disbursements: renders (evidence: `Finance/page.tsx`)
- Financial management system → General ledger: renders (evidence: `Finance/page.tsx`)
- Financial management system → Tax management: renders (evidence: `Finance/page.tsx`)
- Financial management system → Cash management: renders (evidence: `Finance/page.tsx`)
- Financial management system → Financial reporting: renders (evidence: `Finance/page.tsx`)
- Financial management system → Budget and forecasting: renders (evidence: `Finance/page.tsx`)
- Financial management system → Audit trail: renders (evidence: `Finance/page.tsx`)
- Financial management system → Financial dashboards: renders (evidence: `Finance/page.tsx`)
- Financial management system → FP&A: renders (evidence: `Finance/page.tsx`)
- Financial management system → AI budget allocation: renders (evidence: `Finance/page.tsx`)
- Financial management system → Finance user management: renders (evidence: `Finance/page.tsx`)
- Financial management system → Hospitality finance data: uses (evidence: `Finance/page.tsx`)
- Financial management system → Database service: reads and writes (evidence: `Finance/page.tsx`)
- Database service → Backend API server: calls API
- Backend API server → Finance SQLite database: persists data
- Financial management system → Report export: renders (evidence: `Finance/page.tsx`)
- Accounts receivable → Report export: exports ledger (evidence: `Finance/components/AccountsReceivable.tsx`)
