Skip to content

System architecture — Overview

Describe how leekimerp fits into a standard Frappe / ERPNext deployment: clients, application layer, persistence, and third-party services.

  • leekimerp/leekimerp/hooks.py — app hooks, assets, events, schedulers
  • leekimerp/leekimerp/api/ — HTTP API surface
  • Root package.json — optional Node/socket layer (separate concern)
flowchart TB
subgraph clients["Clients"]
Browser["Browser / Desk"]
Mobile["Optional clients"]
end
subgraph frappe["Frappe / ERPNext Site"]
Desk["Desk UI + Custom Pages"]
Whitelist["@frappe.whitelist API"]
Hooks["doc_events / scheduler_events"]
Workers["Background workers / scheduler"]
end
subgraph data["Data"]
MariaDB[(MariaDB)]
Files["File attachments"]
end
subgraph external["External services"]
Xero["Xero API + Webhooks"]
Stripe["Stripe"]
DocuSign["DocuSign"]
Singpass["Singpass"]
end
Browser --> Desk
Mobile --> Whitelist
Desk --> MariaDB
Whitelist --> MariaDB
Hooks --> MariaDB
Workers --> Hooks
Whitelist --> Xero
Whitelist --> Stripe
Desk --> DocuSign
Whitelist --> Singpass

Inherited from ERPNext where applicable (Company, Sales Invoice, Employee, …) plus many custom DocTypes under lee_kim_alliance_erp/doctype/. See Custom DocTypes & data.

LayerEntry
UIFrappe Desk, custom Pages under lee_kim_alliance_erp/page/
APIleekimerp.api.* whitelisted methods
BackgroundScheduler in hooks.py, tasks in tasks.py, scheduler_events/
  • ERPNext standard modules (sales, accounts, HR, etc.) as installed on the site
  • External APIs: Xero, Stripe, DocuSign, Singpass (per configuration)
  • Site config: site_config.json on the server (secrets, not in repo)
  • Company / integration DocTypes: Xero tenants, Stripe settings, etc.
  • Long-running or failing jobs: check Error Log, scheduler logs, and integration-specific logs in Frappe.

Record Frappe / ERPNext / Python versions from your production Bench (bench version) in internal runbooks; they are not pinned in leekimerp/requirements.txt (minimal file in app).