2.9 KiB
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/andapp/Services/hold business logic. Models live inapp/Models/, with the user model atapp/User.php.routes/web.phpdefines main, promotion, and shop domain routes;routes/api.phpcontains API endpoints.resources/views/holds Blade templates,resources/lang/translations, andresources/assets/JavaScript, Sass, and theme assets.public/serves web assets.database/contains migrations, factories, and seeders;tests/Unit/andtests/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. Currentwebpack.mix.jsreferences missingresources/js/app.jsandresources/sass/app.scss; resolve entry points before expecting builds to pass.php artisan test --no-interaction: run the test suites; add--filter=ExampleTestfor a focused run.vendor/bin/pint --dirty: format changed PHP files.composer formatformats the full project;pint.jsonuses the Laravel preset and excludesdev/.
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.