- Updated DagnotatieBlock to use activePatient for prefill if no patientId is provided. - Enhanced PatientDashboardBlock to fallback to activePatient for patientId and name. - Adjusted usePatientSelection to handle pending actions and re-route after patient selection. - Refined chat components to manage nudge messages and integrate them into the chat flow. - Improved UI elements for better patient selection experience. This update enhances user experience by ensuring that the active patient context is utilized across multiple components, streamlining workflows and reducing manual input.
398 lines
9.0 KiB
Plaintext
398 lines
9.0 KiB
Plaintext
---
|
|
title: "Documentation System"
|
|
category: "release-notes-system"
|
|
group: "infrastructure"
|
|
version: "0.2.0"
|
|
releaseDate: "2024-11-19"
|
|
status: "completed"
|
|
description: "MDX-based documentatie systeem voor transparante build-in-public feature docs"
|
|
---
|
|
|
|
## Overview
|
|
|
|
Een volledig MDX-based documentatie systeem waarmee we eenvoudig en transparant kunnen documenteren wat er gebouwd wordt. Het systeem maakt het mogelijk om feature documentatie te schrijven in Markdown, met support voor afbeeldingen, code snippets en rich formatting.
|
|
|
|
**Waarom dit belangrijk is:**
|
|
- 📝 Makkelijk te schrijven (Markdown/MDX)
|
|
- 🎨 Rich content support (images, code, links)
|
|
- 🗂️ Thematische organisatie (niet chronologisch)
|
|
- 📱 Mobile-first responsive design
|
|
- ⚡ Performance (Static Site Generation)
|
|
- 🔍 SEO-vriendelijk met metadata per release
|
|
|
|
---
|
|
|
|
## Features
|
|
|
|
### MDX Content System
|
|
|
|
Het hart van het systeem: schrijf release notes in MDX bestanden met frontmatter metadata.
|
|
|
|
**Voorbeeld template:**
|
|
```mdx
|
|
---
|
|
title: "Feature Name"
|
|
category: "feature-slug"
|
|
group: "foundation | features | infrastructure"
|
|
version: "0.1.0"
|
|
releaseDate: "2024-11-19"
|
|
status: "completed | in_progress | planned"
|
|
description: "Short description"
|
|
---
|
|
|
|
## Overview
|
|
Content here...
|
|
```
|
|
|
|
**Voordelen:**
|
|
- Markdown syntax = makkelijk schrijven
|
|
- Frontmatter voor metadata
|
|
- MDX = React components in content mogelijk
|
|
- Version control via Git
|
|
- Automatische parsing en rendering
|
|
|
|
### Thematische Sidebar Navigatie
|
|
|
|
Releases zijn georganiseerd op functionaliteit, niet op chronologische volgorde.
|
|
|
|
**Groepen:**
|
|
- **Foundation** - Basis setup (Auth, Database, Environment)
|
|
- **Core Features** - EPD functionaliteit (Dashboard, Clients, AI)
|
|
- **Cortex Intent driven EPD** - Een EPD dat de intentie van de zorgprofessional herkent en meedenkt.
|
|
- **Infrastructure** - Ondersteunend (Hosting, Design, Performance)
|
|
|
|
**Features:**
|
|
- Collapsible sections per group
|
|
- Status indicators (completed/in progress/planned)
|
|
- Active state highlighting
|
|
- Auto-generated from MDX files
|
|
|
|
### Overview Page
|
|
|
|
Centrale pagina met overzicht van alle releases, gegroepeerd op status.
|
|
|
|
**Sections:**
|
|
- ✅ Voltooid - Afgeronde features
|
|
- 🔄 In Progress - Features in ontwikkeling
|
|
- ⏳ Gepland - Toekomstige features
|
|
|
|
**Stats cards:**
|
|
- Aantal voltooide releases
|
|
- Aantal in-progress releases
|
|
- Aantal geplande releases
|
|
|
|
### Detail Pages
|
|
|
|
Individuele pagina per release met volledige content.
|
|
|
|
**Features:**
|
|
- Rich MDX rendering
|
|
- Custom styled components
|
|
- Code syntax highlighting
|
|
- Responsive images met captions
|
|
- SEO metadata per page
|
|
- Navigation (terug naar overview, naar timeline)
|
|
|
|
### Mobile Responsive
|
|
|
|
**Desktop:**
|
|
- Fixed sidebar (256px width)
|
|
- Full content area
|
|
- Collapsible groups
|
|
|
|
**Mobile:**
|
|
- Horizontal scroll tabs boven content
|
|
- Touch-friendly navigation
|
|
- Optimized voor kleine schermen
|
|
|
|
### Custom MDX Components
|
|
|
|
Styled components voor consistente formatting:
|
|
|
|
**Typography:**
|
|
- Headings (h1-h4) met spacing
|
|
- Paragraphs met optimale line-height
|
|
- Lists (ordered/unordered)
|
|
- Blockquotes met teal accent
|
|
|
|
**Media:**
|
|
- Images met captions en responsive sizing
|
|
- Code blocks met syntax highlighting
|
|
- Tables met styled headers
|
|
|
|
**Links:**
|
|
- Internal links (Next.js Link)
|
|
- External links met proper attributes
|
|
- Teal color scheme (consistent met brand)
|
|
|
|
---
|
|
|
|
## Technical Notes
|
|
|
|
### Architecture
|
|
|
|
**Stack:**
|
|
- Next.js 15 App Router
|
|
- next-mdx-remote voor MDX rendering
|
|
- gray-matter voor frontmatter parsing
|
|
- TypeScript voor type safety
|
|
|
|
**Rendering:**
|
|
- Server-side MDX parsing
|
|
- Static Site Generation (SSG)
|
|
- Pre-rendered HTML voor performance
|
|
- Client-side hydration
|
|
|
|
### File Structure
|
|
|
|
```
|
|
# Code
|
|
app/(marketing)/documentatie/
|
|
├── layout.tsx # Sidebar wrapper
|
|
├── page.tsx # Overview
|
|
├── [category]/
|
|
│ └── page.tsx # Detail renderer
|
|
└── components/
|
|
├── release-sidebar.tsx
|
|
└── mdx-components.tsx
|
|
|
|
# Content
|
|
content/nl/documentatie/
|
|
├── _index.json # Categories metadata
|
|
├── authentication.mdx
|
|
└── release-notes-system.mdx
|
|
|
|
# Utilities
|
|
lib/mdx/
|
|
└── releases.ts # MDX parsing functions
|
|
|
|
# Templates
|
|
docs/templates/
|
|
└── release-note-template.mdx
|
|
```
|
|
|
|
### Key Functions
|
|
|
|
```typescript
|
|
// Get all release notes
|
|
export async function getAllReleases(): Promise<ReleaseNote[]> {
|
|
const files = fs.readdirSync(RELEASES_DIR)
|
|
// Parse MDX files, extract frontmatter
|
|
// Sort by group and category
|
|
return releases
|
|
}
|
|
|
|
// Get single release by slug
|
|
export async function getRelease(slug: string): Promise<ReleaseNote | null> {
|
|
const filePath = path.join(RELEASES_DIR, `${slug}.mdx`)
|
|
const { data, content } = matter(fileContent)
|
|
return { slug, frontmatter: data, content }
|
|
}
|
|
```
|
|
|
|
### Static Site Generation
|
|
|
|
```typescript
|
|
// Generate static params for all releases
|
|
export async function generateStaticParams() {
|
|
const releases = await getAllReleases()
|
|
return releases.map((release) => ({
|
|
category: release.slug,
|
|
}))
|
|
}
|
|
```
|
|
|
|
**Voordelen:**
|
|
- Pre-rendered HTML = snelle load times
|
|
- No runtime MDX parsing = beter performance
|
|
- SEO-friendly = search engines kunnen content lezen
|
|
|
|
---
|
|
|
|
## Improvements
|
|
|
|
**Developer Experience:**
|
|
- Template bestand voor consistente structuur
|
|
- TypeScript types voor frontmatter
|
|
- Auto-completion in VS Code (frontmatter schema)
|
|
|
|
**User Experience:**
|
|
- Responsive design voor alle devices
|
|
- Snelle navigatie met sidebar
|
|
- Clear visual hierarchy
|
|
- Status badges voor transparency
|
|
|
|
**Performance:**
|
|
- Static generation = < 100ms load time
|
|
- Optimized images (Next.js Image)
|
|
- Minimal JavaScript bundle (+12kb voor MDX parser)
|
|
|
|
---
|
|
|
|
## Workflow
|
|
|
|
### Nieuwe Release Note Toevoegen
|
|
|
|
**Stap 1:** Kopieer template
|
|
```bash
|
|
cp docs/templates/release-note-template.mdx \
|
|
content/nl/documentatie/new-feature.mdx
|
|
```
|
|
|
|
**Stap 2:** Vul frontmatter in
|
|
```yaml
|
|
---
|
|
title: "New Feature Name"
|
|
category: "new-feature"
|
|
group: "features"
|
|
version: "0.3.0"
|
|
releaseDate: "2024-11-20"
|
|
status: "completed"
|
|
description: "Short description here"
|
|
---
|
|
```
|
|
|
|
**Stap 3:** Schrijf content in Markdown
|
|
|
|
**Stap 4:** (Optioneel) Voeg screenshots toe
|
|
```bash
|
|
mkdir -p public/documentatie/new-feature/
|
|
# Add images: screenshot-1.png, etc.
|
|
```
|
|
|
|
**Stap 5:** Build en test
|
|
```bash
|
|
npm run build
|
|
npm run dev
|
|
# Visit /documentatie/new-feature
|
|
```
|
|
|
|
**Stap 6:** Commit en push
|
|
```bash
|
|
git add content/nl/documentatie/new-feature.mdx
|
|
git commit -m "docs: add new-feature release note"
|
|
```
|
|
|
|
---
|
|
|
|
## Integration
|
|
|
|
### Timeline Integration
|
|
|
|
Timeline component heeft nu link naar release notes:
|
|
|
|
```tsx
|
|
<a href="/documentatie">
|
|
Bekijk gedetailleerde release notes →
|
|
</a>
|
|
```
|
|
|
|
### Navigation Integration
|
|
|
|
Header navigatie heeft "Releases" link toegevoegd:
|
|
|
|
```json
|
|
{
|
|
"links": [
|
|
{ "label": "Releases", "href": "/documentatie" },
|
|
{ "label": "Contact", "href": "/contact" },
|
|
{ "label": "Login", "href": "/login" }
|
|
]
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## Metrics
|
|
|
|
**Development:**
|
|
- ⏱️ Build tijd: 2.5 uur
|
|
- 📝 Lines of code: ~2,750
|
|
- 🧪 Build status: ✅ Success
|
|
|
|
**Performance:**
|
|
- 🚀 Page load: < 100ms (static)
|
|
- 📦 Bundle size: +12kb (MDX parser)
|
|
- 💾 Build time: +2.2s (22 static pages)
|
|
|
|
**Files Added:**
|
|
- 14 new files
|
|
- 6 components
|
|
- 3 utility functions
|
|
- 2 documentation files
|
|
- 1 template file
|
|
|
|
**Cost:**
|
|
- 💰 Dependencies: €0 (open source)
|
|
- 💰 Hosting: €0 (Vercel static)
|
|
- 💰 Build time: €0 (within limits)
|
|
|
|
---
|
|
|
|
## Screenshots
|
|
|
|
### Overview Page
|
|
*Overview pagina met status filtering (voltooid/in progress/gepland)*
|
|
|
|
### Sidebar Navigation
|
|
*Thematische sidebar met collapsible groups (Foundation, Features, Infrastructure)*
|
|
|
|
### Detail Page
|
|
*Release detail met MDX content rendering en custom components*
|
|
|
|
### Mobile View
|
|
*Responsive horizontal scroll navigation op mobile*
|
|
|
|
---
|
|
|
|
## Related Links
|
|
|
|
**Documentation:**
|
|
- [Bouwplan v1.2](/docs/specs/releasepage/bouwplan-release-notes-v1.0.md)
|
|
- [Release Note Template](/docs/templates/release-note-template.mdx)
|
|
|
|
**Timeline:**
|
|
- [Build Timeline](/#timeline) - Week overzicht
|
|
|
|
**External:**
|
|
- [next-mdx-remote](https://github.com/hashicorp/next-mdx-remote)
|
|
- [gray-matter](https://github.com/jonschlinkert/gray-matter)
|
|
- [MDX Documentation](https://mdxjs.com/)
|
|
|
|
---
|
|
|
|
## What's Next
|
|
|
|
Mogelijke verbeteringen voor toekomstige versies:
|
|
|
|
- 🔜 RSS feed voor release notes
|
|
- 🔜 Search functionaliteit
|
|
- 🔜 Filters (features/fixes/improvements)
|
|
- 🔜 Changelog syntax highlighting
|
|
- 🔜 Email notifications bij nieuwe releases
|
|
- 🔜 Automatic changelog generation from git commits
|
|
- 🔜 Dark mode support
|
|
- 🔜 Export naar PDF/Markdown
|
|
|
|
---
|
|
|
|
## Lessons Learned
|
|
|
|
**Wat ging goed:**
|
|
- MDX = perfecte balans tussen eenvoud en kracht
|
|
- Thematische indeling > chronologische indeling
|
|
- Template systeem zorgt voor consistentie
|
|
- Static generation = excellent performance
|
|
|
|
**Wat anders zou kunnen:**
|
|
- Syntax highlighting library toevoegen (shiki/prism)
|
|
- Table of contents auto-generation
|
|
- Reading time estimation
|
|
- Related releases suggestions
|
|
|
|
**Herbruikbaar voor andere projecten:**
|
|
- MDX parsing utilities
|
|
- Release sidebar component
|
|
- Custom MDX components
|
|
- Template structure
|