23 Commits

Author SHA1 Message Date
znetsixe
8dc6e65e28 Fix node creation: proper angle routing, axios refresh, thema form
Root causes fixed:
1. branchAngle routing only matched 0° — now uses isExtendAngle()
   for all extend angles (0/180/45/315), vertical (90/270) = fork
2. handleForkBranch did nothing at dim 1 — now opens thema form
3. After form submit, Inertia reloaded entire page losing canvas
   dimension state — now uses axios + refreshMapData() via API
4. Custom metro node form used dead Inertia useForm refs

Changes:
- All creation flows now use axios POST + refreshMapData() which
  fetches /api/map/strategy or /api/map/project/{id} without page
  reload, preserving the canvas dimension and zoom state
- New thema creation modal (for ↑↓ fork at dim 1)
- Track creation modal updated to use axios (for ↑↓ fork in dim 2)
- Metro node creation modal updated to use axios
- CommitmentForm @close now triggers refreshMapData()
- CommitmentForm eigenaar_id now has required validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 17:50:55 +02:00
znetsixe
e4f040657f Add one-command setup script for Linux laptops
Usage: git clone <repo> && cd innovatieplatform && bash setup.sh

The script:
- Checks for docker and docker compose v2
- Creates .env from .env.example with auto-generated APP_KEY
- Builds all 7 Docker containers
- Waits for PostgreSQL and Redis health checks
- Runs migrations and seeds with 2026 planning + student data
- Builds frontend (if npm available locally)
- Prints access URLs and credentials

Prerequisites: docker, docker compose. That's it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 17:31:32 +02:00
znetsixe
f4ec49254a Full sweep: fix broken features, redesign NodePreview, wire AI service
FIXES (from comprehensive audit):
- NodePreview: complete rewrite — 380px left panel with document
  summaries, commitment list, phase track visualization, scrollable.
  Fixed children count bug (was showing [object Object]).
  Slides in from left (not right) to not overlap branch handles.
- CommitmentForm: added required validation on eigenaar_id field
- MetroMap: wired custom metro node creation with form + POST /metro-nodes
- MetroMap: removed dead handleCliCommand console.log
- MetroMap: added metro node creation modal (naam + beschrijving)

NEW — AI Service integration:
- ai-service/main.py: real Anthropic API integration via httpx
  - Reads ANTHROPIC_API_KEY from env, uses claude-haiku-4-5-20251001
  - /api/chat fetches project context from PostgreSQL (docs, commitments)
  - /api/summarize sends content to Claude for summarization
  - /api/search does basic text search on documents + kennis_artikelen
- AiController.php: Laravel proxy for /api/ai/chat → ai-service
- CliBar.vue: complete rewrite with async API calls, processing state,
  error handling, conversation history, auto-scroll
  - Receives projectId prop for context-scoped AI queries
  - Shows "denken..." animation while waiting for response
- docker-compose.yml: passes ANTHROPIC_API_KEY to ai-service container
- config/services.php: ai service URL configuration

To activate AI: set ANTHROPIC_API_KEY in .env and rebuild ai-service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:07:51 +02:00
znetsixe
9f033835cd Restructure student tracks by cross-reference chains, add project rules
Student tracks restructured based on document cross-reference analysis:
- Track 1 "Gemalen & CRC Keten": Grace→Kevin→Robin→Adriaan (chain)
- Track 2 "Condition Monitoring": Kevin→Yamai (fork from Track 1)
- Track 3 "Zuivering & Beluchting": Noa‖Elise (parallel, same problem)
- Track 4 "EVOLV Reactor Model": Pieter (standalone, no student cross-refs)
- Track 5 "IoT & ICT Infra": Bart→Fontys ICT→Fontys TOGAF (chain)

Inter-student dependencies added (7 new):
- Grace→Kevin, Kevin→Robin, Robin→Adriaan (Track 1 chain)
- Kevin→Yamai (Track 2 fork)
- Bart→Fontys ICT→Fontys TOGAF (Track 5 chain)

CLAUDE.md: Added "Metro Map Data Rules" section documenting:
- Thema=line, Project=station, speerpunt=track grouping
- Student work rules: cross-references determine track sharing
- Identified chains with evidence (reference counts from source docs)
- Grid alignment requirements

