AI-ready access control and presence system with modular LPR/gate integrations, Home Assistant support, Apprise notifications, multi-provider LLM tooling, and a realtime React dashboard.
Future AI agents should read AGENTS.md before making changes.
cp .env.example .env
mkdir -p data/backend data/chat_attachments data/postgres data/redis logs/backend logs/frontend
docker compose up --buildOn first development start, the backend creates data/backend/auth-secret.key
with a random root secret. This key signs sessions and encrypts dynamic
secrets. Keep it backed up, do not commit it, and use Settings -> Auth to rotate
it. Production/non-development environments must provide either that file or a
non-default IACS_AUTH_SECRET_KEY before startup.
Backend health endpoints:
GET http://localhost:8088/GET http://localhost:8088/healthGET http://localhost:8088/api/v1/health
Frontend app:
http://localhost:8089- LAN:
http://<host-ip>:8089 - NPM target:
http://<docker-host-ip>:8089
The backend container listens on port 8000 internally, while the host-facing
port defaults to 8088 to avoid common conflicts. Change BACKEND_PORT in
.env if needed. The service binds to 0.0.0.0, so it is reachable on the LAN
at http://<host-ip>:8088.
For Nginx Proxy Manager, proxy to http://<docker-host-ip>:8089, enable
WebSocket support, and keep the standard forwarded headers enabled. The
frontend Nginx service serves the React app and proxies /api/* plus WebSocket
upgrades to the backend container. Use backend port 8088 only for API-only
debugging.
The backend image and backend virtualenv install the project dev extras,
including pytest and pytest-asyncio. Use the repo test wrapper so pytest is
resolved consistently from the live Compose container when available, or from
backend/.venv otherwise:
./scripts/backend-pytestFor a focused test file:
./scripts/backend-pytest tests/test_dependency_updates.pyFrontend guardrail tests run with Vitest:
cd frontend && npm run testSchema changes are managed through Alembic. Normal Compose startup runs
alembic upgrade head when IACS_AUTO_CREATE_SCHEMA=true; the previous
transitional bootstrap DDL is available only for older local databases by
setting IACS_LEGACY_SCHEMA_BOOTSTRAP=true.
backend/app/core: configuration, logging, lifecycle wiring.backend/app/api: HTTP and WebSocket API routers.backend/app/modules: swappable hardware and service integrations.backend/app/services: core orchestration services that depend on module interfaces.backend/app/db: SQLAlchemy session and migration-ready database wiring.backend/app/workers: reserved package; current background services start from the FastAPI lifespan.backend/app/simulation: mock event endpoints for hardware-free testing.backend/app/ai: Alfred tool registry, domain tool groups, and provider boundaries.
Docker storage uses host bind mounts only. No Docker named volumes are declared.
The backend and updater containers mount the repository at /workspace; the updater
service also mounts Docker's socket for dependency update jobs.
POST /api/v1/webhooks/ubiquiti/lprPOST /api/v1/simulation/arrival/{registration_number}POST /api/v1/simulation/misread-sequence/{registration_number}POST /api/v1/simulation/e2e/full-access-flow(Admin)GET /api/v1/eventsGET /api/v1/alertsPATCH /api/v1/alerts/actionGET /api/v1/alerts/{alert_id}/snapshotGET /api/v1/presenceGET /api/v1/access/movementsGET /api/v1/access/gate-commandsWS /api/v1/realtime/ws
See docs/phase-2.md for the current data model and movement-session behavior.
GET /api/v1/integrations/home-assistant/statusPOST /api/v1/integrations/gate/openPOST /api/v1/integrations/announcements/sayPOST /api/v1/integrations/notifications/test
See docs/phase-3.md for Home Assistant, TTS, presence sync, and Apprise configuration.
GET /api/v1/ai/providersGET /api/v1/ai/toolsPOST /api/v1/ai/chatWS /api/v1/ai/chat/ws
See docs/phase-4.md for provider configuration, agent tools, and conversational memory behavior.
Anonymous:
curl -fsS http://localhost:8089/api/v1/health
curl -fsS http://localhost:8089/api/v1/auth/statusDashboard routes such as /api/v1/maintenance/status, /api/v1/leaderboard,
/api/v1/presence, and /api/v1/events require an authenticated Admin session
after first-run setup.
The frontend is served by the frontend Docker service on port 8089 and
proxies API/WebSocket traffic to the backend.
See docs/phase-5.md for UI routes, NPM setup, and verification notes.
Future implementation work should start with AGENTS.md, which documents the architecture, modular I/O rules, API surface, UI design language, reverse-proxy expectations, and safe extension points for future AI agents.