# Analytics Admin Panel - Gemini Instructions

## Tech Stack Overview
- **Backend:** PHP 7.4.33, Symfony 5.2.*
- **ORM:** Doctrine ORM (2.7) with Doctrine Migrations (3.0)
- **Admin Panel:** EasyAdmin Bundle 3.1
- **Frontend:** Webpack Encore, Bootstrap 4.5.3, jQuery 3.5.1, SASS
- **Testing:** PHPUnit
- **Static Analysis:** PHPStan

## Critical Code Guidelines

### PHP 7.4 Strict Constraints
- **NO PHP 8+ Features:** Because the project uses PHP 7.4.33, you MUST NOT use PHP 8+ features such as:
  - Attributes (use annotations instead: `@Route`, `@ORM\Column`, etc.)
  - Constructor Property Promotion
  - Named Arguments
  - Match Expressions
  - Union Types
  - Nullsafe operator (`?->`)
- Use typed properties (PHP 7.4 feature) where applicable.
- Use arrow functions (`fn() => ...`) when concise.

### Symfony 5.2 Conventions
- Use annotations for routing and Doctrine mapping (standard for Symfony 5.2 before the shift to PHP 8 attributes).
- Forms, Controllers, and Services should follow Symfony 5.2 best practices.

### Frontend Development
- Frontend assets are managed by **Webpack Encore**.
- To build assets, use Yarn (as `yarn.lock` is present):
  - `yarn dev` for development build
  - `yarn watch` for active development
  - `yarn build` for production build
- Use Bootstrap 4.5.3 classes for styling and SASS for custom styles in `assets/styles/`.
- JavaScript should be placed in `assets/` and compiled via Encore.

### Quality and Testing
- Run static analysis with PHPStan using the existing configuration (`phpstan.neon`).
- Run tests via `bin/phpunit`.