MetroCanvas: Truncate long station labels to prevent overlap (max ~20 chars
based on grid spacing, with ellipsis)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:19:16 +02:00
znetsixe
28d7ac008f Seed 11 student projects, 5 kennis artikelen, cross-project dependencies
New thema "Studenten & Onderzoek" with 4 speerpunten:
- Gemalen & Pompen: Adriaan Sol (pilot 3 rioolgemaalketen), Robin van
  Weelie (D.R.A.I.N. regelsoftware), Grace van Geel (pompefficiëntie)
- Zuiveringsproces & Biologie: Noa de Groot (beluchting), Elise Nouws
  (algen zuurstofproductie), Pieter van der Wilt (ASM reactor EVOLV)
- EDGE & Architectuur: Kevin Haest (CRC IOT2050), Yamai van Rooij
  (condition monitoring MCSA), Bart van Gool (IoT-hub integratielaag)
- ICT & Security: Fontys ICT proftaak (Docker/CI-CD/SOC), Fontys
  TOGAF security groep

Cross-project dependencies linking student work to 2026 projects:
- Kevin CRC → BRIDGE (edge computing proof)
- Robin D.R.A.I.N. → Gemaal 3.0 (meetdata)
- Pieter ASM → Gemaal 3.0 (reactor model in EVOLV)

5 kennis artikelen: ISA-88 hierarchy, VLAN separation, CRC system,
pump efficiency findings, R&D stack architecture.

Verified: 5 lines, 17 stations, 6 connections, all grid-aligned.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:50:14 +02:00
znetsixe
2b78ece00d Fix: only up/down creates new track, diagonals extend the line
↑ ↓ = new track
→ ← ↘ ↗ = extend same line

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:03:07 +02:00
znetsixe
c21cb29401 Fix branch semantics: only horizontal extends, vertical + diagonal = new track
→ ← = extend same line (horizontal tracks)
↑ ↓ = new track (parallel line above/below)
↘ ↗ = new track (diagonal fork)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 12:04:10 +02:00
znetsixe
6fdeb1b5e2 Add vertical branch handles and seed architecture documents from diagrams
Branch handles: Added all 6 directions (→ ← ↑ ↓ ↘ ↗) so an entire
metro map can grow from a single starting node. Cardinal directions
(0/90/180/270°) extend the same line, diagonals (45/315°) fork to
new tracks.

Documents seeded from 6 architecture diagrams:
- EVOLV Digital Twin Hierarchy (ISA-88 tracks) → Gemaal 3.0
- Pumping Station dependency chain → Gemaal 3.0
- PLC/EDGE VLAN network architecture → BRIDGE
- R&D Stack topology (Cloud/EDGE/OT) → BRIDGE
- CoreSync network setup → BRIDGE
- R&D Timeline gitflow tracks → Governance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 12:01:30 +02:00
znetsixe
22cbc26b75 Any node can become zoomable: add dimension via right-click
Visual distinction:
- Populated dimension: dashed cyan ring + [+] indicator
- Empty dimension: subtle gray dashed ring + [○] indicator
- No dimension: plain station (no ring)

Context menu changes:
- "Open dimension" on nodes that have children (zooms in directly)
- "Add dimension" on nodes without children (creates empty zoomable space)
- Removed old "Add child node" option

Add dimension creates an empty children structure on the node with
proper parent metadata. The node immediately shows the [○] indicator
and becomes zoomable. User enters and builds tracks with FAB + branch
handles. Truly recursive metro — any station can contain a world.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 10:10:40 +02:00
znetsixe
1dc31a53df Fix zoom transition and allow branch handles on occupied positions
Zoom fix: The zoom handler was being completely removed during the
fit-to-view animation (svg.on('.zoom', null)), which meant D3's
transition dispatched zoom events that nobody handled — so `g` never
got its transform updated during the animation. The view stayed stuck
at the old scale until the user scrolled again.

Fix: Keep handleZoom active during commit animation. When isCommitting
is true, it only applies the visual transform (g.attr('transform'))
and skips threshold logic. This lets D3's transition smoothly animate
`g` to the fit-to-view position.

