FrankandClaude Sonnet 5 a9cb0fa57f Turn admin lobby chat panel into a tab
The lobby chat was a standalone card sitting above the per-player log
tabs. Folds it into the same tab bar as the first (default-active)
tab instead, so the session log view has one consistent tab strip.
The tab-switching script now toggles by an .admin-tab-panel class
instead of assuming every panel's id starts with "player-", since
that's no longer true.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 16:48:06 +02:00
2026-01-13 21:54:26 +01:00
2026-01-02 20:27:56 +01:00
2026-07-04 13:57:00 +02:00
2026-08-10 15:32:23 +02:00
2026-01-10 14:28:03 +01:00
2025-09-06 16:50:16 +02:00
2026-07-04 12:49:51 +02:00
2026-07-04 13:57:00 +02:00
2026-07-04 11:58:44 +00:00
2025-09-06 16:50:16 +02:00
2026-07-11 20:27:32 +00:00
2025-09-06 16:50:16 +02:00
2026-07-04 13:57:00 +02:00
2026-07-04 11:58:44 +00:00
2026-07-04 19:08:31 +02:00

EscapePage — Online Escape Room

This repository contains a Symfony 7.3 (PHP >= 8.5.1) application for a collaborative online escape room experience.

  • Start here: doc/FILES.md — quick file index.
  • Development standards and workflows: doc/CONTRIBUTING.md
  • All documentation is located under the doc/ directory.

Getting Started (brief)

  • Local machine (no Docker):

    1. Copy .env to .env.local and set database and APP_SECRET.
    2. Install PHP deps: composer install
    3. Create database and run migrations (when present): php bin/console doctrine:database:create --if-not-exists && php bin/console doctrine:migrations:migrate -n
    4. Install/import JS deps: php bin/console importmap:install
    5. Run the server: symfony server:start -d (or your preferred web server)
    6. Run tests: vendor/bin/phpunit
  • With Docker:

    1. cd docker && docker compose up -d
    2. Install vendors inside the PHP container:
      • docker compose exec php bash
      • composer install
    3. Initialize DB:
      • php bin/console doctrine:database:create --if-not-exists
      • php bin/console doctrine:migrations:migrate -n
    4. App is at http://localhost:8080

Email (Mailpit in dev, Mailgun for prod)

  • Dev: a mailer service (Mailpit) runs in Docker.
    • SMTP DSN in .env: MAILER_DSN=smtp://mailer:1025
    • Mailpit UI: http://localhost:8025 (or mapped port 8025)
    • Send a test mail: php bin/console app:mail:test you@example.com
  • Staging/Prod: use Mailgun.
    • Require package (already in composer): symfony/mailgun-mailer.
    • Set environment variables (do NOT commit secrets):
      • MAILER_DSN=mailgun+api://${MAILGUN_API_KEY}:${MAILGUN_DOMAIN}@default?region=eu
      • MAILGUN_API_KEY=YOUR_REAL_KEY
      • MAILGUN_DOMAIN=YOUR_SENDING_DOMAIN (e.g. mg.escapepage.nl)
      • Optional: MAILER_FROM=no-reply@your-domain.tld
    • Drop region=eu (or use region=us) depending on which region your Mailgun domain was created in.
    • Alternatively via SMTP (no extra package):
      • MAILER_DSN="mailgun+smtp://USERNAME:PASSWORD@default?region=eu"

Troubleshooting:

  • If emails dont appear in dev, open Mailpit at http://localhost:8025 and verify messages.
  • In prod, check logs for HTTP 2xx responses from Mailgun and verify sender domain is verified (SPF/DKIM) in Mailgun.

Frontend assets with Webpack Encore

We use Webpack Encore to build and minify JS/CSS from the assets/ directory into public/build/.

Install Node dependencies (on your host machine):

npm install

Common commands:

# One-time dev build
npm run dev

# Watch & rebuild on changes
npm run watch

# Production build (minified, versioned filenames)
npm run build

How its wired:

  • Entry file: assets/app.js (imports assets/styles/app.css).
  • Webpack config: webpack.config.js outputs to public/build/.
  • Twig template includes built assets via Encore:
    • In templates/base.html.twig:
      • {{ encore_entry_link_tags('app') }} (CSS)
      • {{ encore_entry_script_tags('app') }} (JS)

Notes:

  • The PHP Docker image does not include Node. Run the build commands on your host, or ask to add a Node build container if you prefer fully containerized builds.
  • Built files are ignored by git except for public/build/.gitignore to keep the directory.

See doc/CONTRIBUTING.md for code style and more details.

Realtime updates with Mercure

We use a Mercure hub (Docker service) to push server updates to browsers via ServerSent Events (SSE).

Quick start (dev):

  1. Start Docker stack:
    cd docker && docker compose up -d
    
    This starts mercure at http://localhost:8090 and the app at http://localhost:8080.
  2. Install PHP deps inside the PHP container if you haven't yet:
    docker compose exec php bash
    composer install
    
    You should see a console log like [Mercure] Update received: { ... } on the Game Hub page.

Configuration:

  • Env vars (defined in .env, override in .env.local as needed):
    • MERCURE_URL=http://mercure/.well-known/mercure (internal URL from PHP to the hub)
    • MERCURE_PUBLIC_URL=http://localhost:8090/.well-known/mercure (browser URL)
    • MERCURE_JWT_SECRET=!ChangeThisMercureJWT! (dev secret; do not use in prod)
    • MERCURE_TOPIC_BASE=https://escapepage.dev (base topic URL)
  • Docker service mercure is based on dunglas/mercure and allows anonymous subscribers in dev.

Topics:

  • Topics must be URLs. We use MERCURE_TOPIC_BASE to control the domain per environment.
    • Dev: .env sets https://escapepage.dev
    • Prod: set MERCURE_TOPIC_BASE=https://escapepage.com
  • The Game Hub demo topic is ${MERCURE_TOPIC_BASE}/game/hub.

Production notes:

  • Disable anonymous subscribers and require JWTs for subscriptions (configure the Mercure container accordingly).
  • Use a strong, rotated MERCURE_JWT_SECRET and keep it out of VCS (use real env/secrets).
  • Serve Mercure over HTTPS and set proper CORS/allowed origins for your production domain(s).
S
Description
De Escapepage
Readme
5.7 MiB
Languages
PHP 64.3%
Twig 25.2%
JavaScript 7.3%
Shell 1.6%
CSS 0.7%
Other 0.9%