Booking confirmation email + customer self-service cancel/reschedule (#18)

Sends a confirmation email (best-effort, fire-and-forget SMTP via mailer.py)
on booking creation, with a manage-booking link embedding the ticket-2 signed
token. Adds /manage/<token>, a stateless cancel/reschedule page that reuses
the existing slot-picker against booking_api's create/cancel/reschedule API,
distinguishing an invalid/expired link from an already-cancelled one. Sender
address uses the client's own domain when configured, falling back to a
mivanchenko.de address otherwise.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 15:40:45 +02:00
parent b895663c3a
commit 644c99ee30
14 changed files with 872 additions and 15 deletions
+12 -2
View File
@@ -1,11 +1,11 @@
# Caddy rate limiting for `/book/*` and `/api/booking/*` (#17)
# Caddy rate limiting for `/book/*`, `/manage/*` and `/api/booking/*` (#17, #18)
Like every other homelab Caddy change (see `deploy/clients/new-client.sh`), there's no
Caddyfile tracked in this repo -- apply this by hand at `/etc/caddy/Caddyfile` on the host
and reload with `docker exec caddy caddy reload --config /etc/caddy/Caddyfile`.
Add, on the site block that proxies to `smb-crm` (e.g. `onboard.mivanchenko.de`, or wherever
`/book/` and `/api/booking/` are routed):
`/book/`, `/manage/` and `/api/booking/` are routed):
```
handle /book/* {
@@ -18,6 +18,16 @@ handle /book/* {
}
reverse_proxy smb-crm:8080
}
handle /manage/* {
rate_limit {
zone book_public {
key {remote_host}
events 20
window 1m
}
}
reverse_proxy smb-crm:8080
}
handle /api/booking/* {
rate_limit {
zone book_api {