Commit graph

187 commits

Author SHA1 Message Date
ecc05dda37 chore: bump version to 0.3.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:47:20 +02:00
53a6f9ec19 docs(tests): add scrum4me-test-plan.md with full API test plan and planning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:47:20 +02:00
bed13c2d04 docs(architecture): update todos.product_id to not null with cascade delete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:42:47 +02:00
6c7459c61f feat(db): make Todo.product_id non-nullable, cascade on product delete
Aligns schema with the API and server action, both of which already
require product_id. Changes onDelete from SetNull to Cascade — deleting
a product now also removes its todos.

Run: npx prisma db push

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:42:47 +02:00
ab880e0b1f docs: add Testing section to README with npm test and curl script instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:38:50 +02:00
44acd96ee4 docs(tests): update lars-flow-checklist to reference test-api.sh and add missing endpoints
Adds all 7 endpoints to the manual reference section (was missing
PATCH /api/sprints/:id/tasks/reorder, PATCH /api/tasks/:id, demo-block
curl example). Links automated testing to scripts/test-api.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:38:49 +02:00
5918b29af3 docs(scripts): add scripts/README.md with token and ID setup instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:36:18 +02:00
b6c08851a0 chore(scripts): complete test-api.sh curl script for all 7 endpoints
Fixes TC-TD-09 (product_id required → 400 not 201), TC-NS-08
(check_one_of for 200/404), TC-RO-10 (use TASK_ID directly to avoid
cross-story scope violation). Adds DEMO_TOKEN support for 403 tests
on all 4 write endpoints. Adds check_one_of helper and shorthand
request functions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:36:17 +02:00
69a4ea27cd test(todos): add unit tests for POST /api/todos
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:48 +02:00
a6ae9f3ed1 test(tasks): add unit tests for PATCH /api/tasks/:id
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:46 +02:00
89f74f3dca test(reorder): add unit tests for PATCH /api/stories/:id/tasks/reorder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:45 +02:00
536456c1cd test(story-log): add unit tests for POST /api/stories/:id/log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:44 +02:00
dc7373e40d test(sprint-tasks): add unit tests for GET /api/sprints/:id/tasks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:38 +02:00
5903881580 test(next-story): add unit tests for GET /api/products/:id/next-story
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:37 +02:00
eafdef4d5a test(products): add unit tests for GET /api/products
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:31:35 +02:00
ead91cef5f test(security): extend security.test.ts to cover all 7 API endpoints
Adds 401, 403 demo-block, and cross-user isolation tests for:
GET /api/products/:id/next-story, GET /api/sprints/:id/tasks,
PATCH /api/stories/:id/tasks/reorder, POST /api/stories/:id/log,
POST /api/todos. Expands prisma mock to cover all required models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:26:54 +02:00
5070dd4133 chore(scripts): add test-api.sh curl test skeleton for all 7 API endpoints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:24:30 +02:00
46e795002f test(scaffold): add skeleton test files for all 7 API endpoints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:24:25 +02:00
0be3052f97 chore(tests): add tester user to prisma seed for cross-user isolation tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:24:15 +02:00
db85d4b49e docs: add strict commit strategy to CLAUDE.md and README.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 18:04:15 +02:00
2deea9e841 Added Beta development banner to the app. This will be removed once we are ready for a public release. 2026-04-25 17:26:35 +02:00
8e299915a8 Limit Prisma generation in CI 2026-04-25 17:17:35 +02:00
4ec0683f88 Document Prisma ERD generation 2026-04-25 17:08:55 +02:00
b5e967d8d3 Add analytics and documentation updates 2026-04-25 15:11:51 +02:00
e0efb65efb Fix scoped access checks 2026-04-25 14:36:55 +02:00
d90a8fd560 fix: PATCH /api/tasks/:id geeft 403 bij cross-user toegang
Vervang productAccessFilter in de WHERE clause door een expliciete
toegangscheck na het ophalen. findFirst haalt de taak op met product
en members (gefilterd op auth.userId); daarna wordt eigenaarschap of
teamlidmaatschap gecontroleerd en 403 teruggegeven bij geen toegang.

Dit herstelt het onderscheid 404 (taak bestaat niet) vs 403 (taak
bestaat maar geen toegang), zoals de beveiligingstest verwacht.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:44:51 +02:00
e94959c5bc feat: PB-overzicht in instellingen + documentatie bijgewerkt
Settings:
- "Mijn teams" vervangen door gecombineerde "Product Backlogs" sectie
- Toont eigen producten (badge Eigenaar) en team-lidmaatschappen (badge Developer)
- Productnaam is klikbaar naar de product backlog
- "Verlaten"-knop met bevestiging alleen voor Developer-lidmaatschappen
- Lege staat met link naar product aanmaken

Docs:
- architecture.md: users tabel aangevuld met bio/bio_detail/avatar_data;
  Prisma schema excerpt bijgewerkt; projectstructuur bijgewerkt (profile route, ProfileEditor)
- functional-spec.md: F-02b gebruikersprofiel en F-02c PB-overzicht toegevoegd;
  datamodel users rij bijgewerkt; settings route bijgewerkt
