# Repository Guidelines ## Project Structure & Module Organization This is the Gruene Seele partner, e-commerce, and inventory application, using Laravel 11 and PHP 8.2+ (Docker uses PHP 8.4). - `app/Http/` contains controllers and middleware; `app/Repositories/` and `app/Services/` hold business logic. Models live in `app/Models/`, with the user model at `app/User.php`. - `routes/web.php` defines main, promotion, and shop domain routes; `routes/api.php` contains API endpoints. - `resources/views/` holds Blade templates, `resources/lang/` translations, and `resources/assets/` JavaScript, Sass, and theme assets. `public/` serves web assets. - `database/` contains migrations, factories, and seeders; `tests/Unit/` and `tests/Feature/` contain automated tests. - `packages/digital-bird/shoppingcart/` is the Composer-autoloaded cart fork. `dev/` contains integrations and planning material; `docs/` includes inventory test guidance. ## Build, Test, and Development Commands - `composer install`: install locked PHP dependencies. - `php artisan serve --no-interaction`: run locally with configured database and domain settings. - `npm run dev`, `npm run watch`, `npm run prod`: build development assets, watch changes, or build production assets using Laravel Mix. Current `webpack.mix.js` references missing `resources/js/app.js` and `resources/sass/app.scss`; resolve entry points before expecting builds to pass. - `php artisan test --no-interaction`: run the test suites; add `--filter=ExampleTest` for a focused run. - `vendor/bin/pint --dirty`: format changed PHP files. `composer format` formats the full project; `pint.json` uses the Laravel preset and excludes `dev/`. ## Coding Style & Naming Conventions Use four-space PHP indentation, PascalCase classes, camelCase methods, and descriptive timestamped snake_case migrations. Follow neighboring Blade and JavaScript conventions. Keep controllers thin by delegating to repositories and services. Preserve the existing Laravel directory layout, including HTTP/console kernels, and use the `user` authentication guard. ## Testing Guidelines Pest 2 and PHPUnit are available; existing tests use PHPUnit classes named `*Test.php`. Put isolated logic tests in `Unit` and application behavior tests in `Feature`. `phpunit.xml` forces SQLite in-memory storage and array mail/cache drivers. Add regression coverage for behavior changes; no minimum coverage threshold is configured. Follow `docs/testleitfaden-wawi-2026-07-06.md` for inventory validation. ## Commit & Pull Request Guidelines Recent commits use German, topic-prefixed summaries, often with work-package IDs: `Warenwirtschaft: AP-34 — Varianten-Artikelnummer korrekt zuordnen`. Keep commits focused. PRs should explain the behavior change, link relevant issues or AP IDs, list validation results and migration/configuration steps, and include screenshots for UI changes. Exclude credentials and unrelated local edits.