Reference track
What BenchPress is made of, rather than how to use it or how to run it.
Who this is for. Somebody who calls the API from another program, changes
the code, or has to answer a question the other two tracks do not cover.
Before you start. The user track and the
operator track describe the same system as tasks. This track
assumes you have watched one deploy run. Read
Deploy from a template first if you have not.
Pick a page by the question you have
| Question | Page |
|---|---|
| What are the moving parts, and which module owns each one | Architecture |
| What DocTypes exist, what fields they carry, and who may read a row | Data model |
| What can I call over HTTP, and what does it check | API |
| What happens between "Deploy" and a running site | Deploy pipeline |
| What corrects the database when reality changes underneath it | Lifecycle and events |
| What address does a bench answer on, and who can reach it | Networking |
| How does a screen update without a page reload | Realtime |
| Which change needs a rebuild, and which needs a restart | Configuration |
| What can I run from a shell | CLI and scripts |
| What does this word mean here | Glossary |
What this track is counted against
The numbers below are the size of the surface each page documents. Every page
accounts for its whole set. A page that omits a member says which one and why.
| Surface | Count | Documented in |
|---|---|---|
| DocTypes in the BenchPress module | 20 | Data model |
@frappe.whitelist() functions |
50 | API |
| Deploy steps | 11 | Deploy pipeline |
| Scheduled jobs | 11 | Lifecycle and events |
| Realtime events | 6 | Realtime |
Two rules that explain most of the code
Both are repository conventions, and both are enforced.
- Query with
frappe.qb, neverfrappe.db.sql. A raw string query is a
lint failure. - Every whitelisted function checks permissions itself. The decorator only
publishes the function. It grants nothing. See
How an endpoint is guarded.
Behavior also lives in hooks.py, not only in the file you are reading. Check
it before you assume a save does the plain thing.
Where the code lives
| Path | Holds |
|---|---|
benchpress/*.py |
the modules — one concern each |
benchpress/credits/*.py |
leases, balances, admission, and the caps |
benchpress/benchpress/doctype/<name>/ |
the DocType JSON and its controller |
benchpress/hooks.py |
permission rules, document events, scheduled jobs |
frontend/src/ |
the Vue 3 single-page app |
docs/ |
this documentation, in MDX |
Related
- Architecture — the map to read first.
- Operator track — the same system, from the host side.
- Settings reference — every field on the two settings documents.
Last updated 5 minutes ago
Was this helpful?