No description
Find a file
Simon Kühn b537066a19 Fix registration: auto-login after signup, atomic token consumption
Registration failed visibly because the controller returned successfully
(user created, invite consumed) but the JS then called loadGoals() without
an authenticated session — causing a 401 that surfaced as an error to the user.

- Add Security::login() after user creation so the session is established
  immediately, matching the documented "registers + auto-logs in" behavior
- Wrap user persist and invite consumption in a single DB transaction so
  the invite token can never be consumed if user creation fails
- Add 12 integration tests covering auto-login, locale updates, logout,
  partial goal updates, invite isolation, and various edge cases (110 assertions total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 09:58:21 +02:00
bin Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
config Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
docs Initial commit: Dudi habit tracker 2026-04-29 15:40:57 +02:00
migrations Add DE/EN/PL i18n with browser-language detection and per-user override 2026-04-30 13:34:41 +02:00
public Add DE/EN/PL i18n with browser-language detection and per-user override 2026-04-30 13:34:41 +02:00
src Fix registration: auto-login after signup, atomic token consumption 2026-05-01 09:58:21 +02:00
templates Add DE/EN/PL i18n with browser-language detection and per-user override 2026-04-30 13:34:41 +02:00
tests Fix registration: auto-login after signup, atomic token consumption 2026-05-01 09:58:21 +02:00
.env Initial commit: Dudi habit tracker 2026-04-29 15:40:57 +02:00
.env.test Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
.gitignore Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
.htaccess Initial commit: Dudi habit tracker 2026-04-29 15:40:57 +02:00
CLAUDE.md Initial commit: Dudi habit tracker 2026-04-29 15:40:57 +02:00
composer.json Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
composer.lock Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
deploy.sh Run deploy commands as www-data for correct file ownership 2026-04-29 20:39:27 +02:00
phpunit.dist.xml Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00
README.md Initial commit: Dudi habit tracker 2026-04-29 15:40:57 +02:00
symfony.lock Add PHPUnit integration tests, remove legacy pre-Symfony files, fix password reset 2026-04-30 10:18:21 +02:00

Dudi Durchzieh-Dienst

A lightweight habit & goal tracker PWA built with Symfony 8, Doctrine ORM, and vanilla JS.

Stack

  • Backend: Symfony 8, Doctrine ORM, Symfony Security, Symfony Mailer
  • Frontend: Vanilla JS SPA, HTML <template> elements, no build step
  • Database: MariaDB
  • Auth: Symfony Security with bcrypt, session + remember-me (24h)

Local Setup

composer install
cp .env .env.local   # then fill in real values
php bin/console cache:clear

Configure Apache to point to public/ as DocumentRoot (see docs/deployment.md).

Development

The app runs at http://dudi.local/ locally. An Apache VirtualHost and /etc/hosts entry are required.

127.0.0.1 dudi.local

Apache VirtualHost:

<VirtualHost *:80>
    ServerName dudi.local
    DocumentRoot "/path/to/dudi/public"
    <Directory "/path/to/dudi/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Deploy

bash deploy.sh

See docs/deployment.md for first-time server setup.