feat(club-001): club core backend: anonymous members, devices, ledger, cashback config

This commit is contained in:
Deploy
2026-08-26 18:55:00 +02:00
parent c19626bea3
commit b2ccc70dc6
8 changed files with 306 additions and 86 deletions

View File

@@ -0,0 +1,20 @@
# CLUB-001 — Documentation notes
## New backend endpoints
- `GET /club/config`
- `POST /club/join`
- `GET /club/me`
- `GET /club/movements`
- `GET /admin/club/settings`
- `PATCH /admin/club/settings`
## Contract notes
- Anonymous Club identity is device-based for now.
- Client receives the raw `deviceToken` once; database stores only `device_token_hash`.
- The backend also persists the token in cookie `mdv_club` and accepts it again via cookie or `x-club-device-token` header.
- `club_transactions` is the source of truth; `club_members.current_balance_cents` is a transactional cache.
- Cashback is configurable through `store_settings` (`club_cashback_bps`) instead of hardcoded constants.
## Scope boundary
- CLUB-001 ships backend foundations only.
- PWA screens, digital card UI, TPV integration, recovery flow and account linking remain for later CLUB phases.