Template for building a Celerp module - a working example, lint, and quickstart
Repo celerp/celerp-module-template, read from GitHub 24 min ago. celerp has not joined Take My Repo.
celerp/celerp-module-template is a public repo on GitHub by celerp. Template for building a Celerp module - a working example, lint, and quickstart. It declares the MIT license on GitHub. It is written mainly in Python, has 0 stars and last changed on 2026-11-10. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-25.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A working Celerp module you can copy and have running in about ten minutes. It adds an Equipment Maintenance page to the sidebar: track company equipment, see what is due for service, and keep a record of each service.
The page is built the Celerp way, so your module looks and behaves native:
?view=calendar on the same
page, laid out landscape so a month fits one sheet.All of it reuses Celerp's own components and JavaScript, so the behaviour matches the rest of the app and keeps matching it when the app changes.
Every feature in Celerp is a module on this same loader API - the built-in inventory, accounting, and manufacturing modules are built exactly like this one. See the full guide at https://www.celerp.com/docs/modules.html.
AGENTS.md read this first: the eight rules and what proves each
CLAUDE.md points Claude Code at AGENTS.md
acme-maintenance/ the module (copy and rename this whole folder)
__init__.py PLUGIN_MANIFEST - the module's identity and slots
acme_maintenance/ the inner Python package (underscore, not hyphen)
models.py equipment, its service log, and its files
routes.py API: list / create / edit-field / mark-serviced /
archive / restore / service log / files
ui_routes.py the /maintenance list, detail and calendar pages
resources/ files the module ships and reads with read_resource
migrations/ schema changes Celerp runs at every start
tests/ the module's suite: real database, real API app
conftest.py the harness to copy into your own module
test_api.py permissions, validation, and failure paths
test_render.py what the pages render, and what they must not
test_calendar.py the calendar view and its print rule
test_resources.py the shipped print rule is the one the page uses
test_migration.py the migration applies, and is safe to re-run
test_module.py manifest shape and domain logic, no app needed
htmlq.py a small HTML query helper for the render tests
tests/test_lint.py tests for lint.py itself
tests/test_core_parity.py lint.py against Celerp's own checks (needs Celerp 2.5.4)
lint.py check a module without installing the app
.github/workflows/ci.yml both suites on every push
Copy the acme-maintenance/ folder into your Celerp data directory's
modules/ folder:
~/Library/Application Support/Celerp/celerp-data/modules/~/.config/Celerp/celerp-data/modules/%APPDATA%\Celerp\celerp-data\modules\That folder already contains Celerp's own seeded modules. Don't edit those, and don't reuse their names - drop your module in alongside them.
In Celerp, open the Modules section and enable Equipment Maintenance. (You can skip step 1 entirely and use Import Module there to add the folder directly.)
Restart Celerp. A Maintenance entry appears under "Operations" in the sidebar. Open it, add a piece of equipment, mark it serviced, open the record, upload its manual, then switch to the calendar view and print it.
That's the whole loop. Now change something in ui_routes.py, restart, and see it.
Read AGENTS.md. It is short, and it is the difference between a module that
looks native and one that looks like a bolt-on.
Rename the folder and the inner package (keep the hyphen/underscore split:
your-thing outside, your_thing inside). Do not use a name starting
celerp- or celerp_, in any letter case - those are reserved for
Marketplace modules, and the upload refuses them.
Every package or importable file (.py, .pyc or extension) directly in the
module folder is a name Python imports it by, so none may be a name Python or Celerp already uses (no
json.py, no ui/, nothing starting celerp_).
Update PLUGIN_MANIFEST in __init__.py: name, display name, the nav slot.
The nav entry's permission is what hides it from a role that cannot use the
page; permission keys are a fixed registry in Celerp, so reuse the key that
matches what your page does rather than inventing one. Your API router should
depend on the same key, which is what makes hiding the link and refusing the
request one decision instead of two.
Rename the tables in models.py and the migrations, prefixed with your name,
and set the manifest's table_prefix to that prefix (at least 3 characters,
ending in _, such as "acme_"). No table Celerp keeps for itself may start
with the prefix, so label_, marketplace_ and bank_ are taken, and no other
installed module's prefix may overlap it: neither prefix may be a prefix of the
other. From Celerp 2.5.4 a table_prefix that is present must follow these
rules even without migrations, so leave the key out rather than setting it to
None if the module has no tables. Every table your code defines must start
with the prefix: Celerp takes out a module defining a table outside it, or any
table without one, before creating any table.
List each one in the manifest's company_backup as "include" (the company's
records, carried by a company backup) or "exclude" (this installation's state,
such as stored credentials). Celerp refuses to back up a company while one of
your tables is not listed.
To ship help pages, set the manifest's help to {"dir": "your_thing/help"}, a
folder inside the module with one JSON file per page (see
acme-maintenance/acme_maintenance/help/overview.json). Celerp lists them in
Help and Celerp AI reads them. A Celerp from before module help reads straight
past the key, so declaring it does not stop the module loading there.
lint.py checks every page against Celerp's help page format and names each
page Celerp would skip.
Copy acme-maintenance/tests/conftest.py and keep the suite honest. It stands
the real API app and the real pages up against SQLite with nothing mocked, so
a test failure means a user-visible failure.
python lint.py your-thing/ before every restart - it checks the rules the
Celerp 2.5.4 loader enforces that need only your module's files, plus the two
mistakes that are invisible at runtime, so you catch them in seconds instead
of on a failed boot. It reports two kinds of finding: problems Celerp refuses
or breaks on (an unknown slot name among them), and parts of the manifest
Celerp ignores (an unknown key, usually a typo). It exits 1 on either. Rename the folder and the
manifest name together: Celerp installs a module under its manifest name
whatever the folder is called, from 2.5.4 it will not load a module whose
folder and name differ, and lint says so if the two drift apart.
Like Celerp, it refuses a module that holds a link (to a file or a folder) or
a file it cannot read, binds or changes PLUGIN_MANIFEST anywhere but its one
literal, or runs a file that does not parse: every file Celerp runs for the
module (__init__.py, the route modules, each slot callable's module and the
migrations) and every file of the module those import. Nor may that code write
names dynamically (globals(), vars(), setattr by a computed name, exec,
a write to a function's __code__), since the source would then not show what
Celerp calls.
tests/test_core_parity.py loads every case lint checks through Celerp's own
loader and fails wherever the two disagree. Lint is stricter in a few places,
because it reads your code without running it: it refuses a slot callable it
cannot follow to a def, async def, class or lambda in your own files (a
decorated function, a star import, a functools.partial, a binding inside
if or try), a folder no one may read, and a protected import in any file,
used or not. It cannot see
other installed modules or packages, so a prefix or table clash with another
module, or a package name another module or an installed package already
uses, only shows when Celerp loads the module.
The files section on the detail page is Celerp's own component rendered against this module's endpoints, so uploads look and work like they do everywhere else. One consequence to know before you build on it: Celerp's Company Files view aggregates core entities only, and there is no slot for a module to contribute to it. Your module's files live on your module's pages. Nothing is lost or hidden, but a user looking for them in Company Files will not find them.
celerp.modules.api is the public surface for module code. It has three helpers,
and the sample module uses the first two:
await api_request(request, method, path, *, json=None, params=None) calls
Celerp's own API as the user signed in on request and returns an
httpx.Response. path is a path inside Celerp, such as /companies/me;
Celerp supplies the address, the timeout and the sign-in. It sends a JSON body
or query parameters only, so this module uploads a file as base64 inside JSON.read_resource(__file__, "resources/calendar-print.css") returns the bytes of
a file shipped with the module. Pass your own file's __file__; the path is
relative to that file's folder and must stay inside it.await ai_query(query, company_id, session_token=None, db_session=None) runs an
AI query through Celerp's own AI service and returns a dict with answer,
model_used and tools_called. Pass the request's database session: the query
runs only for that request's company and for a role allowed to use the AI
assistant.Three things follow for every module:
api_request. A module that makes network
calls of its own (its own HTTP client, sockets, or another service's API) is
reviewed by a person before it is admitted to the Community catalog, and those
calls must be declared in its listing.ai_query for any AI feature. A module that runs AI inference
itself, through a provider's SDK, its own model server, or a model address the
user configures, cannot be approved.requirements.txt, and
python lint.py reports one anywhere in the module folder.If you list your module, users see two statements you write, labelled as your own declaration: what data it touches, and what network calls it makes. Write the true, specific answer. This module's would be:
Put the same two statements in your module's README and in your directory listing, so a user reading either one sees the same answer.
Alongside nav, this template fills the search_provider slot, which
contributes a read-only, company-scoped, permission-gated provider to Celerp's
aggregated global search. The aggregator calls your async handler once per
query, gates it by the descriptor's permission, reads your rows back under
result_key, and caps the count it keeps, so the provider only finds and
returns its own matches. Unlike nav, this slot is a single descriptor, not a
list: a module contributes exactly one search provider. It carries exactly three
required keys:
handler: a dotted module:function string (here
acme_maintenance.search:global_search) for an async function returning
{result_key: [rows]}. It is exactly one module path, one :, one function
name, and the loader resolves it to source inside this module's own package
(a handler that resolves into core or another module is rejected at load).result_key: the list field those rows come back under, either "items" or
"entries". Any other value returns rows the aggregator never reads.permission: a real Celerp permission key from the same fixed registry the
nav entry uses. It is never left off, because a provider is never implicitly
public.Each row is a canonical dict: id, label, href, and an optional subtitle.
href must be an app-local path Celerp can route: it starts with a single /,
never //
celerp/celerp-module-template is a public repo on GitHub by celerp. Template for building a Celerp module - a working example, lint, and quickstart.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-10. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run celerp-module-template. What is known comes from GitHub. It declares the MIT license on GitHub. Its last change was on 2026-11-10. It has 0 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.