Ergon · Developer guide
One platform. Your own tool.
Start with Hello: a small, working module that greets a signed-in staff member. No database or AI credentials needed.
- PortalAccount, organization, access
- GatewayRoutes and signed identity
- Your modulePermission check and your own logic
What you build
An independent HTTP service, a manifest and an introduction explaining the tool.
What Ergon provides
Staff sign-in, organizations, module enablement, navigation and the shared header.
What stays yours
Your application logic, UI and data. The SDK has no LifeSkills dependency.
Try Hello first
Run these commands from the repository root. You need Python 3.12–3.14, uv and Docker Compose.
uv sync --project deploy --frozen
uv run --project deploy ergon-deploy validate deploy/examples/hello.yaml
uv run --project deploy ergon-deploy render deploy/examples/hello.yaml
docker compose --project-directory deploy/out/hello up -d --build
Open https://localhost:8443/, trust the local development certificate, and sign in as developer@example.org using the initial password in deploy/out/hello/credentials.txt. Change it when prompted, then open Hello from your workspace.
Build your own module in six steps
Copy the small example
Start from
modules/hello/. Give the directory, Python package and project their own names. Regenerate its lockfile withuv lock --project modules/your-module.Declare the tool
Edit
ergon-module.json: module ID, names, audiences, permissions, navigation and introduction. All paths are relative to the module:/helpbecomes/m/hello/helpfor Hello.See the key parts of Hello’s manifest
{ "id": "hello", "permissions": [{ "id": "hello.read", "label": {"en": "Open Hello"}, "default_roles": ["staff", "viewer"] }], "nav": [{ "path": "/", "label": {"en": "Hello"}, "permission": "hello.read" }], "public_paths": ["/health", "/help", "/help/style.css"] }This is an excerpt. Copy the complete example manifest, including
contract,version,introductionandblocked_paths.Verify access, then run your logic
Use
ModuleSettings,AssertionVerifier,ErgonAuth.require("hello.read")andEnablementCache. The example’ssrc/ergon_hello/app.pyshows the complete implementation. Never trust plain user or organization headers.Explain the tool
Keep
/helpread-only and public. Explain who it’s for, what they need and what they get. Load/_ergon/shell.jsfor the shared header. UseERGON_BASE_PATHfor module links and assets.Register and install
Add its manifest and Docker build to
deploy/modules.yaml. Select its ID in an installation’smoduleslist and in each allowed organization’smoduleslist. Render and start that installation. These are explicit configuration steps; copying a folder alone does not install a module.Test the boundary
Check that the guide is public, private pages reject invalid assertions, disabled organizations and missing permissions, and displayed names are escaped. Rename the example’s permission and module IDs in its tests too.
Keep the first version small
Hello is a staff example with one read permission and no writes. Add a module-owned database only when you need storage. For writes, add permission checks, SDK CSRF validation and an origin check; Notices is the fuller example. Citizen links need their own scoped access mechanism.
For an existing installation, follow the re-rendering procedure in deploy/OPERATIONS.md, including database initialization when adding storage.
Repository guide: docs/adding-a-module.md · Runnable example: modules/hello/README.md