Branch handles: Removed the occupied-position check. In a real metro,
stations can be shared between lines (interchanges). Now all 3 branch
handles always appear. Ghost preview shows "interchange" label when
targeting an occupied position.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 09:52:25 +02:00
znetsixe
829b46561e Fix tooltip position: show on left side of node to not overlap branch handles
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 09:46:19 +02:00
znetsixe
d41ca76e0d Metro map interaction redesign: fit-to-view zoom, grid, branch handles, custom tracks
Phase 1 — Fit-to-view zoom:
- computeFitTransform() calculates bounding box and scales to fit all nodes
- Replaces hardcoded scale=1 reset in animateZoomReset() and initCanvas()
- Dim 1 no longer appears tiny after zooming out from dim 2

Phase 2 — Grid system:
- Shared gridConstants.js (GRID=50, GRID_STEP_X=200, GRID_STEP_Y=150)
- MapDataService snapToGrid() aligns all node positions server-side
- Canvas renders subtle grid lines (shown on interaction only, with fade)
- Line highlighting support via setHighlightedLine() for FAB hover

Phase 3 — Branch handles:
- Hover any station node → 3 "+" handles appear (0°/45°/315°)
- 0° extends the current line, 45°/315° fork to create new branch
- Ghost preview (dashed line + circle) on handle hover
- Handles only show at unoccupied grid positions
- Grid fades in during handle interaction, fades out after

Phase 4 — Custom tracks database:
- metro_lines table (project_id, naam, color, type, order)
- metro_nodes table (metro_line_id, naam, status, x, y, order)
- MetroLine + MetroNode models, controllers, routes
- Project.metroLines() relationship added

Phase 5+6 — FAB redesign + MetroMap wiring:
- FAB shows "Nieuw thema (lijn)" at root, "Nieuwe lijn" in project dim
- Track creation modal with retro-styled form
- MetroMap handles create-node events from branch handles
- Extend (0°) opens commitment/document form, fork opens track form
- Canvas context menu replaced with "hover to branch" hint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 09:40:56 +02:00
znetsixe
6711cd01a3 Replace demo data with 2026 R&D planning, fix zoom and dimension-aware creation
Seeder: Replace 12 demo projects with 6 real 2026 projects from Planning PPTX:
- BRIDGE (Pilot Klundert), CRISP (Compressor Aanbesteding), WISE (Monsternamekast),
  Gemaal 3.0, Afvlakkingsregeling, Structuur & Borging
- 4 strategic themes: Architectuur, Productiewaardig, Lab, Governance
- Real team members, commitments, documents, and dependencies

MetroCanvas: Fix zoom-out scaling
- Wider transition range (0.6→0.25 instead of 0.5→0.1) for smoother feel
- Animated zoom reset on dimension commit (400ms ease) instead of jarring snap
- Guard against re-entry during transitions with isCommitting flag
- Expose dimension metadata (parentEntityType/Id/Name) for parent components

FloatingActions: Dimension-aware creation
- Shows "Nieuw commitment/document" when inside a project dimension
- Shows "Nieuw project/thema" at root level
- Receives depth and parentEntityType props from MetroMap

MetroMap: Wire dimension tracking
- Tracks canvasDepth/canvasDimension from MetroCanvas dimension-change events
- Updates breadcrumb for both page-level and canvas-level navigation
- Passes dimension context to FloatingActions and CommitmentForm

MapDataService: Add parent metadata to buildProjectChildren output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 08:50:51 +02:00
znetsixe
926872a082 Add document converter, seeder data structure, and project wiki
- ai-service/convert.py: converts Office/PDF files to markdown with frontmatter
- database/seeders/data/: folder structure for themas, projects, documents, etc.
- database/seeders/data/raw/: drop zone for Office/PDF files to convert
- wiki/: project architecture, concepts, and knowledge graph documentation
- Remove unused Laravel example tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 08:33:42 +02:00
znetsixe
302c790c13 Recursive zoom dimensions with smooth transitions
MetroCanvas rewrite:
- Dimension stack: every node can contain children forming a sub-metro-map
- Zoom-triggered transitions: scroll-zoom near a node gradually cross-fades
  parent dimension out and child dimension in (threshold 2.5x, range 1.5x)
- Zoom out past 0.5x transitions back to parent dimension
- Right-click context menu: "New node here" on canvas, "Edit/Add child/Delete" on stations
- Depth indicator HUD with back button
- Transition progress bar during cross-fade
- Nodes with children get dashed ring + glow indicator

