docs: CLAUDE.md – getStats/categories + Profil-Greeting ergänzen
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -33,12 +33,15 @@ React 19 + Vite SPA, **no router package**. There are no DB cards/feed entries f
|
|||||||
| Function | Endpoint | Notes |
|
| Function | Endpoint | Notes |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `login` / `registerUser` | `POST /auth/login`, `/auth/register` | return `{ token, userId, needsProfile }` |
|
| `login` / `registerUser` | `POST /auth/login`, `/auth/register` | return `{ token, userId, needsProfile }` |
|
||||||
| `getMe` | `GET /auth/me` | basis for auth check + progress (EP/streak/level) |
|
| `getMe` | `GET /auth/me` | basis for auth check + progress (EP/streak/level); also `language_target_greeting` (Profil-Anrede „Hej, …") |
|
||||||
| `checkUsername` | `GET /auth/check-username` | |
|
| `checkUsername` | `GET /auth/check-username` | |
|
||||||
| `createProfile` | `POST /auth/profile` | username + native/target lang |
|
| `createProfile` | `POST /auth/profile` | username + native/target lang |
|
||||||
| `getLanguageOptions` | `GET /auth/languages` | merged with local `LANG_META` (flag + Web Speech code) |
|
| `getLanguageOptions` | `GET /auth/languages` | merged with local `LANG_META` (flag + Web Speech code) |
|
||||||
| `getFeedPairs` | `GET /auth/feed?lang=&limit=` | returns "pairs", the feed unit |
|
| `getFeedPairs` | `GET /auth/feed?lang=&limit=` | returns "pairs", the feed unit |
|
||||||
| `saveProgress` | `POST /auth/progress` | books EP/streak, returns updated `total_ep` |
|
| `saveProgress` | `POST /auth/progress` | books EP/streak, returns updated `total_ep` |
|
||||||
|
| `getStats` | `GET /auth/stats` | Profil-Daten: `daily`/`today`/`totals`/`skills` + `categories[]` (Punkte je Kategorie) |
|
||||||
|
|
||||||
|
`src/pages/Profil.jsx` rendert daraus die Begrüßung (`language_target_greeting`), den Kategorie-Block (`stats.categories`), Wochen-/Aktivitäts-Graphen und Streak.
|
||||||
|
|
||||||
Several content functions (`getWords`, `getQuestions`, `getActiveLearningPair`, `assetUrl`, …) are **stubs** returning empty/null — content endpoints are not built yet. Don't assume they fetch anything.
|
Several content functions (`getWords`, `getQuestions`, `getActiveLearningPair`, `assetUrl`, …) are **stubs** returning empty/null — content endpoints are not built yet. Don't assume they fetch anything.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user