Platform primer — Frappe, ERPNext, and this app
Purpose
Section titled “Purpose”Align vocabulary: what Frappe provides, what ERPNext (and HRMS) add, and what leekimerp implements on top.
Stack boundaries
Section titled “Stack boundaries”| Layer | What it is | In this project |
|---|---|---|
| Frappe | Python web framework, Desk UI, DocType ORM, permissions, hooks | All custom app code runs as a Frappe app named leekimerp |
| ERPNext | Accounting, selling, stock, projects, etc. | Installed on site; Sales Invoice, Customer, Item, Company, Account used in flows |
| HRMS / payroll | HR and payroll (version depends on bench stack) | Employee, Salary Slip, Payroll Entry extended via scripts/ and hooks |
| leekimerp | Custom app in leekimerp/ | Lee Kim DocTypes (lee_kim_alliance_erp/), api/, override/, integrations |
Runtime components
Section titled “Runtime components”Realtime (optional)
Section titled “Realtime (optional)”This repo may ship a custom Node socket.io server for realtime notifications — see Socket.io realtime. It is not the same process as Frappe’s default Socket.IO; align Procfile with your deployment.
Key files to remember
Section titled “Key files to remember”| File | Role |
|---|---|
leekimerp/hooks.py | Doc events, schedulers, overrides, fixtures |
leekimerp/api/*.py | Whitelisted HTTP endpoints |
leekimerp/lee_kim_alliance_erp/doctype/ | Custom DocType definitions |
Related
Section titled “Related”Permissions and multi-company behavior
Section titled “Permissions and multi-company behavior”Frappe enforces Role and User Permission rules per DocType. ERPNext adds Company as a dimension on many financial documents.
| Concept | Practical effect |
|---|---|
| Role Profile | Bundles DocType permissions for job functions |
| User Permissions | Restrict rows (e.g. only certain Companies or Territories) |
| Company on transactions | Wrong company on Sales Invoice or Payroll Entry breaks reporting and tax |
Integration code often assumes a Company context — verify frappe.defaults and document-level company fields when debugging “works for admin, fails for user” issues.
What ships in leekimerp vs what you install on the site
Section titled “What ships in leekimerp vs what you install on the site”| Artifact | Location |
|---|---|
| Custom app code | leekimerp/ Python package |
| Site database | MariaDB — not in git |
| ERPNext / HRMS | Installed apps on the Bench site |
bench install-app leekimerp registers the app; data (customers, invoices) lives in the site DB. The handover repo does not contain production data.
Mental model for new developers
Section titled “Mental model for new developers”- Frappe answers: routing, ORM, permissions, Desk, hooks.
- ERPNext answers: accounting and standard business documents.
- leekimerp answers: Lee Kim workflows, integrations, overrides.
When unsure whether behavior is standard or custom, compare with a vanilla ERPNext site on the same major version, or read upstream source in apps/erpnext on your Bench.