chore: docker-compose mailpit, env.example, README auth section

This commit is contained in:
2026-05-20 23:01:18 +02:00
parent bb0d9d7d01
commit 00e69a8d90
3 changed files with 57 additions and 0 deletions

View File

@@ -55,3 +55,35 @@ Leitner-systeem met 5 dozen:
- Fout → terug naar doos 1
Binnen een sessie wordt een fout beantwoorde kaart na ~3 posities opnieuw getoond.
## Auth & e-mail
De applicatie zit achter een login. Eerste registratie (POST /api/auth/register via /register pagina) wordt automatisch sysadmin.
### Lokaal e-mail (Mailpit)
```bash
docker compose up -d mailpit
# Web UI: http://localhost:8025
# SMTP: localhost:1025
```
Kopieer `.env.example``.env` in repo-root, of zet de waarden inline.
### Productie (Amazon SES)
In productie:
```
SMTP_HOST=email-smtp.eu-west-1.amazonaws.com
SMTP_PORT=587
SMTP_USER=<SES SMTP username>
SMTP_PASS=<SES SMTP password>
SMTP_FROM="Flashcard <noreply@yourdomain.com>"
COOKIE_SECURE=true
APP_URL=https://yourdomain.com
```
### Fallback (geen SMTP)
Als `SMTP_HOST` ontbreekt, schrijft het systeem de e-mails (incl. links) naar de server-log.