# Repository Guidelines

## Project Structure & Module Organization

This is a Laravel 8 application with Backpack admin tooling and Laravel Mix assets. Core PHP code lives in `app/`: controllers under `app/Http/Controllers`, Eloquent models in `app/Models`, mailables in `app/Mail`, exports in `app/Exports`, and providers in `app/Providers`. Routes are split across `routes/web.php`, `routes/auth.php`, `routes/api.php`, and Backpack admin routes in `routes/backpack/custom.php`.

Database migrations, factories, and seeders are in `database/`. Blade views, Sass/CSS, JavaScript, translations, and source images/templates are in `resources/`. Public web assets and downloadable files are in `public/`. Tests are grouped into `tests/Feature` and `tests/Unit`.

## Build, Test, and Development Commands

- `composer install` installs PHP dependencies.
- `npm install` installs frontend build dependencies.
- `cp .env.example .env && php artisan key:generate` creates local app configuration.
- `php artisan migrate --seed` applies migrations and seeders for a local database.
- `php artisan serve` runs the Laravel development server.
- `npm run dev` builds assets once with Laravel Mix.
- `npm run watch` rebuilds assets when files change.
- `npm run prod` creates production assets.
- `php artisan test` or `vendor/bin/phpunit` runs the PHPUnit suite.

## Coding Style & Naming Conventions

Follow `.editorconfig`: UTF-8, LF line endings, spaces, 4-space indentation, final newline, and trimmed trailing whitespace except in Markdown. YAML uses 2 spaces. Use PSR-4 namespaces from `composer.json` (`App\`, `Database\Factories\`, `Database\Seeders\`). Keep Laravel naming conventions: singular model classes such as `Product`, controller classes ending in `Controller`, migrations with timestamped snake_case names, and tests ending in `Test.php`.

## Testing Guidelines

PHPUnit is configured in `phpunit.xml`. Put HTTP and workflow coverage in `tests/Feature`; put isolated class behavior in `tests/Unit`. Use descriptive test method names or PHPUnit-compatible `test...` methods. The test environment uses array cache, array mail, sync queues, and disables Telescope. Add or update tests when changing routes, authentication, models, exports, or admin behavior.

## Commit & Pull Request Guidelines

Recent commit history uses short, imperative summaries, often in Hungarian or English, for example `files delete`, `phone`, or `ballagási ajánlat pdf`. Keep commits focused and concise. For pull requests, include a brief description, testing performed, related issue or task link when available, and screenshots for visible Blade/CSS changes. Note any migrations, seeders, environment changes, or public file updates explicitly.

## Security & Configuration Tips

Do not commit `.env`, credentials, generated logs, or local IDE metadata. Keep secrets in environment variables and document required keys in `.env.example` when configuration changes.
