docs: update CLAUDE.md, ROADMAP.md, SESSION-LOG.md with all session findings

This commit is contained in:
AI Assistant
2026-02-27 13:26:45 +02:00
parent f6f7cf5982
commit b2618c041d
3 changed files with 165 additions and 121 deletions
+39 -30
View File
@@ -29,18 +29,22 @@ It runs on an on-premise Ubuntu server at `10.10.10.166`, containerized with Doc
|---|---|
| Framework | Next.js 16.x, App Router, TypeScript (strict) |
| Styling | Tailwind CSS v4, shadcn/ui |
| State | localStorage (via StorageService abstraction) |
| Deploy | Docker multi-stage, Portainer, Nginx Proxy Manager |
| Repo | Gitea at `http://10.10.10.166:3002/gitadmin/ArchiTools` |
| Database | PostgreSQL (10.10.10.166:5432) via Prisma v6 ORM |
| Storage | `DatabaseStorageAdapter` (PostgreSQL) — localStorage fallback available |
| File Storage | MinIO (10.10.10.166:9002 API / 9003 UI) — client configured, adapter pending |
| Auth | NextAuth v4 + Authentik OIDC (auth.beletage.ro) |
| Deploy | Docker multi-stage, Portainer CE, Nginx Proxy Manager |
| Repo | Gitea at `https://git.beletage.ro/gitadmin/ArchiTools` |
| Language | Code in **English**, UI in **Romanian** |
### Architecture Principles
- **Module platform, not monolith** — each module isolated with own types/services/hooks/components
- **Feature flags** gate module loading (disabled = zero bundle cost)
- **Storage abstraction**: `StorageService` interface with adapters (localStorage default, designed for future DB/MinIO)
- **Storage abstraction**: `StorageService` interface with adapters (database default via Prisma, localStorage fallback)
- **Cross-module tagging system** as shared service
- **Auth stub** designed for future Authentik SSO integration
- **Auth via Authentik SSO** — NextAuth v4 + OIDC, group→role/company mapping
- **All entities** include `visibility` / `createdBy` fields from day one
- **Company logos** — theme-aware (light/dark variants), dual-rendered for SSR safety
---
@@ -87,23 +91,24 @@ legacy/ # Original HTML tools for reference
---
## Implemented Modules (13/13 — zero placeholders)
## Implemented Modules (14/14 — zero placeholders)
| # | Module | Route | Key Features |
|---|---|---|---|
| 1 | **Dashboard** | `/` | Stats cards, module grid, external tools by category |
| 2 | **Email Signature** | `/email-signature` | Multi-company branding, live preview, zoom/copy/download |
| 1 | **Dashboard** | `/` | KPI cards (6), activity feed (last 20), module grid, external tools |
| 2 | **Email Signature** | `/email-signature` | Multi-company branding, address toggle, live preview, zoom/copy/download |
| 3 | **Word XML Generator** | `/word-xml` | Category-based XML gen, simple/advanced mode, ZIP export |
| 4 | **Registratura** | `/registratura` | CRUD registry, stats, filters, **legal deadline tracking** |
| 5 | **Tag Manager** | `/tag-manager` | CRUD tags, category/scope/color, grouped display |
| 6 | **IT Inventory** | `/it-inventory` | Equipment tracking, type/status/company filters |
| 7 | **Address Book** | `/address-book` | CRUD contacts, card grid, search/type filter |
| 8 | **Password Vault** | `/password-vault` | CRUD credentials, show/hide/copy, category filter |
| 9 | **Mini Utilities** | `/mini-utilities` | Text case, char counter, percentage calc, area converter |
| 10 | **Prompt Generator** | `/prompt-generator` | Template-driven prompt builder, 4 builtin templates |
| 11 | **Digital Signatures** | `/digital-signatures` | CRUD signature/stamp/initials assets |
| 12 | **Word Templates** | `/word-templates` | Template library, 8 categories, version tracking |
| 5 | **Tag Manager** | `/tag-manager` | CRUD tags, category/scope/color, US/SDT seeds, mandatory categories |
| 6 | **IT Inventory** | `/it-inventory` | Equipment tracking, Address Book contact link, type/status/company filters |
| 7 | **Address Book** | `/address-book` | CRUD contacts, card grid, vCard export, Registratura reverse lookup, **dynamic types** |
| 8 | **Password Vault** | `/password-vault` | CRUD credentials, email field, clickable URLs, strength meter, company scope |
| 9 | **Mini Utilities** | `/mini-utilities` | Text case, char counter, percentage, area converter, U→R, artifact cleaner, MDLPA, PDF reducer, OCR |
| 10 | **Prompt Generator** | `/prompt-generator` | Template-driven prompt builder, 14 builtin templates |
| 11 | **Digital Signatures** | `/digital-signatures` | CRUD assets, drag-and-drop file upload, tag chips |
| 12 | **Word Templates** | `/word-templates` | Template library, 8 categories, version tracking, .docx placeholder auto-detection |
| 13 | **AI Chat** | `/ai-chat` | Session-based chat UI, demo mode (no API keys yet) |
| 14 | **Hot Desk** | `/hot-desk` | 4 desks, week-ahead calendar, room layout (window+door), reserve/cancel |
### Registratura — Legal Deadline Tracking (Termene Legale)
@@ -130,12 +135,14 @@ Key files:
| Service | Port | Purpose |
|---|---|---|
| **ArchiTools** | 3000 | This app |
| **Gitea** | 3002 | Git hosting (`gitadmin/ArchiTools`) |
| **Portainer** | 9000 | Docker management, auto-deploy on push |
| **ArchiTools** | 3000 | This app (tools.beletage.ro) |
| **Gitea** | 3002 | Git hosting (git.beletage.ro) |
| **PostgreSQL** | 5432 | App database (Prisma ORM) |
| **Portainer** | 9000 | Docker management |
| **Nginx Proxy Manager** | 81 (admin) | Reverse proxy + SSL termination |
| **Uptime Kuma** | 3001 | Service monitoring |
| **MinIO** | 9003 | Object storage (future) |
| **MinIO** | 9002 (API) / 9003 (UI) | Object storage |
| **Authentik** | 9100 | SSO (auth.beletage.ro) — **active** |
| **N8N** | 5678 | Workflow automation (future) |
| **Stirling PDF** | 8087 | PDF tools |
| **IT-Tools** | 8085 | Developer utilities |
@@ -143,23 +150,25 @@ Key files:
| **Netdata** | 19999 | System monitoring |
| **Dozzle** | 9999 | Docker log viewer |
| **CrowdSec** | 8088 | Security |
| **Authentik** | 9100 | SSO (future) |
### Deployment Pipeline
```
git push origin main
→ Gitea webhook fires
→ Portainer auto-redeploys stack
Docker multi-stage build (~1-2 min)
Container starts on :3000
Nginx Proxy Manager routes traffic
→ Portainer CE detects new commit
Manual "Pull and redeploy" in Portainer (CE doesn't auto-rebuild)
Docker multi-stage build (~1-2 min)
Container starts on :3000
→ Nginx Proxy Manager routes to tools.beletage.ro
```
### Docker
- `Dockerfile`: 3-stage build (deps → builder → runner), `node:20-alpine`, non-root user
- `docker-compose.yml`: single service, port 3000, watchtower label
- `Dockerfile` includes `npx prisma generate` before build step
- `docker-compose.yml`: single service, port 3000, **all env vars hardcoded** (Portainer CE can't inject env vars)
- `output: 'standalone'` in `next.config.ts` is **required**
- `@prisma/client` must be in `dependencies` (not devDependencies) for runtime
---
@@ -211,13 +220,13 @@ src/modules/<name>/
---
## Future Integrations (not yet implemented)
## Current Integrations
| Feature | Status | Notes |
|---|---|---|
| **Authentik SSO** | Auth stub exists | `src/core/auth/` has types + provider shell |
| **MinIO storage** | Adapter pattern ready | Switch `NEXT_PUBLIC_STORAGE_ADAPTER` to `minio` |
| **API backend** | Adapter pattern ready | Switch to `api` adapter when backend exists |
| **Authentik SSO** | ✅ Active | NextAuth v4 + OIDC, group→role/company mapping |
| **PostgreSQL** | ✅ Active | Prisma ORM, `KeyValueStore` model, `/api/storage` route |
| **MinIO** | Client configured | 10.10.10.166:9002, bucket `tools`, adapter pending |
| **AI Chat API** | UI complete, demo mode | No API keys yet; supports Claude/GPT/Ollama |
| **N8N automations** | Webhook URL configured | For notifications, backups, workflows |