Voeg Module 1 Projecten toe met project plan, Rikx calculatie en Rikx rondes
- Projectenpagina met pipeline (standaard) en tabelweergave, filters op status, Rikx Ronde en zoeken - Projectpagina in stappen: Project plan (velden uit de Rikx-aanvraag) en Rikx calculatie achter een schuif, live berekend volgens de rekenmethode - Rikx rondes beheren (label, Rikx waarde, Rikx prijs) en koppelen aan projecten - Oranje Rikx-menubalk met menu per module, gedeeld door alle pagina's - Oude offerte-tabellen opgeruimd: leeg wordt verwijderd, met data hernoemd naar legacy_* - CLAUDE.md bijgewerkt naar de huidige stand Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
# rikx-platform
|
||||
# rikx-beheer
|
||||
|
||||
Klantbeheer portaal voor projectbeheer en offertes. Inclusief workflow-stappen (statustransities, email-triggers) en calculaties per offerteregel.
|
||||
Beheerportaal voor de Rikx-methodiek. Beheert de sociaal ondernemers (accounts in de ZRM-platformdatabase) en de projecten van Module 1 (Projects flow).
|
||||
|
||||
## Pagina's
|
||||
- `/tenants` — sociaal ondernemers aanmaken, bewerken, verwijderen, auto-inlog (leest/schrijft de platformdatabase via `lib/platform-db.ts`)
|
||||
- `/projecten` — projecten als pipeline (standaard, kolom per status) of tabel (`?weergave=tabel`), met filter op status, Rikx Ronde en zoeken; `/projecten/nieuw` — project toevoegen (naam + status)
|
||||
- `/rondes` — Rikx rondes beheren (label, Rikx waarde, Rikx prijs); een project hoort optioneel bij één ronde (`projects.ronde_id`)
|
||||
- `/projecten/[id]` — projectpagina in stappen: 1 Project plan (velden en keuzelijsten gedefinieerd in `lib/projectPlan.ts`), 2 Rikx calculatie (alleen zichtbaar als de schuif aan staat, `rikx_calculatie_aan`). Uitkomsten worden live berekend met `lib/rikxCalculatie.ts`
|
||||
- Gedeelde kop met navigatie: `app/AppHeader.tsx` (oranje Rikx-balk, menu per module; items zonder pagina tonen "binnenkort")
|
||||
- Huisstijlkleuren als Tailwind-tokens in `app/globals.css`: `rikx-orange`, `rikx-purple` (actief menu-item), `rikx-maroon` (primaire knop). Statuskleuren in `lib/projectStatus.ts`
|
||||
- Conventie: server actions in `actions.ts` per map, geen API-routes (behalve `app/api/auto-login`)
|
||||
|
||||
## Stack
|
||||
- Next.js 16 + TypeScript + Tailwind CSS
|
||||
@@ -15,6 +24,7 @@ cp .env.example .env.local
|
||||
# Vul SESSION_SECRET in (.env.local) — minimaal 32 tekens willekeurig
|
||||
mkdir -p data
|
||||
npm run dev # http://localhost:3000
|
||||
# Lokaal de platformdatabase gebruiken: RIKX_PLATFORM_DB_PATH=./data/platform.db
|
||||
```
|
||||
|
||||
## Admin aanmaken
|
||||
@@ -26,20 +36,24 @@ npm run create-admin maarten@rikx.nl wachtwoord "Maarten"
|
||||
- Locatie lokaal: `./data/app.db`
|
||||
- Locatie productie: `/data/app.db` (absoluut pad — Next.js standalone doet process.chdir bij start)
|
||||
- Schema: `lib/db.ts` — migraties draaien automatisch bij eerste verbinding
|
||||
- Tabellen: `users`, `clients`, `projects`, `quotes`, `quote_items`
|
||||
- Tabellen: `users`, `projects` (`name`, `status`; statussen in `lib/projectStatus.ts`, standaard `aanvraag`; plus de velden uit de rekenmethode als kolommen; overige project plan-velden als JSON in `project_plan`), `project_expert_scores` (3 experts × 3 criteria, voorlopig handmatig), `rikx_rondes` (Rikx waarde en prijs per ronde; de calculatie haalt ze uit de ronde van het project, prijs standaard waarde / 10)
|
||||
- Rekenmethode: `_doc/Rikx rekenmethode uitleg.xlsx`, tabblad Uitleg. Afwijkingen van de sheet: N-score = ((werk×5)+skills)/6 (sheet mist haakjes), Bonus/Malus `-` = 0,9 en `--` = 0,8 (sheet heeft typefouten)
|
||||
- De oude offerte-tabellen (`clients`, `projects` met `client_id`, `quotes`, `quote_items`) worden bij de migratie verwijderd als ze leeg zijn; met gegevens worden ze hernoemd naar `legacy_*`
|
||||
- Tweede database (alleen-platform): `RIKX_PLATFORM_DB_PATH` (standaard `/rikx-platform-data/app.db`) met `accounts` en `users` van het ZRM-platform
|
||||
|
||||
## Infrastructuur (mx-platform.com)
|
||||
- **Platform:** Coolify v4 op mx-platform.com (37.97.203.131)
|
||||
- **Git repo:** https://git.mx-platform.com/admin/rikx-platform
|
||||
- **Git repo:** https://git.mx-platform.com/admin/rikx-beheer
|
||||
- **Dockerfile:** `/Dockerfile` (Node 22 Alpine, Next.js standalone)
|
||||
- **Port:** 3000
|
||||
- **URL:** https://rikx.mx-platform.com
|
||||
- **URL:** https://beheer.rikxplatform.nl
|
||||
|
||||
## Environment variables
|
||||
| Variabele | Standaard | Uitleg |
|
||||
|-----------|-----------|--------|
|
||||
| `SESSION_SECRET` | — | HMAC-secret voor sessie-cookies — per omgeving uniek genereren |
|
||||
| `DB_PATH` | `./data/app.db` | **In productie: `/data/app.db`** (absoluut pad) |
|
||||
| `RIKX_PLATFORM_DB_PATH` | `/rikx-platform-data/app.db` | Database van het ZRM-platform (sociaal ondernemers) |
|
||||
| `NODE_ENV` | `development` | In productie: `production` |
|
||||
| `SMTP_HOST` | — | SMTP server voor email-notificaties |
|
||||
| `SMTP_PORT` | `587` | SMTP poort |
|
||||
|
||||
Reference in New Issue
Block a user