Home resource planing
- PHP 80.8%
- Twig 17.9%
- Gherkin 0.6%
- Nix 0.2%
- CSS 0.2%
- Other 0.3%
| .agents | ||
| .forgejo/workflows | ||
| .github/ISSUE_TEMPLATE | ||
| assets/css | ||
| bin | ||
| config | ||
| docs | ||
| features | ||
| migrations | ||
| public | ||
| src | ||
| templates | ||
| tests | ||
| translations | ||
| .dockerignore | ||
| .env.example | ||
| .envrc | ||
| .gitignore | ||
| behat.yml | ||
| Caddyfile | ||
| composer.json | ||
| composer.lock | ||
| docker-compose.yml | ||
| Dockerfile | ||
| flake.lock | ||
| flake.nix | ||
| HANDOFF.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Home Resource Planner (HRP)
A multi-tenant household management application built with PHP that helps families organize recipes, meal plans, grocery shopping, pantry inventory, and household tasks.
Features
- 📊 Multi-tenant — isolated per-family SQLite database, subdomain-based
tenant detection (e.g.
family1.example.com). - 🍽️ Recipes & meal planning — store recipes, plan the week, and generate shopping lists from a plan.
- 🛒 Grocery, catalog & pantry — shopping lists, a deduplicated product catalog, and pantry inventory with expiration tracking.
- 📝 Tasks — household task / chore management.
- 🤖 AI assists — optional Google Gemini recipe import and grocery taxonomy classification.
- 👥 Flexible auth — local, LDAP/Active Directory, Authelia SSO, and API keys for integrations.
- 🔒 Session isolation — per-tenant sessions with automatic database provisioning and migration.
Documentation
Full documentation lives in docs/:
- Installation & Setup
- Configuration — env vars, auth strategies, AI setup
- Architecture — multi-tenancy, module layering, request lifecycle
- CLI Reference — users, API keys, tenants, seeding
- HTTP & REST API
- Modules: Kernel · Grocery · Meals · Tasks · Account
Quick start
Requirements: PHP 8.5+, Composer, Git. Nix is optional (reproducible dev
shell via flake.nix).
git clone https://git.steffenfrosch.de/psycodepath/hrp.git
cd hrp
# Optional: enter the Nix dev shell
nix develop
composer install
cp .env.example .env
# Serve at http://localhost:8000
composer dev # php -S localhost:8000 -t public/
The database provisions and migrates itself on first request — no manual
migration step. Create a local login and sign in at /login:
php bin/console user:create admin --tenant=default \
--display-name="Admin" --password='change-me'
See Installation & Setup for multi-tenant host setup, Docker, and troubleshooting.
Project structure
hrp/
├── public/ # Web root (index.php front controller)
├── bin/console # CLI entry point (Symfony Console)
├── config/ # Container bootstrap
├── src/ # Application code (PSR-4: Hrp\)
│ ├── Kernel/ # Core infrastructure (DI, tenancy, DB, auth, routing, AI)
│ ├── Grocery/ # Lists, catalog, pantry, categories, taxonomy
│ ├── Meals/ # Recipes, meal planning, recipe import
│ ├── Tasks/ # Household tasks
│ └── Account/ # User-account domain (placeholder; auth lives in Kernel)
├── migrations/ # SQL migrations (NNN_*.up.sql / .down.sql)
├── templates/ # Twig templates
├── translations/ # i18n message catalogs
├── tests/ # PHPUnit tests
├── features/ # Behat (BDD) feature tests
└── var/ # Runtime data (per-tenant SQLite, tenants.json, cache)
Development
./vendor/bin/phpunit tests # unit & integration tests
composer behat # BDD feature tests
composer stan # PHPStan (level 8)
./vendor/bin/phpcs src tests # PSR-12 coding standard
Application logs are written to stdout as JSON (Monolog); verbosity is set
by LOG_LEVEL.
Contributing
- Fork the repository.
- Create a feature branch (
git checkout -b feature/amazing-feature). - Commit your changes.
- Push and open a pull request in Forgejo.
License
This project is licensed under the MIT License — see LICENSE.