Commit Graph

35 Commits

Author SHA1 Message Date
Serreau Jovann
1e41a9746c Fix test coverage and PHPUnit notices
- RegistrationController: add POST tests (valid + invalid data)
- ViteAssetExtension: add tests for manifest file loading, faviconsProd, isMobile, getNonce
- CacheService: fix mock return values to suppress PHPUnit notices
- User: add comment to empty eraseCredentials method
- Email base template: add title tag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:14:04 +01:00
Serreau Jovann
a9a7019a6f Fix failing controller tests: Content-Type matching, missing logo.jpg
- Use assertStringContainsString for Content-Type (Symfony adds charset)
- Create fake logo.jpg in CI for EmailTracking test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:04:31 +01:00
Serreau Jovann
6bbfe28c05 Fix CI: downgrade setup-bun to v1, fix test database name
- setup-bun v2 uses node24, downgrade to v1 (node20 compat)
- DB name e_ticket + Symfony _test suffix = e_ticket_test
- Add doctrine:database:create before schema:create

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:00:43 +01:00
Serreau Jovann
89f74de702 Add missing templates, add PostgreSQL and Redis services to CI
- Create 13 missing Twig templates (account, security, legal, unsubscribe, pages)
- CI: add PostgreSQL and Redis service containers for php and sonarqube jobs
- CI: create database schema before running tests
- Use null mailer in test environment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:57:38 +01:00
Serreau Jovann
2d90440692 Run SonarQube only after php and frontend jobs succeed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:54:34 +01:00
Serreau Jovann
dc21c6a738 Consolidate CI: merge jobs, add coverage to SonarQube
- Merge lint, quality-php, security, test into single php job
- Merge quality-frontend and build into single frontend job
- SonarQube: generate coverage.xml before scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:53:47 +01:00
Serreau Jovann
dc3d464b17 Add PHPUnit tests with coverage for all src classes
- 21 test files covering controllers, services, entities, enums, messages
- CI: add test job with Xdebug coverage (clover + text)
- SonarQube: configure coverage report path and test sources

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:50:23 +01:00
Serreau Jovann
d13e9b6b80 Downgrade setup-node to v3 for Gitea runner compat (node20)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:45:21 +01:00
Serreau Jovann
709d8f3f9a Fix Stylelint import-notation: use string instead of url()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:44:25 +01:00
Serreau Jovann
7a2f54a491 Add Node.js 22 setup in CI for frontend jobs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:40:43 +01:00
Serreau Jovann
ec020e36de Downgrade Stylelint to v16 for Node.js 18 compat in CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:40:15 +01:00
Serreau Jovann
eb5e3891ac Remove debug console.log from app.js
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:38:42 +01:00
Serreau Jovann
c969b4e3ff Fix SonarQube issues: reduce returns, remove unused vars, fill empty blocks
- CspReportController: reduce to 3 returns
- RegistrationController: reduce to 3 returns
- SitemapController: extract CONTENT_TYPE_XML constant, remove unused $offset
- UnsubscribeController: implement unsubscribe via UnsubscribeManager
- MessengerFailureSubscriber: log error in catch block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:38:08 +01:00
Serreau Jovann
9a41aac416 Apply PHP CS Fixer formatting rules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:33:20 +01:00
Serreau Jovann
12344fe33d Add SonarQube scan to CI pipeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:21:07 +01:00
Serreau Jovann
90cb2be14c Downgrade ESLint to v9 for Node.js compat in CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:14:21 +01:00
Serreau Jovann
886a75f098 Fix all PHPStan level 6 errors
- Add missing use App\Entity\EmailTracking in MailerService
- Add PHPDoc types for array params/returns in MeilisearchService, MeilisearchMessage, ViteAssetExtension
- Remove redundant array_values() in UnsubscribeManager
- Ignore Doctrine-managed $id property warnings in phpstan.neon

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:11:51 +01:00
Serreau Jovann
160369f0f6 Add CI pipeline, Meilisearch service, CacheService and code quality tools
- CI: lint, PHPStan, PHP CS Fixer, ESLint, Stylelint, security audit, build
- MeilisearchService: async via Messenger, sync search
- MeilisearchMessage + handler for async operations
- CacheService with CacheKey enum (TTL per key, remember pattern)
- Meilisearch env vars in .env.local, vault and env.local.j2
- Messenger routing for MeilisearchMessage
- PHPStan level 6, ESLint, Stylelint configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:08:54 +01:00
Serreau Jovann
6173171778 Add SEO, sitemap, robots, search, Meilisearch and security files
- JSON-LD: Organization, WebSite with SearchAction, BreadcrumbList
- SitemapController: sitemapindex with main + paginated events (images/videos)
- RobotsController: dynamic robots.txt with sitemap URL
- SearchController: /search with Meilisearch (TODO)
- Meilisearch added to dev and prod docker-compose
- Breadcrumbs added to all controllers
- .well-known: security.txt, humans.txt, dnt-policy.txt
- PGP public key in public/key.asc
- SecurityController: /mot-de-passe + .well-known/change-password route

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:59:22 +01:00
Serreau Jovann
04becc238b Add MessengerLog, async mailer, doctrine fixes
- MessengerLog entity: store all messenger failures with full details
- MessengerFailureSubscriber: log errors + send alert email synchronously
- MailerService: dispatch emails via Messenger bus (async)
- Makefile: add entity command
- Doctrine: enable Second Level Cache in prod, remove deprecated config
- Liip Imagine: set twig mode to lazy
- Fix app.scss @use/@import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:43:10 +01:00
Serreau Jovann
8d8d70cab4 Add email tracking, CSP reporting, security controllers and services
- EmailTracking entity + repository + pixel tracking controller
- CspReportController: filter noise, alert on real violations
- RedirectController: external redirect warning page
- UnsubscribeManager: HMAC-based unsubscribe with hashed storage
- MailerService: rewrite with S/MIME, tracking, unsubscribe headers
- ViteAssetExtension: add nonce CSP via Nelmio, isMobile
- composer: add stripe/stripe-php, mobiledetect
- Templates: add home/index, update base.html.twig with vite_asset
- Email template: rebrand to E-Ticket

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:35:36 +01:00
Serreau Jovann
46a84a9f9a Merge deploy playbooks, add env.local template, update MailerService
- Fuse deploy-caddy.yml and cloudflare.yml into deploy.yml
- Add env.local.j2 template for production secrets
- Vault: add all production secrets
- Workflow: single deploy.yml playbook
- MailerService: rewrite with S/MIME signing, email tracking, unsubscribe
- ngrok-sync: run as root for .env.local write access
- Fix domain references to ticket.e-cosplay.fr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:24:31 +01:00
Serreau Jovann
8e34a5b3a6 Fix WORKDIR, rename DB to e_ticket, simplify purge_dev
- Add WORKDIR /app to dev and prod Dockerfiles
- Rename database from e-ticket to e_ticket (PostgreSQL compat)
- purge_dev: remove only containers and volumes, keep images

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:12:42 +01:00
Serreau Jovann
2d02ba4cbb Add S3/MinIO storage, nelmio security and CSP config
- Flysystem S3 adapter configured for MinIO
- Vich uploader switched to Flysystem S3 storage
- Liip imagine loader/resolver on S3
- S3 client service with path style endpoint for MinIO
- Nelmio security: CSP, clickjacking, permissions policy, external redirects
- CSP dev: allow Vite HMR (localhost:5173)
- CSP prod: nonce scripts, restricted form-action and connect-src
- composer: flysystem-bundle, flysystem-aws-s3-v3, nelmio/security-bundle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:10:45 +01:00
Serreau Jovann
e3de0da1bf Add Cloudflare automation, ngrok tunnel, fix Dockerfiles
- Ansible cloudflare.yml: DNS, SSL, HSTS, Brotli, bot fight, SEO bots allow
- Vault: add cloudflare_zone_id
- Workflow: run cloudflare config before deploy
- docker-compose-dev: add ngrok tunnel, vault, minio
- Ngrok sync script: writes OUTSIDE_URL to .env.local
- Fix Dockerfiles: remove mbstring/xml (built-in PHP 8.4), fix libfreetype-dev
- Makefile: maintenance_on/off, clear_prod
- Playbook: stop_prod, install_prod, start_prod, migrate, clear steps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:06:11 +01:00
Serreau Jovann
507500e20d Update deployment pipeline, Makefile and README
- Makefile: add install_dev, install_prod, migrations, clear_prod, maintenance commands
- Playbook: full deploy flow (maintenance, stop, install, start, migrate, clear, caddy, messenger)
- Supervisor config for 2 messenger instances
- Workflow: SSH key setup with server IP
- hosts.ini: use IP instead of domain, sudo without password
- README: full documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:52:01 +01:00
Serreau Jovann
f822a9a069 Add deployment pipeline, maintenance page and project config
- Makefile: install_dev, install_prod, migration/migrate commands
- docker-compose-dev: add Caddy and Bun services
- docker-compose-prod: remove exposed pgbouncer port
- Ansible: Caddy template with maintenance mode (503), vault, deploy playbook
- Gitea workflow: manual deploy to production
- Maintenance page (Neubrutalism style)
- LICENSE: proprietary license

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:40:40 +01:00
Serreau Jovann
8c33641dca Add e-cosplay org to CODEOWNERS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:26:35 +01:00
Serreau Jovann
13d2539345 Fix CODEOWNERS: use Gitea username instead of email
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:25:50 +01:00
Serreau Jovann
75f8beb119 Clean templates, add Caddy dev, Ansible and Gitea config
- Reset templates: clean base.html.twig + new email base template
- Remove old templates (account, legal, security, emails, etc.)
- Add Caddy service to docker-compose-dev
- Add ansible hosts.ini for production deployment
- Add .gitea/CODEOWNERS
- Clean app.scss

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:23:16 +01:00
Serreau Jovann
8193930f60 Add application source code, configs and assets
- Controllers, Entity, Repository, Services, Twig extensions
- Templates (account, emails, home, legal, security, unsubscribe)
- Symfony config updates (bundles, security, framework, services)
- Vite + Bun setup with PostCSS
- Caddy config, CLAUDE.md, README
- Update .gitignore (node_modules, .idea, cert)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:16:01 +01:00
Serreau Jovann
af9c1a6ab7 Remove old compose.yaml and compose.override.yaml
Replaced by docker-compose-dev.yml and docker-compose-prod.yml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:14:46 +01:00
Serreau Jovann
653d7b4729 Add Docker infrastructure for dev and prod environments
- Separate PHP Dockerfiles (dev/prod) with extensions and prod opcache/php.ini optimization
- docker-compose-dev: PHP, PostgreSQL, Redis, Messenger, Mailpit, RedisInsight
- docker-compose-prod: 2x PHP replicas, PgSQL master/slave with PgBouncer, 2x Messenger, Redis
- Makefile with build/start/stop/purge commands
- AGENT.md to restrict AI access to the repository

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:12:09 +01:00
Serreau Jovann
9341647acf Add webapp packages 2026-03-04 21:52:29 +01:00
Serreau Jovann
7e95e82f6e Add initial set of files 2026-03-04 21:52:21 +01:00