Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2275b37
Update docs
Mar 17, 2026
6310250
Update docs
Mar 17, 2026
6beb0bb
Update docs
Mar 17, 2026
f7a26d7
docs: update changelog spec to use Portainer exec instead of HTTP end…
Mar 18, 2026
21391bc
feat(changelog): add ChangelogEntry model, migration and seed (Phase 1)
Mar 18, 2026
807eae9
feat(changelog): add admin CRUD API with validation and tests (Phase 2)
Mar 18, 2026
6db23c8
feat(changelog): add user-facing changelog API with tests (Phase 3)
Mar 18, 2026
2ff2d7d
feat(changelog): add generation and insertion scripts (Phase 4)
Mar 18, 2026
6b5eaba
feat(changelog): add generate-changelog CI job with Portainer exec (P…
Mar 18, 2026
544dfaa
feat(changelog): add user-facing changelog page with dynamic sidebar …
Mar 18, 2026
2fcc573
feat(changelog): add admin CRUD page with table, modals and filters (…
Mar 18, 2026
58926d6
docs: update context files for changelog feature (Phase 8)
Mar 18, 2026
5a71dc0
Spec creation for plan system
Mar 18, 2026
5ad32e4
Merge pull request #30 from MatthiasBlc/Changelog
MatthiasBlc Mar 18, 2026
faecb83
docs: finalise specs meal plan (Feature 1 & 2)
Mar 18, 2026
9f9c6e0
fix(security): force fast-xml-parser@5.5.6 via overrides to fix CVE G…
Mar 18, 2026
9175a86
fix(lint): remove unused FaNewspaper import in Sidebar
Mar 18, 2026
6d7cb7e
feat(meal-plan): add data models & migration (Phase 1)
Mar 18, 2026
5d9766b
docs: update roadmap & progress for meal plan Phase 1
Mar 18, 2026
bb79fbb
feat(meal-plan): add requireFeature middleware & route skeleton (Phas…
Mar 18, 2026
150909d
feat(meal-plan): implement CRUD plan, slots & swap API (Phase 3)
Mar 18, 2026
2e571b3
Update phase 4
Mar 18, 2026
3a9526f
feat(meal-plan): implement archives API & meal ideas CRUD (Phases 4-5)
MatthiasBlc Mar 18, 2026
1fb0145
docs: complete meal-plan backend phases (1-5, 13)
MatthiasBlc Mar 18, 2026
df5c911
feat(meal-plan): implement complete frontend (Phases 6-12)
MatthiasBlc Mar 18, 2026
00a2635
fix(meal-plan): remove unused imports & fix ESLint warnings
MatthiasBlc Mar 18, 2026
f3d9127
feat(meal-generation): add data models & migration (Phase 1)
Mar 19, 2026
fd2cba8
feat(meal-generation): add generation params CRUD API (Phase 2)
Mar 19, 2026
2544ec6
feat(meal-generation): add exclusions, rules & pins API (Phase 3)
Mar 19, 2026
620aba8
feat(meal-generation): implement generation algorithm main pass (Phas…
Mar 19, 2026
a3e3694
feat(meal-generation): add frequency catch-up pass & report (Phase 5)
Mar 19, 2026
16d2031
feat(meal-generation): add generate & replace API endpoints (Phase 6)
Mar 19, 2026
8702f6e
refactor(meal-generation): split controllers, schemas, services & DRY…
Mar 19, 2026
66310d9
feat(meal-generation): add slot lock toggle on grid cards (Phase 7)
Mar 19, 2026
e09ecf5
feat(meal-generation): add generation params UI with exclusion & pin …
Mar 19, 2026
cf62f73
refactor(frontend): split api.ts into domain modules & DRY toast errors
Mar 19, 2026
74d3a4b
feat(meal-generation): add inline rules editor with tag & recipe CRUD…
Mar 19, 2026
b1dfe5b
docs: add quality report to RESUME.md for Phase 9
Mar 19, 2026
75a4532
feat(meal-generation): add generate & replace API functions (Phase 10)
Mar 19, 2026
efaf9b3
feat(meal-generation): add generate button, modal & report display (P…
Mar 19, 2026
1d335fa
feat(meal-generation): add replace button on slot cards with confirm …
Mar 19, 2026
003f299
docs: update roadmap & resume for Phase 10 completion
Mar 19, 2026
31b4afc
feat(meal-generation): add mobile layout for exclusion/pin grid (Phas…
Mar 19, 2026
33d4ab2
docs: update context files, readme & add manual test protocol (Phase 12)
Mar 19, 2026
b5b3e8e
fix(lint): remove unused vars in mealGeneration.ts
Mar 19, 2026
ac25a6b
Merge pull request #31 from MatthiasBlc/MealPlanGeneration
MatthiasBlc Mar 19, 2026
afe144b
Merge pull request #32 from MatthiasBlc/MealPlan
MatthiasBlc Mar 19, 2026
86b1f0f
fix: resolve formatting, lint errors and npm audit vulnerabilities
MatthiasBlc Mar 19, 2026
8db01dd
fix(mealPlan): normalize slot date format for grid display
MatthiasBlc Mar 20, 2026
dbb5430
fix(mealPlan): parse disabled slot keys correctly in CreatePlanModal
MatthiasBlc Mar 20, 2026
3d1e18d
fix(deps): patch security vulnerabilities in frontend and backend
Apr 1, 2026
87bdce7
docs: add recipe flows reference document
May 13, 2026
5b9b39a
fix(deps): patch security vulnerabilities in frontend and backend
May 13, 2026
a983548
docs: add deps-cleanup spec and roadmap
May 13, 2026
3741df6
docs(deps-cleanup): correct spec and roadmap — @dnd-kit is used in St…
May 13, 2026
c3b9b29
docs(deps-cleanup): add Phase 5 (missing tests) before axios replacem…
May 13, 2026
38ccc7f
docs(deps-cleanup): document 6 pre-flight issues before implementation
May 13, 2026
90ff3ce
feat(deps-cleanup): phase 1 — remove classnames from Modal.tsx
May 13, 2026
38ede2e
feat(deps-cleanup): phase 2 — remove usehooks-ts, enrich useClickOuts…
May 13, 2026
df98e61
feat(deps-cleanup): phase 3 — remove @types/helmet and read package f…
May 13, 2026
7a29548
feat(deps-cleanup): phase 4 — replace envalid with zod in validateEnv.ts
May 13, 2026
434a8c0
test(deps-cleanup): phase 5 — add apiClient tests for Phase 6 contract
May 13, 2026
8e7f71e
feat(deps-cleanup): phase 6 — replace axios with native fetch in fron…
May 13, 2026
0ff1deb
docs(deps-cleanup): phase 7 — update PROGRESS.md and roadmap
May 13, 2026
1efa8d1
fix(lint): silence all no-explicit-any warnings in frontend and backend
May 13, 2026
bd34fd7
fix(lint): replace eslint-disable with proper Prisma types across mea…
May 13, 2026
f4da4d9
Merge pull request #33 from MatthiasBlc/UpdateDep
MatthiasBlc May 13, 2026
1b99db6
fix(types): fix TS build errors in meal controllers after lint refactor
May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ MVP complet (phases 0-17). Voir `.claude/context/PROGRESS.md` pour les features

## Codes erreur

**User API** : AUTH_001-012 | USER_001 | COMMUNITY_001-006 | RECIPE_001-009 | INVITE_001-006 | MEMBER_001-004 | PROPOSAL_001-004 | SHARE_001-006 | PUBLISH_001-003 | TAG_001-007 | INGREDIENT_003 | NOTIF_001-005 | IMPORT_001-003 | VALIDATION_001
**User API** : AUTH_001-012 | USER_001 | COMMUNITY_001-006 | RECIPE_001-009 | INVITE_001-006 | MEMBER_001-004 | PROPOSAL_001-004 | SHARE_001-006 | PUBLISH_001-003 | TAG_001-007 | INGREDIENT_003 | NOTIF_001-005 | IMPORT_001-003 | VALIDATION_001 | MEAL_001-013

**Admin API** : ADMIN_001-011 | ADMIN_TAG_001-006 | ADMIN_ING_001-009 | ADMIN_UNIT_001-007 | ADMIN_REC_001-003 | ADMIN_COM_001-003 | ADMIN_FEAT_001-006
**Admin API** : ADMIN_001-011 | ADMIN_TAG_001-006 | ADMIN_ING_001-009 | ADMIN_UNIT_001-007 | ADMIN_REC_001-003 | ADMIN_COM_001-003 | ADMIN_FEAT_001-006 | CHANGELOG_001-004

## Regle: maintenir `.claude/` a jour

Expand Down Expand Up @@ -87,9 +87,19 @@ docs/
mobile-rework/ # EN COURS
SPEC_MOBILE_REWORK.md
ROADMAP.md
e2e-testing/ # PLANIFIE
changelog/ # SPEC DONE
SPEC_CHANGELOG.md
e2e-testing/ # PLANIFIE
SPEC_E2E_TESTING.md
ROADMAP.md
meal-plan/ # SPEC DONE
SPEC_MEAL_PLAN.md
ROADMAP.md
SPEC_MEAL_GENERATION.md
ROADMAP_GENERATION.md
deps-cleanup/ # PLANIFIE
SPEC_DEPS_CLEANUP.md
ROADMAP.md
```

Chaque nouvelle feature a son dossier dans `docs/features/` avec au minimum une spec et une roadmap.
Expand All @@ -110,9 +120,20 @@ Chaque nouvelle feature a son dossier dans `docs/features/` avec au minimum une
| **Feature : Mobile Rework** | |
| Spec Mobile Rework | `docs/features/mobile-rework/SPEC_MOBILE_REWORK.md` |
| Roadmap Mobile Rework | `docs/features/mobile-rework/ROADMAP.md` |
| **Feature : Changelog** | |
| Spec Changelog | `docs/features/changelog/SPEC_CHANGELOG.md` |
| Roadmap Changelog | `docs/features/changelog/ROADMAP.md` |
| **Feature : E2E Testing** | |
| Spec E2E Testing | `docs/features/e2e-testing/SPEC_E2E_TESTING.md` |
| Roadmap E2E Testing | `docs/features/e2e-testing/ROADMAP.md` |
| **Feature : Meal Plan** | |
| Spec Meal Plan | `docs/features/meal-plan/SPEC_MEAL_PLAN.md` |
| Roadmap Meal Plan | `docs/features/meal-plan/ROADMAP.md` |
| Spec Meal Generation | `docs/features/meal-plan/SPEC_MEAL_GENERATION.md` |
| Roadmap Meal Generation | `docs/features/meal-plan/ROADMAP_GENERATION.md` |
| **Feature : Deps Cleanup** | |
| Spec Deps Cleanup | `docs/features/deps-cleanup/SPEC_DEPS_CLEANUP.md` |
| Roadmap Deps Cleanup | `docs/features/deps-cleanup/ROADMAP.md` |
| **Specs features (reference)** | |
| Tags Rework | `docs/features/tags-rework/SPEC_TAGS_REWORK.md` |
| Ingredients Rework | `docs/features/ingredients-rework/SPEC_INGREDIENTS_REWORK.md` |
Expand Down
98 changes: 86 additions & 12 deletions .claude/context/API_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ PUT /api/notifications/preferences # update preference (category, enabl

Controller: `controllers/notifications.ts` | Route: `routes/notifications.ts`

## Changelog (/api/changelog) - requireAuth

```
GET /api/changelog/ # list paginated (publishedAt desc, deletedAt: null)
GET /api/changelog/:id # detail (deletedAt: null)
```

Controller: `controllers/changelog.ts` | Route: `routes/changelog.ts`

## User Invitations

```
Expand Down Expand Up @@ -201,6 +210,58 @@ POST /api/recipes/:recipeId/tag-suggestions # suggerer un tag (membre, pas own

Controller: `controllers/tagSuggestions.ts` | Route: `routes/recipes.ts`

## Meal Plan (/api/communities/:communityId/meal-plan) - memberOf + requireFeature('MEAL_PLAN')

```
GET /api/communities/:communityId/meal-plan # plan ACTIVE + slots (memberOf)
POST /api/communities/:communityId/meal-plan # creer plan + slots (MODERATOR)
DELETE /api/communities/:communityId/meal-plan # supprimer plan ACTIVE (MODERATOR)
PATCH /api/communities/:communityId/meal-plan # update settings (MODERATOR)
POST /api/communities/:communityId/meal-plan/generate # generer le planning (MODERATOR)
PATCH /api/communities/:communityId/meal-plan/slots/:slotId # update slot (permission dynamique)
POST /api/communities/:communityId/meal-plan/slots/:slotId/replace # re-generer 1 slot (MODERATOR)
POST /api/communities/:communityId/meal-plan/slots/swap # swap 2 slots (permission dynamique)
GET /api/communities/:communityId/meal-plan/archives # liste archives paginee (memberOf)
GET /api/communities/:communityId/meal-plan/archives/:planId # detail archive + slots (memberOf)
DELETE /api/communities/:communityId/meal-plan/archives/:planId # supprimer archive (MODERATOR)
```

Controller: `controllers/mealPlan.ts` | Route: `routes/mealPlan.ts`
Middleware: `middleware/requireFeature.ts`
Error codes: MEAL_001-013, MEAL_GEN_001-013

## Meal Ideas (/api/communities/:communityId/meal-ideas) - memberOf + requireFeature('MEAL_PLAN')

```
GET /api/communities/:communityId/meal-ideas # liste paginee, ?search= (memberOf)
POST /api/communities/:communityId/meal-ideas # creer idee (memberOf)
PATCH /api/communities/:communityId/meal-ideas/:ideaId # modifier (createur ou MODERATOR)
DELETE /api/communities/:communityId/meal-ideas/:ideaId # soft delete (createur ou MODERATOR)
```

Controller: `controllers/mealIdeas.ts` | Route: `routes/mealIdeas.ts`

---

## Meal Generation Params (/api/communities/:communityId/meal-generation-params) - memberOf + requireFeature('MEAL_PLAN')

```
GET /api/communities/:communityId/meal-generation-params # liste (memberOf)
POST /api/communities/:communityId/meal-generation-params # creer (MODERATOR)
GET /api/communities/:communityId/meal-generation-params/:paramsId # detail + exclusions + regles + pins (memberOf)
PATCH /api/communities/:communityId/meal-generation-params/:paramsId # modifier (MODERATOR)
DELETE /api/communities/:communityId/meal-generation-params/:paramsId # soft delete (MODERATOR)
PUT .../:paramsId/exclusions # set complet exclusions (MODERATOR)
GET .../:paramsId/rules # liste regles (memberOf)
POST .../:paramsId/rules # ajouter regle (MODERATOR)
PATCH .../:paramsId/rules/:ruleId # modifier regle (MODERATOR)
DELETE .../:paramsId/rules/:ruleId # supprimer regle (MODERATOR, hard delete)
PUT .../:paramsId/pins # set complet pins (MODERATOR)
```

Controller: `controllers/mealGenerationParams.ts` | Route: `routes/mealGenerationParams.ts`
Error codes: MEAL_GEN_001, MEAL_GEN_003-006, MEAL_GEN_009-012

---

## Admin Auth (/api/admin/auth) - adminSession, rate limited 5/15min
Expand Down Expand Up @@ -286,6 +347,18 @@ PATCH /api/admin/features/:id # update

Controller: `admin/controllers/featuresController.ts` | Route: `admin/routes/featuresRoutes.ts`

## Admin Changelog (/api/admin/changelog) - requireSuperAdmin

```
GET /api/admin/changelog/ # list paginated (?includeDeleted=true)
POST /api/admin/changelog/ # create (version, title, content, publishedAt?)
PATCH /api/admin/changelog/:id # update (version?, title?, content?, publishedAt?)
DELETE /api/admin/changelog/:id # soft delete
```

Controller: `admin/controllers/changelogController.ts` | Route: `admin/routes/changelogRoutes.ts`
Error codes: CHANGELOG_001-004

## Admin Dashboard & Activity - requireSuperAdmin

```
Expand All @@ -299,15 +372,16 @@ Controllers: `admin/controllers/dashboardController.ts`, `admin/controllers/acti

## Middleware Chain

| Middleware | Fichier | Role |
| -------------------- | ------------------------------------- | -------------------------------------- |
| userSession | app.ts (express-session) | Session user (connect.sid) |
| adminSession | app.ts (express-session) | Session admin (admin.sid) |
| requireAuth | middleware/auth.ts | Verifie session.userId |
| requireSuperAdmin | admin/middleware/requireSuperAdmin.ts | Verifie session.adminId + totpVerified |
| memberOf | middleware/community.ts | Verifie appartenance communaute |
| requireCommunityRole | middleware/community.ts | Verifie role dans communaute |
| adminRateLimiter | middleware/security.ts | 30 req/min global admin |
| authRateLimiter | routes config | 5/15min sur auth endpoints |

## Total: 99 endpoints (65 user + 33 admin + 1 health)
| Middleware | Fichier | Role |
| -------------------- | ------------------------------------- | --------------------------------------- |
| userSession | app.ts (express-session) | Session user (connect.sid) |
| adminSession | app.ts (express-session) | Session admin (admin.sid) |
| requireAuth | middleware/auth.ts | Verifie session.userId |
| requireSuperAdmin | admin/middleware/requireSuperAdmin.ts | Verifie session.adminId + totpVerified |
| memberOf | middleware/community.ts | Verifie appartenance communaute |
| requireCommunityRole | middleware/community.ts | Verifie role dans communaute |
| requireFeature | middleware/requireFeature.ts | Verifie feature activee pour communaute |
| adminRateLimiter | middleware/security.ts | 30 req/min global admin |
| authRateLimiter | routes config | 5/15min sur auth endpoints |

## Total: 131 endpoints (93 user + 37 admin + 1 health)
Loading
Loading