# Innovatieplatform

Innovation governance platform for the R&D Lab at Waterschap Brabantse Delta. Supports the full lifecycle of innovation trajectories — from signal to handover — with AI-powered search, summarization, and project assistance.

## Tech Stack

- **Backend:** Laravel 13 (PHP 8.3+) — service-oriented, event-driven, API-first
- **Frontend:** Vue 3 + Inertia.js + Vite 8 + Tailwind CSS 4.2
- **Visualization:** D3.js 7.9 (zoomable metro map)
- **Database:** PostgreSQL 16 + pgvector
- **AI Service:** Python FastAPI + LangGraph + RAG
- **Infrastructure:** Docker Compose (nginx, php-fpm, worker, scheduler, ai-service, postgresql, redis)

## Quick Start

```bash
# Clone and setup
git clone https://gitea.wbd-rd.nl/vps1_gitea_admin/innovatieplatform.git
cd innovatieplatform
composer setup

# Development (starts Laravel server, queue worker, logs, and Vite)
composer dev
```

### Docker

```bash
docker compose up -d
```

Services: nginx (:80), postgresql (:5432), redis (:6379), ai-service (:8000)

## Project Structure

```
app/
  Models/          21 Eloquent models (Project, Fase, Commitment, Document, ...)
  Enums/           14 status/type enums (ProjectStatus, FaseType, ...)
  Services/        Business logic (ProjectService, MapDataService, ThemaService)
  Http/Controllers/  API + Inertia controllers
resources/js/
  Pages/           Inertia page components (MetroMap, Auth, Dashboard)
  Components/      Vue components (MetroCanvas, CliBar, NodePreview, Breadcrumb)
  Layouts/         App layout wrapper
ai-service/        Python FastAPI AI service
wiki/              Project knowledge base (wiki-template schema)
docker/            Docker configs (php, nginx, scheduler)
.claude/agents/    10 Claude Code agent definitions
```

## Documentation

- **CLAUDE.md** — Architecture principles, build agents, MVP scope
- **STYLE_GUIDE.md** — Metro map UI + retro-futurism design system
- **wiki/** — Knowledge base with structured data, architecture docs, and query tools

## Wiki

```bash
python wiki/tools/query.py health          # Project health overview
python wiki/tools/query.py entity "project" # Everything about an entity
bash wiki/tools/search.sh "keyword"         # Full-text search
bash wiki/tools/lint.sh                     # Check wiki health
```

## Tests

```bash
composer test
```
