237 lines
5.7 KiB
Markdown
237 lines
5.7 KiB
Markdown
# Scrum4Me
|
|
|
|
Lichtgewicht Scrum-planner voor solo developers en kleine teams die meerdere softwareprojecten parallel beheren.
|
|
|
|
**Functies:**
|
|
- Hiërarchisch werkbeheer: Product → PBI → Story → Taak
|
|
- Gesplitste planningsschermen met drag-and-drop
|
|
- Sprint backlog en planning
|
|
- REST API voor integratie met Claude Code
|
|
- Demo-modus (alleen lezen)
|
|
|
|
---
|
|
|
|
## Lokale quickstart
|
|
|
|
### Vereisten
|
|
- Node.js 20+
|
|
- npm
|
|
- Een Neon PostgreSQL database ([neon.tech](https://neon.tech) — gratis tier volstaat)
|
|
|
|
### Stappen
|
|
|
|
```bash
|
|
# 1. Clone de repository
|
|
git clone <repo-url>
|
|
cd scrum4me
|
|
|
|
# 2. Installeer dependencies
|
|
npm install
|
|
|
|
# 3. Configureer omgevingsvariabelen
|
|
cp .env.example .env.local
|
|
# Vul de volgende waarden in .env.local:
|
|
# DATABASE_URL — Neon pooled connection string
|
|
# DIRECT_URL — Neon direct connection string
|
|
# SESSION_SECRET — genereer met: openssl rand -base64 32
|
|
|
|
# 4. Database schema aanmaken en migraties uitvoeren
|
|
npx prisma migrate deploy
|
|
|
|
# 5. Testdata inladen
|
|
npx prisma db seed
|
|
|
|
# 6. Start de ontwikkelserver
|
|
npm run dev
|
|
```
|
|
|
|
Open [http://localhost:3000](http://localhost:3000).
|
|
|
|
**Demo-account:** gebruikersnaam `demo` / wachtwoord `demo1234` (alleen lezen)
|
|
|
|
---
|
|
|
|
## Omgevingsvariabelen
|
|
|
|
| Variabele | Beschrijving |
|
|
|---|---|
|
|
| `DATABASE_URL` | Neon pooled connection string |
|
|
| `DIRECT_URL` | Neon direct connection string (voor migraties) |
|
|
| `SESSION_SECRET` | Minimaal 32 tekens — genereer met `openssl rand -base64 32` |
|
|
|
|
---
|
|
|
|
## Cloud deployment (Vercel + Neon)
|
|
|
|
### 1. Database aanmaken op Neon
|
|
|
|
1. Maak een account op [neon.tech](https://neon.tech)
|
|
2. Maak een nieuw project en database
|
|
3. Kopieer de connection strings:
|
|
- **DATABASE_URL**: de pooled connection string
|
|
- **DIRECT_URL**: de directe (niet-gepoolde) connection string
|
|
|
|
### 2. Deployen op Vercel
|
|
|
|
1. Push de code naar GitHub
|
|
2. Importeer het project in [vercel.com](https://vercel.com)
|
|
3. Voeg de volgende environment variables toe in Vercel:
|
|
- `DATABASE_URL` (Neon pooled URL)
|
|
- `DIRECT_URL` (Neon direct URL)
|
|
- `SESSION_SECRET` (random string >= 32 tekens)
|
|
4. Deploy
|
|
|
|
### 3. Database migraties uitvoeren
|
|
|
|
```bash
|
|
# Eenmalig na deploy:
|
|
npx prisma migrate deploy
|
|
npx prisma db seed
|
|
```
|
|
|
|
---
|
|
|
|
## REST API
|
|
|
|
Alle endpoints vereisen `Authorization: Bearer <token>`.
|
|
Maak een token aan via **Instellingen -> API Tokens** in de app.
|
|
|
|
### Endpoints
|
|
|
|
#### `GET /api/products`
|
|
Haal alle actieve producten op.
|
|
|
|
```bash
|
|
curl -H "Authorization: Bearer <token>" \
|
|
https://your-app.vercel.app/api/products
|
|
```
|
|
|
|
**Response:**
|
|
```json
|
|
[
|
|
{ "id": "clx...", "name": "Mijn Product", "repo_url": "https://github.com/..." }
|
|
]
|
|
```
|
|
|
|
---
|
|
|
|
#### `GET /api/products/:id/next-story`
|
|
Haal de hoogst geprioriteerde open story uit de actieve sprint op.
|
|
|
|
```bash
|
|
curl -H "Authorization: Bearer <token>" \
|
|
https://your-app.vercel.app/api/products/<product-id>/next-story
|
|
```
|
|
|
|
**Response:** story-object inclusief taken.
|
|
|
|
---
|
|
|
|
#### `GET /api/sprints/:id/tasks?limit=10`
|
|
Haal de eerste N taken uit de sprint op (standaard 10, max 50).
|
|
|
|
```bash
|
|
curl -H "Authorization: Bearer <token>" \
|
|
"https://your-app.vercel.app/api/sprints/<sprint-id>/tasks?limit=5"
|
|
```
|
|
|
|
---
|
|
|
|
#### `POST /api/stories/:id/log`
|
|
Voeg een logvermelding toe aan een story.
|
|
|
|
```bash
|
|
# Implementatieplan:
|
|
curl -X POST -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type":"IMPLEMENTATION_PLAN","content":"Aanpak: ..."}' \
|
|
https://your-app.vercel.app/api/stories/<story-id>/log
|
|
|
|
# Testresultaat:
|
|
curl -X POST -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type":"TEST_RESULT","content":"Alle tests geslaagd","status":"PASSED"}' \
|
|
https://your-app.vercel.app/api/stories/<story-id>/log
|
|
|
|
# Commit:
|
|
curl -X POST -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type":"COMMIT","content":"feat: ST-001","commit_hash":"abc123","commit_message":"feat: ST-001 scaffolding"}' \
|
|
https://your-app.vercel.app/api/stories/<story-id>/log
|
|
```
|
|
|
|
---
|
|
|
|
#### `PATCH /api/stories/:id/tasks/reorder`
|
|
Pas de taakvolgorde aan binnen een story.
|
|
|
|
```bash
|
|
curl -X PATCH -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"task_ids":["id-1","id-2","id-3"]}' \
|
|
https://your-app.vercel.app/api/stories/<story-id>/tasks/reorder
|
|
```
|
|
|
|
---
|
|
|
|
#### `PATCH /api/tasks/:id`
|
|
Werk de status van een taak bij.
|
|
|
|
```bash
|
|
curl -X PATCH -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"status":"IN_PROGRESS"}' \
|
|
https://your-app.vercel.app/api/tasks/<task-id>
|
|
```
|
|
|
|
**Status waarden:** `TO_DO` - `IN_PROGRESS` - `DONE`
|
|
|
|
---
|
|
|
|
#### `POST /api/todos`
|
|
Maak een todo aan.
|
|
|
|
```bash
|
|
curl -X POST -H "Authorization: Bearer <token>" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"title":"Mijn nieuwe todo"}' \
|
|
https://your-app.vercel.app/api/todos
|
|
```
|
|
|
|
---
|
|
|
|
## Claude Code integratie
|
|
|
|
Scrum4Me integreert met [Claude Code](https://claude.ai/claude-code) via de REST API.
|
|
|
|
1. Maak een API token aan via **Instellingen -> API Tokens**
|
|
2. Gebruik de API om implementatieplannen, testresultaten en commits automatisch te loggen in stories
|
|
|
|
---
|
|
|
|
## Scripts
|
|
|
|
| Script | Beschrijving |
|
|
|---|---|
|
|
| `npm run dev` | Lokale ontwikkelserver |
|
|
| `npm run build` | Productie-build |
|
|
| `npm run lint` | ESLint |
|
|
| `npm test` | Beveiligingstests uitvoeren |
|
|
| `npx tsc --noEmit` | TypeScript-check |
|
|
| `npx prisma migrate deploy` | Migraties uitvoeren |
|
|
| `npx prisma db seed` | Testdata inladen |
|
|
|
|
---
|
|
|
|
## Tech stack
|
|
|
|
- **Next.js 15** (App Router) + **React 19**
|
|
- **TypeScript** strict
|
|
- **Tailwind CSS** + **shadcn/ui** (Base UI)
|
|
- **Zustand** (client state)
|
|
- **dnd-kit** (drag-and-drop)
|
|
- **Prisma v7** (ORM)
|
|
- **PostgreSQL** via **Neon** (zowel lokaal als productie)
|
|
- **iron-session** (auth)
|
|
- **Sonner** (toasts)
|
|
- **Zod** (validatie)
|