Backend:
- MapDataService now includes children data inline per project node
- Each project's children contain lifecycle phases, commitments, documents as sub-map
- New API endpoint: GET /api/map/node/{type}/{id}/children for lazy loading
- Consistent data structure: every node has children field (null = leaf)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:21:14 +02:00
znetsixe
f0aca26642 Sprint 2: Live data, CRUD modals, commitments, document upload
Frontend:
- Connect MetroMap to live Inertia props (replace hardcoded demo data)
- Drill-down navigation via router.visit for project-level maps
- Reactive breadcrumb based on map level
- Empty state when no projects exist
- Reusable Modal component with retro styling
- ProjectForm and CommitmentForm with Inertia useForm
- FormInput reusable component (text, date, textarea, select)
- FloatingActions FAB button for creating projects/themes

Backend:
- CommitmentService + CommitmentController (CRUD, mark complete, overdue)
- DocumentService + DocumentController (upload, download, delete)
- MapController now passes users and speerpunten to frontend
- 7 new routes (4 commitment, 3 document)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:02:38 +02:00
znetsixe
15848b5e96 Add logout button, fix metro label positioning
- Add top bar with breadcrumb (left) and user name + logout button (right)
- Move station labels below dots (centered) to prevent line overlap
- Move line labels further above stations
- Increase vertical spacing between metro lines (160px) for label clearance
- Align station x-coordinates for cleaner map layout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:30:14 +02:00
znetsixe
0b71dbca81 Performance: OPcache, gzip, font subsetting, lazy-loaded pages
- Enable PHP OPcache in Docker (256MB, dev-friendly settings)
- Enable gzip compression in nginx + immutable caching for /build/ assets
- Reduce fonts to latin-only subsets (from 28 files to ~6)
- Lazy-load Vue pages via dynamic imports (D3 no longer loaded on login)
- MetroMap chunk split out separately (62KB only when needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:27:43 +02:00
znetsixe
9dcbeeccc7 Fix Dutch model table names and seeder status values
- Add explicit $table property to all Eloquent models with Dutch names
- Fix pivot table names in belongsToMany relationships
- Fix seeder: use valid enum values for afhankelijkheden status

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:38:51 +02:00
znetsixe
d03fe15542 Sprint 1: Auth, metro map canvas, services, and retro UI
Authentication:
- Laravel Fortify + Sanctum with Inertia views
- RBAC middleware (admin, project_owner, team_member, viewer)
- Retro terminal-styled login/register/forgot-password pages

Metro Map (core UI):
- D3.js zoomable SVG canvas with metro line rendering
- Station nodes with glow-on-hover, status coloring, tooltips
- Breadcrumb navigation for multi-level drill-down
- Node preview panel with zoom-in action
- C64-style CLI bar with blinking cursor at bottom

Backend services:
- ProjectService (CRUD, phase transitions, park/stop, audit logging)
- ThemaService (CRUD with audit)
- MapDataService (strategy map L1, project map L2)
- Thin controllers: MapController, ProjectController, ThemaController
- 32 routes total (auth + app + API)

Style foundation:
- Retro-futurism theme: VT323, Press Start 2P, IBM Plex Mono fonts
- Dark palette with cyan/orange/green/purple neon accents
- Comprehensive seed data (4 themes, 12 projects, commitments, deps)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:52:35 +02:00
znetsixe
7d14ca7b3b Add style guide: metro map UI with retro-futurism aesthetic
Design interview completed. Core decisions:
- Zoomable metro map as primary navigation (strategy > project > detail)
- C64-style CLI bar for AI assistant at bottom
- Independent R&D color palette (dark theme, electric blues, neon accents)
- Full retro-futurism: monospace fonts, pixel accents, glow effects
- Bilingual NL/EN, informal tone
- Custom components (no off-the-shelf UI library)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:37:55 +02:00
znetsixe
b71b274361 Scaffold full project: Vue 3/Inertia frontend, Docker infra, domain model
- Frontend: Vue 3 + Inertia.js + Pinia + Tailwind CSS with layout and dashboard page
- Infrastructure: Docker Compose with nginx, PHP-FPM, PostgreSQL+pgvector, Redis, Python AI service
- Database: 22 migrations covering all domain entities (projects, phases, commitments, decisions, documents, handover, audit)
- Models: 23 Eloquent models with relationships, casts, and 14 string-backed enums
- AI service: FastAPI scaffold with health, chat, summarize, and search endpoints

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:49:20 +02:00
znetsixe
46a1279cd6 Initial Laravel scaffold for innovatieplatform
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:34:23 +02:00