Critical paths — end-to-end flows
Purpose
Section titled “Purpose”This page is the single hub for end-to-end understanding: from Desk / API through DocTypes and hooks to external systems, deployment, and failure modes. Use it after the Start guide when you must change behavior on a critical business path—not only read one integration page in isolation.
Each path below follows the same skeleton: domain narrative → module & DocTypes → integrations & APIs → hooks / schedulers → operations → ADRs.
How this maps to Diátaxis
Section titled “How this maps to Diátaxis”| Diátaxis quadrant | Where it lives for these flows |
|---|---|
| Tutorial | Reading order, Scenario: Billing → Xero, Scenario: Payroll |
| How-to | Integration pages (Xero, Stripe, …), Operational runbook |
| Explanation | Domain — … pages, System overview, this hub |
| Reference | DocType reference, API inventory |
Generated DocType pages remain Reference only; procedural steps belong in How-to and domain pages (Domain documentation strategy).
Overview diagram
Section titled “Overview diagram”1. Payments — Stripe → Sales Invoice
Section titled “1. Payments — Stripe → Sales Invoice”| Layer | Links |
|---|---|
| Explanation | Domain — Finance & AR |
| How-to | Stripe integration |
| Reference | API inventory (stripe modules), finance-ar-integrations DocTypes |
| Hooks / routes | leekimerp/hooks.py (website_route_rules for webhooks), leekimerp/api/stripe.py, leekimerp/api/stripe_webhook.py |
| Operations | Deployment & operations, Operational runbook — webhook URLs, secrets in site config |
| Decisions | Architecture decisions |
Failure modes to rehearse: webhook signature mismatch, duplicate Payment Entry, guest API abuse — see Security checklist.
2. Payroll — Singapore HR → Salary Slip
Section titled “2. Payroll — Singapore HR → Salary Slip”| Layer | Links |
|---|---|
| Explanation | Domain — Payroll & HR, Payroll module |
| Tutorial | Scenario: Singapore payroll |
| Reference | payroll-hr DocTypes, API inventory |
| Hooks | Doc events — Employee, Salary Slip, Payroll Entry; Schedulers |
| Scripts | leekimerp/scripts/salary_slip.py, leekimerp/hook_methods.py (verify in repo) |
| Operations | Long runs off-peak; scheduler logs — Operational runbook |
3. Finance — Billing → Xero AR
Section titled “3. Finance — Billing → Xero AR”| Layer | Links |
|---|---|
| Explanation | Domain — Finance & AR |
| Tutorial | Scenario: Billing → Xero |
| Modules | Billing flow, Xero tenant & contacts |
| How-to | Xero integration |
| Reference | finance-ar-integrations, API inventory (xero) |
| Code | leekimerp/api/xero.py |
| Operations | OAuth token refresh, webhook delivery — Environment matrix |
4. Incorporation — Application lifecycle & PDFs
Section titled “4. Incorporation — Application lifecycle & PDFs”| Layer | Links |
|---|---|
| Explanation | Domain — Incorporation & application |
| Module | Application lifecycle & PDFs |
| How-to | DocuSign where e-sign is in scope |
| Reference | incorporation-application DocTypes |
| Hooks | Doc events — Application on_update → PDF generation (see inventory table) |
| Flows | Business logic flows |
5. Identity & portal — Singpass
Section titled “5. Identity & portal — Singpass”| Layer | Links |
|---|---|
| Explanation | Domain — Platform & admin |
| How-to | Singpass integration |
| Reference | platform-admin DocTypes, API inventory |
| Security | Security checklist — guest and token surfaces |
Related
Section titled “Related”- Container view (C4) — runtime containers
- Architecture index (Arc42-style) — “one book” map
- Engineering deliverables — NFR/SLO, release, tests, threat model, ADR practice
- Documentation conventions — code paths and Diátaxis tagging