* feat(ST-1109.2): add PbiStatus enum and status field to Pbi model - New PbiStatus enum (READY/BLOCKED/DONE) for PBI lifecycle tracking - Pbi.status PbiStatus @default(READY) - Index on (product_id, status) for filter queries - Migration: 20260429150643_add_pbi_status - ERD regenerated via prisma generate Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.3): add PBI status API mappers - pbiStatusToApi / pbiStatusFromApi following same pattern as task/story - PbiStatusApi type derived from PBI_DB_TO_API - PBI_STATUS_API_VALUES export for downstream Zod schemas - Lowercase API surface (ready/blocked/done), DB stays UPPER_SNAKE Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.4): support status in PBI create/update actions - Optional status field in Zod schemas (lowercase API: ready/blocked/done) - pbiStatusFromApi() maps to DB enum before persistence - Status omitted on create => Prisma @default(READY) takes effect - Update preserves existing status when not provided - Demo-check unchanged Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.5): auto-mark PBI as DONE when all its stories are DONE on sprint close Extends completeSprintAction's $transaction with PBI status cascade: - Pre-transaction: identify PBIs touched by this close (via stories.pbi_id), fetch each with all its stories - Skip PBIs already DONE; skip PBIs with 0 stories - Mark PBI DONE only when every story (post-decision) is DONE — stories outside the sprint are evaluated against their current DB status - Promote-only: never demotes a PBI that becomes "incomplete" again Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.6): add Popover primitive (base-ui wrapper) - Mirrors the Tooltip pattern: render-prop composition, data-slot attrs - Exports Popover (Root), PopoverTrigger, PopoverContent (Portal+Positioner+Popup) - MD3 popover/popover-foreground tokens, animated open/close states - Will be used to consolidate the backlog filter UI in ST-1109.8 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.7): add status select to PBI dialog - New components/shared/pbi-status-select.tsx mirrors PrioritySelect: PBI_STATUS_LABELS (NL), PBI_STATUS_COLORS, PbiStatusSelect component - Reuses existing --status-todo/blocked/done MD3 tokens - PbiDialog: status state with sync-on-open; default 'ready' for create, pbi.status for edit; hidden input submits lowercase API value - Priority + Status sit side-by-side in 2-col grid - PbiDialogPbi.status is optional; pbi-list.tsx will populate in ST-1109.8 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.8): show PBI status badge and consolidate filters into popover - Pbi.status (lowercase API) flows from page.tsx via pbiStatusToApi - Status badge rendered in BacklogCard's badge slot using PBI_STATUS_COLORS - Two old Select dropdowns replaced by single Popover with three pill-button sections (Sorteren, Prioriteit, Status) and a "Wis filters" footer - Filter trigger shows active count "(n)" badge in label - Active priority/status filters still surface as dismissable chips next to the trigger for at-a-glance feedback - onEdit passes the full Pbi (incl. status) so the dialog opens with the correct current status — closes the data flow loop opened in ST-1109.7 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(ST-1109.9): cover PBI status mappers and sprint-close cascade - __tests__/lib/task-status.test.ts: 11 cases incl. round-trip + invalid input for task/story/pbi mappers; verifies PBI_STATUS_API_VALUES shape - __tests__/actions/sprints-cascade.test.ts: 8 cases for completeSprintAction: promote on all-DONE, no promote on partial OPEN, respect out-of-sprint story status, skip already-DONE PBIs, multi-PBI cascade, 0-story guard, demo-user block - Full vitest run: 170/170 green across 21 files Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(ST-1109.10): document PbiStatus enum, sprint-close cascade, and filter UI - docs/scrum4me-architecture.md: pbis-table updated with status column + index; PbiStatus enum + Pbi model in the Prisma schema sample; cascade-on-sprint-close rule documented inline - docs/scrum4me-styling.md: short note pointing to PBI_STATUS_LABELS / PBI_STATUS_COLORS in components/shared/pbi-status-select.tsx so future components don't ad-hoc-copy the color map - docs/plans/ST-1109-pbi-status.md: in-repo mirror of the approved plan (per feedback_plan_location memory) with cascade pseudo-code and end-to-end verification checklist Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ST-1109.11): persist backlog filters in localStorage Filters reset op reload was verwarrend. Nu net als sortMode: - scrum4me:pbi_filter_priority — 'all' | '1' | '2' | '3' | '4' - scrum4me:pbi_filter_status — 'all' | 'ready' | 'blocked' | 'done' useState-init met SSR-guard; ongeldige waarden vallen terug op 'all'. Wis filters reset alle drie de keys correct (sortMode -> 'priority', beide filters -> 'all'), waardoor de localStorage-staat consistent wordt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .github/workflows | ||
| .husky | ||
| .icons | ||
| __tests__ | ||
| actions | ||
| app | ||
| components | ||
| docs | ||
| lib | ||
| prisma | ||
| public | ||
| scripts | ||
| stores | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| components.json | ||
| eslint.config.mjs | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| prisma.config.ts | ||
| proxy.ts | ||
| README.md | ||
| tsconfig.json | ||
| vercel.json | ||
| vitest.config.ts | ||
Scrum4Me – Agile Project Management Tool
Portfolio samenvatting
Scrum4Me is een moderne fullstack webapplicatie voor agile projectmanagement.
De applicatie is gebouwd als portfolio-project om mijn vaardigheden in moderne softwareontwikkeling, cloud deployment en AI-assisted development te demonstreren.
Doel
Veel teams missen overzicht en flexibiliteit in agile workflows.
Scrum4Me biedt een lichtgewicht, web-based oplossing voor het beheren van sprints, taken en teamprocessen.
Mijn rol
- Architectuur en ontwerp
- Fullstack development (frontend + backend)
- Database ontwerp
- Implementatie van authenticatie en API's
- CI/CD en deployment
- AI-assisted development workflow
Functionaliteiten
- Agile dashboards en product backlogs
- PBI-, story-, sprint- en taakbeheer
- Authenticatie en gebruikersbeheer
- Teamtoegang via eigenaar of gekoppelde Developer
- API tokens voor externe integraties
- REST API voor Claude Code workflows
- Drag-and-drop interactie voor planning
- Story-activiteitenlog voor plannen, testresultaten en commits
- Profielfoto, bio en rolbeheer
Technologie stack
- Next.js 16 (App Router)
- React 19
- TypeScript
- Prisma ORM
- PostgreSQL (Neon)
- iron-session en bcryptjs
- Zustand
- dnd-kit
- Tailwind CSS en shadcn/ui
- Sharp voor avatarverwerking
- Vercel Analytics
- Vercel hosting
- GitHub Actions / CI-CD
Architectuur (kort)
- Frontend en backend via Next.js App Router
- Server Components voor data loading
- Server Actions voor UI-mutaties
- Route Handlers voor de externe REST API
- Database via Prisma + PostgreSQL
- Auth via versleutelde sessiecookies
- Producttoegang via eigenaar of
product_members - Deployment via Vercel met Neon als database
Live demo
Voeg hier je Vercel link toe.
Screenshots
Voeg hier screenshots toe van dashboard, product backlog, sprint planning en instellingen.
Wat ik geleerd heb
- Werken met moderne fullstack architectuur in Next.js
- Databaseontwerp met Prisma en PostgreSQL
- Server Actions combineren met REST API Route Handlers
- Beveiliging van cross-user en cross-scope toegang
- AI-assisted development integreren in een eigen workflow
- Cloud deployment en verificatie via Vercel
- Documentatie en agent-instructies verbeteren op basis van code review
Toekomstige verbeteringen
- Multi-user samenwerking verder uitbreiden
- Notificaties
- Performance optimalisatie
- Uitbreiding AI-functionaliteit
- Meer integratietests voor autorisatie en API-flows
Repository
https://github.com/madhura68/Scrum4Me
Technische aanvulling
Deze sectie bevat de praktische projectinformatie die nodig is om de app lokaal te draaien, te deployen en veilig door te ontwikkelen.
Lokale setup
- Installeer dependencies:
npm ci
- Maak lokale environment variabelen:
cp .env.example .env.local
Vul daarna DATABASE_URL en SESSION_SECRET in. DIRECT_URL is optioneel lokaal, maar handig voor migraties in cloudomgevingen.
- Synchroniseer of migreer de database:
npx prisma db push
- Genereer Prisma Client en de ERD:
npm run db:erd
Deze command voert lokaal prisma generate uit. Daardoor worden zowel de Prisma Client als docs/erd.svg opnieuw opgebouwd.
In CI en deployment wordt bewust alleen de Prisma Client gegenereerd met prisma generate --generator client. Het ERD-diagram gebruikt Mermaid/Puppeteer en wordt daarom niet in GitHub Actions of Vercel gegenereerd.
- Seed testdata indien nodig:
npx prisma db seed
- Start de app:
npm run dev
Testing
Unit tests (Vitest, geen database vereist):
npm test
Verwacht: alle 69 tests slagen, 0 failures.
API curl-tests (vereist lopende dev server + API token):
# Zie scripts/README.md voor setup-instructies
bash scripts/test-api.sh
De curl-tests dekken alle 7 API-endpoints: auth (401), demo-blokkering (403), inputvalidatie (400) en happy paths. Zie docs/scrum4me-test-plan.md voor het volledige testplan.
Database
De databasevisualisatie wordt lokaal gegenereerd uit prisma/schema.prisma via prisma-erd-generator.
Handmatige generatie:
npm run db:erd
Tijdens lokale development draait npm run dev naast Next.js ook npm run db:erd:watch. Bij wijzigingen in prisma/schema.prisma wordt docs/erd.svg automatisch opnieuw gegenereerd.
Gebruik npx prisma db push alleen om het schema naar de database te synchroniseren. Gebruik npm run db:erd om lokaal Prisma Client en de ERD te genereren. Gebruik in CI uitsluitend npx prisma generate --generator client.
De app draait standaard op http://localhost:3000.
Scripts
npm run dev # lokale development server
npm run lint # ESLint
npm test # Vitest test suite
npm run build # productiebuild zoals Vercel die verwacht
npm run db:erd # Prisma Client + docs/erd.svg genereren
Environment variables
Zie .env.example.
| Variabele | Verplicht | Doel |
|---|---|---|
DATABASE_URL |
Ja | PostgreSQL connection string voor Prisma |
DIRECT_URL |
Nee | Directe Neon connection string voor migraties |
SESSION_SECRET |
Ja | Minimaal 32 tekens; gebruikt door iron-session |
NODE_ENV |
Nee | Wordt door Node/Vercel gezet |
Vercel Analytics gebruikt geen project-specifieke environment variabele in deze app; de component staat in app/layout.tsx.
Commit Guidelines
We follow a strict commit structure to keep the project maintainable and reviewable.
Rules
- 1 commit = 1 logical change
- Do not mix:
- features + docs
- features + config
- schema + UI
- Keep commits small and focused
- Prefer multiple small commits over one large commit
Commit format
We use a simplified conventional commit style:
- feat: new feature
- fix: bug fix
- docs: documentation only
- chore: config / tooling / cleanup
- refactor: code improvement without behavior change
Examples
Good:
feat(db): add user profile fields
feat(api): add avatar upload endpoint
feat(ui): add profile editor
docs: document profile feature
Bad:
feat: add profile + update docs + fix config
API-overzicht
Alle API-endpoints vereisen:
Authorization: Bearer <token>
| Methode | Endpoint | Doel |
|---|---|---|
GET |
/api/products |
Actieve producten waarvoor de tokengebruiker eigenaar of teamlid is |
GET |
/api/products/:id/next-story |
Volgende story uit de actieve sprint |
GET |
/api/sprints/:id/tasks?limit=10 |
Eerste taken van een sprint |
PATCH |
/api/stories/:id/tasks/reorder |
Taakvolgorde aanpassen; alle IDs moeten bij de story horen |
POST |
/api/stories/:id/log |
Implementatieplan, testresultaat of commit vastleggen |
PATCH |
/api/tasks/:id |
Taakstatus of implementatieplan bijwerken |
POST |
/api/todos |
Todo aanmaken binnen een productcontext |
Security-regels
- Server Actions en Route Handlers vertrouwen nooit op losse client-ID's zonder scope-check.
- Producttoegang loopt via eigenaar of
product_members. - Bulk-mutaties valideren eerst dat alle IDs bij dezelfde toegankelijke parent horen.
- Denormalized fields zoals
story.product_idworden afgeleid van de database-parent, niet van form-data. - Demo-gebruikers krijgen 403 op schrijfoperaties.
Deployment
De productieomgeving is gericht op Vercel + Neon.
- Zet
DATABASE_URL, eventueelDIRECT_URL, enSESSION_SECRETin Vercel. - Zorg dat de Neon-database gemigreerd is.
- Push naar
main; Vercel deployt automatisch. - Controleer na deployment:
- login en dashboard
/api/productsmet een API-token- avatar-upload
- Vercel Analytics in het Vercel dashboard