* feat(PBI-76): extend UserSettings schema with layout Adds layout.splitPanePositions and layout.activeSprints. These will hold values currently kept in client-side and server-side cookies (Phase 2). Two new tests cover the shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(PBI-76): migrate SplitPane positions to user-settings store Outside of a drag the store is the source of truth (cross-tab updates flow in for free). During a drag we keep splits in local state so mousemove does not round-trip through the store. On mouseup we persist the final splits via setPref. Removes document.cookie reads/writes — cookieKey is reused as the store-key for backwards compat. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(PBI-76): resolveActiveSprint reads from User.settings lib/active-sprint: - New helpers: getActiveSprintIdFromSettings, setActiveSprintInSettings, clearActiveSprintInSettings — all read/write user.settings.layout.activeSprints. - resolveActiveSprint(productId, userId) — userId now required, falls back to first OPEN, then most recent CLOSED sprint. - Cookie helpers (getActiveSprintIdFromCookie/setActiveSprintCookie/ clearActiveSprintCookie) removed. Callers updated to pass session.userId. The cookie-based fallback path is gone — `actions/active-sprint.ts` and `actions/sprints.ts` will be updated in the next commit (T-917). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(PBI-76): rewrite setActiveSprint callers to use settings setActiveSprintAction, syncActiveSprintCookieAction, and the two sprint-creation paths in actions/sprints.ts now write through setActiveSprintInSettings (which also emits pg_notify for cross-tab sync) instead of dropping a cookie. The action names keep the 'cookie' suffix in the user-visible API for now — clean rename can come later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(PBI-76): migration helper v2 — handle legacy cookies Bumps marker version to 'v2'. buildMigrationPatch now also scans document.cookie for `sp:*` (split-pane positions) and `active_sprint_*` (active sprint per product) and lifts them into layout.splitPanePositions / layout.activeSprints. clearLegacyStorage replaces clearLegacyLocalStorage and clears both keys and cookies. clearLegacyLocalStorage stays as a deprecated alias so the bridge upgrade is a single rename. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(PBI-76): align tests with new SplitPane and active-sprint flow - split-pane.test.tsx: seed positions via Zustand store instead of document.cookie; mock @/actions/user-settings so the prisma client is not transitively initialised in jsdom. - backlog-split-pane.test.tsx: same action mock. - sprint-dates.test.ts: add user.findUnique/update + $executeRaw mocks because createSprintAction now writes to user-settings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| .husky | ||
| .icons | ||
| __tests__ | ||
| actions | ||
| app | ||
| components | ||
| docs | ||
| hooks | ||
| lib | ||
| prisma | ||
| public | ||
| scripts | ||
| stores | ||
| tests | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| components.json | ||
| eslint.config.mjs | ||
| instrumentation-client.ts | ||
| instrumentation.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| prisma.config.ts | ||
| proxy.ts | ||
| README.md | ||
| sentry.edge.config.ts | ||
| sentry.server.config.ts | ||
| 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
Documentation
- CHANGELOG.md — release-historie (Keep a Changelog)
- docs/INDEX.md — generated index of all docs (front-matter driven)
- docs/glossary.md — domain terms (PBI, Story, MCP-job, etc.)
- CLAUDE.md / AGENTS.md — agent instructions
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:
npx prisma generate
- 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 445 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/qa/api-test-plan.md voor het volledige testplan.
Database
Het schema staat in prisma/schema.prisma; uitgebreide documentatie in docs/architecture/data-model.md.
Gebruik npx prisma db push om schema-wijzigingen naar de database te synchroniseren. npx prisma generate (of prisma generate --generator client in CI) genereert de Prisma 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
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 (Prisma directUrl) |
SESSION_SECRET |
Ja | Minimaal 32 tekens; gebruikt door iron-session |
CRON_SECRET |
Productie | Bearer-secret voor /api/cron/* routes — required als crons aan staan |
NEXT_PUBLIC_VAPID_PUBLIC_KEY |
Nee | VAPID public key voor Web Push — genereer met npx web-push generate-vapid-keys |
VAPID_PRIVATE_KEY |
Nee | VAPID private key voor Web Push |
VAPID_SUBJECT |
Nee | Contact URI voor Web Push (bijv. mailto:admin@example.com) |
INTERNAL_PUSH_SECRET |
Nee | Bearer-secret voor /api/internal/push/* routes (min 32 tekens) |
NEXT_PUBLIC_SENTRY_DSN |
Nee | Sentry DSN — zonder is de SDK een no-op |
SENTRY_ORG / SENTRY_PROJECT / SENTRY_AUTH_TOKEN |
Nee | Source-map upload tijdens build |
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/health |
Liveness; ?db=1 doet ook een DB-ping (geen auth) |
GET |
/api/products |
Actieve producten waarvoor de tokengebruiker eigenaar of teamlid is |
GET |
/api/products/:id/next-story |
Hoogst geprioriteerde open story uit de actieve sprint |
GET |
/api/products/:id/claude-context |
Bundled product / actieve sprint / next-story (met tasks) / open ideas voor MCP |
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 implementation_plan bijwerken |
GET / POST |
/api/ideas · GET / PATCH /api/ideas/:id |
Idea CRUD (M12 — vervangt voormalige /api/todos) |
GET |
/api/jobs/:id/sub-tasks |
sprint_task_executions van een SPRINT_IMPLEMENTATION-job |
GET |
/api/users/:id/avatar |
Avatar van een specifieke gebruiker |
POST / GET |
/api/profile/avatar |
Eigen avatar uploaden of opvragen |
Daarnaast leveren /api/realtime/{backlog,solo,jobs,notifications} SSE-streams en zijn er auth-helpers /api/auth/pair/* (QR-pairing, M10), interne push-routes onder /api/internal/push/*, en cron-handlers (/api/cron/cleanup-agent-artifacts, /api/cron/expire-questions).
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