Household access tracking for contractors and family vehicles, with multi-admin login support.
- Next.js 16 (App Router)
- SQLite (
better-sqlite3) - Tailwind CSS
- Docker / Docker Compose
- Install dependencies:
npm ci
- Configure environment:
- Set
JWT_SECRETto a value with 16+ characters. - Optionally set
DATABASE_PATH(default:data/crest-house-access.db).
- Set
- Start dev server:
npm run dev
- Open:
http://localhost:3000
On first run, create the first admin user via /setup.
- Ensure
.envcontains required values (JWT_SECRET, optionalDATABASE_PATH,HOST_PORT). - Start:
docker compose up -d --build
- App endpoint:
http://localhost:${HOST_PORT:-4826}
The container runs SQL migrations on startup (scripts/migrate.mjs) against
/app/data/crest-house-access.db by default.
admin_usersstores all login-capable users.- All admin users are full-access (no role tiers in v1).
- Contractors and family vehicles are records only and cannot log in.
This repo now includes a HACS-installable custom integration under
custom_components/crest_house_access.
This repository ships two separate deliverables and they are versioned independently:
- Main app version:
package.json - Home Assistant integration version:
custom_components/crest_house_access/manifest.json
Current baseline:
- App:
0.1.0 - HA integration:
0.3.6
Versioning rules:
- Bump the app version when the web app, admin UI, API, or database-facing app behavior changes.
- Bump the HA integration version when the Home Assistant integration changes.
- Bump both when a change affects both deliverables.
Git tag convention:
- App releases use tags like
app-v0.1.0 - HA integration releases use tags like
ha-v0.3.6
This keeps release history readable even though both artifacts live in the same repository.
sensor.on_sitebinary_sensor.site_occupiedsensor.contractorssensor.flagged_today
The on_site sensor and site_occupied binary sensor include the live
open_sessions list as attributes for automations and dashboards.
- In Home Assistant, open HACS.
- Add this repository as a custom repository with type
Integration. - Search for
Crest House Access Controland install it. - Restart Home Assistant.
- In this app, go to
Integrationsand create an API key. - In Home Assistant, add the
Crest House Accessintegration and provide:- Base URL, for example
http://your-host:4826 - API key
- Polling interval in minutes
- Base URL, for example
The integration polls GET /api/v1/status with a bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://localhost:4826/api/v1/status