- backlog.md: ST-507 profiel en ST-508 PB-overzicht toegevoegd als afgerond

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:40:47 +02:00
ec9de5a962 fix: header en footer sticky op landingspagina
Zelfde patroon als (app) layout: h-screen overflow-hidden op de wrapper,
flex-1 overflow-y-auto op main, shrink-0 op footer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:32:32 +02:00
1ff894a6c0 feat: gebruikersprofiel met avatar, bio en uitgebreide beschrijving
- Schema: bio (160), bio_detail (2000) en avatar_data (bytea) op User
- POST /api/profile/avatar: validatie MIME-type + max 12 MB vóór verwerking,
  Sharp resize naar max 700x700 (fit inside), output WebP q85, opgeslagen als bytea in Neon
- GET /api/profile/avatar: serveert avatar met Cache-Control private 1u
- updateProfileAction: slaat bio en bio_detail op via Server Action + Zod
- ProfileEditor client component: avatar preview, upload met client-side validatie,
  bio-velden met tekenlimieten
- Settings page: profiel-sectie bovenaan, uitgeschakeld voor demo-gebruiker
- next.config: sharp als serverExternalPackage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:30:38 +02:00
45011a3347 docs: architectuur en spec bijgewerkt na implementatie
- Next.js 15 → 16 in architecture doc en stack-tabel
- ProductMember model toegevoegd aan datamodel-sectie en Prisma schema excerpt
- implementation_plan veld gedocumenteerd bij tasks tabel
- lib/product-access.ts en components/products|settings toegevoegd aan projectstructuur
- Functionele spec: MVP-scope bijgewerkt met teambeheer; scope-bullet uitnodigingsflow aangepast
- Rolbeheer-spec: acceptatiecriterium "geen effect in v1" vervangen door Developer-vereiste voor teams
- v2 backlog: multi-user item herschreven naar uitnodigingsflow (basis teambeheer is nu v1)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:13:14 +02:00
357b1e32e8 feat: ProductMember — team management for product backlogs
- Add ProductMember model (many-to-many User ↔ Product)
- Add productAccessFilter helper (owner OR member OR clause)
- Replace all ownership checks across actions and API routes
- Add addProductMemberAction / removeProductMemberAction / leaveProductAction
- Add TeamManager component in product settings (owner adds/removes Developers)
- Add LeaveProductButton in user settings (member leaves a product team)
- Regenerate Prisma Client after schema migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 13:09:44 +02:00
fc12e3cc64 feat: landingspagina met app-uitleg, Scrum-samenvatting en gebruikershandleiding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:47:32 +02:00
76d6f0a09d fix: nav en statusbar vast op top/bottom via h-screen layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:40:05 +02:00
cb7eb36fbb feat: Todo altijd gekoppeld aan product backlog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:35:40 +02:00
b541379964 chore: SQLite verwijderd — alleen PostgreSQL via Neon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:15:19 +02:00
ffe3815598 chore: .gitattributes toevoegen voor consistente LF regeleindes
Voorkomt de 'LF will be replaced by CRLF' warnings op Windows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 23:06:21 +02:00
32fa2e8c1b chore: middleware.ts verwijderd, icon-bron toegevoegd, versie 0.2.0
- middleware.ts verwijderd (hernoemd naar proxy.ts in vorige commit)
- icon-master-light.svg toegevoegd als bronbestand voor app-iconen
- package.json versie bijgewerkt naar 0.2.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 23:05:00 +02:00
703a912310 chore: middleware hernoemd naar proxy (Next.js 16)
- middleware.ts → proxy.ts
- export function middleware → proxy
- docs/patterns/middleware.md bijgewerkt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 22:57:05 +02:00
b4371f5afb chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst
- scrum4me-*.md en MD3_Color_Scheme_Documentation.md verplaatst naar docs/
- Srum4MeIcons.html verplaatst naar docs/icons.html
- theme.css verplaatst van root naar app/styles/theme.css
- Import in globals.css bijgewerkt
- Alle app-iconen vervangen door nieuw logo (icon-master-light.svg)
- AppIcon component bijgewerkt met nieuw SVG
- CLAUDE.md verwijzingen bijgewerkt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 22:51:42 +02:00
8e0513e07c docs: correcties CLAUDE.md en prisma-client patroon
- Next.js versie gecorrigeerd naar 16 in CLAUDE.md
- prisma-client.md bijgewerkt met werkelijke adapter-implementatie (SQLite + PostgreSQL)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 22:42:45 +02:00
c764d69e52
Rename patterns/zustand-optimistic.md to docs/patterns/zustand-optimistic.md 2026-04-24 22:21:53 +02:00
ed8524c269
Rename patterns/sort-order.md to docs/patterns/sort-order.md 2026-04-24 22:21:32 +02:00
7c41508a24
Rename patterns/server-action.md to docs/patterns/server-action.md 2026-04-24 22:21:12 +02:00
a72944ecc3
Rename patterns/route-handler.md to docs/patterns/route-handler.md 2026-04-24 22:20:48 +02:00
98ca36e357
Rename patterns/prisma-client.md to docs/patterns/prisma-client.md 2026-04-24 22:20:27 +02:00
2410d72cee
Rename patterns/middleware.md to docs/patterns/middleware.md 2026-04-24 22:18:53 +02:00
9a3b6034a3
Rename patterns/iron-session.md to docs/patterns/iron-session.md 2026-04-24 22:17:25 +02:00
f7513016d4
Add test.md with initial content 2026-04-24 22:14:59 +02:00
895930a744
Implement middleware for route protection
Add middleware for route protection based on user session.
2026-04-24 22:12:40 +02:00
1d33b1f7dc
Add documentation for float sort_order pattern
Document the float sort_order pattern with TypeScript examples for calculating sort order and reindexing when precision is low.
2026-04-24 22:11:54 +02:00