- DatabaseSeeder throws outside local/testing when HOMEOS_ADMIN_PASSWORD is unset, instead of silently seeding the documented `homeos-dev` password (bootstrap always runs migrate --seed, so a prod misconfig must fail loudly). - Devices\Show::saveRoom validates roomId as nullable|exists:rooms,id, so a crafted request can no longer trigger a foreign-key 500. Added a feature test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| app | ||
| bootstrap | ||
| config | ||
| database | ||
| docker | ||
| lang | ||
| public | ||
| resources | ||
| routes | ||
| storage | ||
| tests | ||
| ..env.swp | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .npmrc | ||
| CLAUDE.md | ||
| README.md | ||
| artisan | ||
| composer.json | ||
| composer.lock | ||
| design-mockup.html | ||
| docker-compose.yml | ||
| handoff.md | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml | ||
| rules.md | ||
| vite.config.js | ||
README.md
HomeOS
Self-built smart-home control plane — single household, self-hosted, LAN-first. Laravel 13 · Livewire v3 · Tailwind v4 · PostgreSQL 17 + TimescaleDB · Redis/Horizon · Reverb.
Everything runs in Docker; the host needs only Docker (no PHP/Composer/Node).
Authoritative spec: handoff.md · conventions: rules.md · guide: CLAUDE.md.
First-run setup
cp .env.example .env # dev defaults work as-is
docker compose build # build the app image
docker compose run --rm app bash docker/app/bootstrap.sh # deps + key + assets + migrate/seed
docker compose up -d # start the full stack
docker compose upalone is not the first command —vendor/,node_modulesandpublic/buildare not committed, so the bootstrap step above must run first.
Then open http://localhost and sign in with the seeded dev admin:
- admin@homeos.local / homeos-dev ← change this for anything but local dev.
For production, set strong values in .env for DB_PASSWORD, the REVERB_APP_*
keys and HOMEOS_ADMIN_PASSWORD, and run php artisan key:generate.
Everyday commands (in-container, R8)
docker compose exec app php artisan … # artisan
docker compose exec app composer … # composer
docker compose exec app npm run build # rebuild assets (or `npm run dev` for HMR)
docker compose exec app php artisan test # test suite
docker compose logs -f app # logs
Services & ports
| Service | Role | Host port |
|---|---|---|
app |
php-fpm + nginx + supervisor | ${APP_PORT:-80} |
reverb |
websockets (proxied same-origin via nginx /app) |
${REVERB_HOST_PORT:-6001} |
horizon · scheduler |
queue workers · cron | — |
db |
PostgreSQL 17 + TimescaleDB | 127.0.0.1:${DB_HOST_PORT:-5432} |
redis |
cache / queue | — |
All ports and HOST_UID/HOST_GID are env-driven in .env.