# Modules & addon sources Two related but distinct concerns, both in `instance.py` / `addon_source.py`: - **Modules** — the catalog of installable modules, and which ones are assigned to a given instance. - **Addon sources** — where custom addon code actually comes from (a Git repo) before it can be installed. See [Architecture](../architecture.md) for why these are separate: adding a Git source is not the same step as installing it on an instance. ## `GET /api/modules` Public catalog of installable modules (name, description, category). ## `GET /api/instances//modules` Modules currently assigned to a specific instance. ## `POST /api/instances//modules` Assign a module to an instance: ```json { "module_id": 7 } ``` ## Addon sources (`addon_source.py`) | Route | Method | Purpose | |---|---|---| | `/api/addon-sources` | `GET` | List the tenant's configured addon sources | | `/api/addon-sources` | `POST` | Register a new source (e.g. a Git repo URL + branch) | | `/api/addon-sources/` | `PUT` | Update a source's configuration | | `/api/addon-sources//sync` | `POST` | Trigger a pull/sync from the remote | | `/api/addon-sources/` | `DELETE` | Remove a source | :::note Registering an addon source (Git ADD) does not install it on any instance — that's a separate, customer-triggered step per the redesigned custom-addon architecture (per-tenant `addons-` PVC on Kubernetes, or a per-tenant `addons/` directory on Docker). See [Architecture](../architecture.md) for the full flow. :::