4.3 KiB
4.3 KiB
Bahmcloud Store - Developer Documentation
For contributors and maintainers.
Project Scope
Bahmcloud Store is evolving from an integration-only store into a broader Home Assistant git-based content store.
Currently supported install categories:
- Integrations
- Blueprints
Planned categories:
- Templates
- Lovelace / dashboard designs
- Additional content types with category-specific install logic
Repository Layout
Repositories related to the project:
- Installer add-on:
https://git.bahmcloud.de/bahmcloud/addons - Core integration:
https://git.bahmcloud.de/bahmcloud/bahmcloud_store - Store index:
https://git.bahmcloud.de/bahmcloud/ha_store
Integration Layout
custom_components/bahmcloud_store/
__init__.py: setup, panel registration, delayed startup refresh, periodic refreshcore.py: index merge, repo enrichment, install/update/uninstall, backup/restore, category-aware install groundworkproviders.py: provider detection, latest version lookup, release notes, README fetchingmetadata.py: readsbcs.yaml,hacs.json, andhacs.yamlstorage.py: persistent storage for installed repos, settings, cachesviews.py: HTTP APIupdate.py: Home Assistant update entitiesrepairs.py: restart-required repair flowpanel/: active frontend panelmanifest.json
Runtime Model
RepoItem: merged repository model used by the UI and backend- Installed repositories: persisted in Home Assistant storage
- Settings: persistent UI and behavior settings such as HACS enablement and pinned repositories
- Repo cache: provider and metadata enrichment cache
- HACS cache: display metadata cache for HACS integration repositories
Metadata
Metadata priority:
bcs.yamlhacs.yamlhacs.json
Common fields:
name: Example Project
description: Short description
category: Integrations
author: Example Author
maintainer: Example Maintainer
Category currently matters operationally:
Integrations-> install fromcustom_components/...Blueprint/Blueprints-> install fromblueprints/...
Supported Install Categories
Integrations
- Expected source layout:
custom_components/<domain>/manifest.json - Install target:
/config/custom_components/<domain> - Supports backup, restore, update entities, and restart-required flow
Blueprints
- Expected source layout:
blueprints/... - Install target:
/config/blueprints/... - Initial support is focused on direct install and uninstall
- Category-aware groundwork is in place so future content types can use their own install strategies
HTTP API
Base path: /api/bcs
GET /api/bcsPOST /api/bcs?action=refreshGET /api/bcs/settingsPOST /api/bcs/settingsGET /api/bcs/readme?repo_id=...GET /api/bcs/release_notes?repo_id=...&ref=...GET /api/bcs/versions?repo_id=...GET /api/bcs/repo?repo_id=...POST /api/bcs/install?repo_id=...&version=...POST /api/bcs/update?repo_id=...&version=...POST /api/bcs/uninstall?repo_id=...GET /api/bcs/backups?repo_id=...POST /api/bcs/restore?repo_id=...&backup_id=...POST /api/bcs/restartDELETE /api/bcs/custom_repo?id=...
Current UI Features
- Search, source filter, category filter, state filter, sorting
- HACS integration source toggle
- Pinned repositories
- README rendering
- Release notes rendering
- Version selection
- Backup restore UI for integrations
Contributing to the Official Store Index
Add a repository to the BCS store index in ha_store.
Example index entry:
- name: Example Project
url: https://your-git-hoster.example/org/repo
category: Blueprint
Recommended repository metadata:
name: Example Project
description: One-line description
category: Blueprint
author: Example Author
maintainer: Example Maintainer
Validation should match the category:
- Integrations: verify
custom_components/<domain>/manifest.json - Blueprints: verify
blueprints/...
Design Direction
The long-term architecture should remain category-aware:
- category -> validation strategy
- category -> install target
- category -> backup / restore behavior
- category -> UI affordances
This is especially important before Templates and Lovelace support are added, because those should stay compatible with established HACS expectations where possible.