40 KiB
ArchiTools — Complete Roadmap
Step-by-step implementation plan. Every task from
app_modules_overview.xlsxis tracked here. Modules are implemented in dependency order, tested by the AI, then submitted for user approval.
Workflow
- AI picks the next task from this file (top to bottom)
- AI implements it, runs
npx next build(zero errors required) - AI commits and pushes to
main(Portainer auto-deploys) - AI notifies you: "Module X / Task Y is ready for review"
- You test on
http://10.10.10.166:3000and approve or request changes - AI moves to the next task
AI Model Recommendations
| Tag | Claude | OpenAI | Best For | |
|---|---|---|---|---|
[HEAVY] |
Opus 4.6 | GPT-5.3-Codex | Gemini 3 Pro | Complex multi-file features, business logic, architecture, new modules |
[STANDARD] |
Sonnet 4.6 | GPT-5.2 | Gemini 3 Flash | Refactoring, moderate features, UI work, tests, documentation |
[LIGHT] |
Haiku 4.5 | GPT-4o-mini | Gemini 2.5 Flash | Quick fixes, small edits, config changes, build debugging |
Default recommendation: Sonnet 4.6 — it matches Opus-class performance at Sonnet pricing ($3/$15 per M tokens). Use Opus only for tasks marked [HEAVY]. Use Haiku for tasks marked [LIGHT].
Current Module Status vs. XLSX Spec
| # | Module | Core Done | Gaps Remaining | New Features Needed |
|---|---|---|---|---|
| 1 | Registratura | YES | Linked-entry selector capped at 20 | Workflow automation, email integration, OCR |
| 2 | Email Signature | YES | US/SDT logo files may be missing from /public/logos/; US/SDT no address toggle |
AD sync, branding packs |
| 3 | Word XML | YES | POT/CUT toggle exists (spec says remove) | Schema validator, visual mapper |
| 4 | Digital Signatures | YES | No file upload (URL only); tags not editable in form | Permission layers, document insertion |
| 5 | Password Vault | YES | Unencrypted storage; no strength meter; no company scope | Hardware key, rotation reminders |
| 6 | IT Inventory | YES | assignedTo not linked to contacts; no maintenance log | Network scan import |
| 7 | Address Book | YES | No vCard export; no reverse Registratura lookup | Email sync, deduplication |
| 8 | Prompt Generator | YES | Missing architecture viz templates (sketch→render, photorealism) | Prompt scoring |
| 9 | Word Templates | YES | No clause library; placeholders manual only; no Word generation | Diff compare, document generator |
| 10 | Tag Manager | YES | No US/SDT project seeds; no mandatory-category enforcement | Server tag sync, smart suggestions |
| 11 | Mini Utilities | PARTIAL | Missing: U→R value, AI artifact cleaner, MDLPA validator, PDF reducer, OCR | More converters |
| 12 | Dashboard | BASIC | No activity feed, no notifications, no KPI panels | Custom dashboards per role |
| 13 | AI Chat | DEMO ONLY | No API integration, no key config, no streaming | Conversation templates |
| 14 | Hot Desk | NOT STARTED | Entire module missing | — |
PHASE 1 — Module Gap Fixes (close all xlsx gaps)
Fix existing modules to match the xlsx spec. Ordered by impact and dependency.
1.01 ✅ [LIGHT] Verify Email Signature Logo Files (2026-02-18)
What: Check if /public/logos/logo-us-dark.svg, logo-us-light.svg, logo-sdt-dark.svg, logo-sdt-light.svg exist. If not, create placeholder SVGs or obtain real logos from the user.
Files: public/logos/
Why first: Broken images are the most visible bug.
User action needed: Provide actual logo files for Urban Switch and Studii de Teren if placeholders won't do.
Status: All logo files exist with valid SVG content. No action needed.
1.02 ✅ [STANDARD] Email Signature — Address Toggle for US/SDT (2026-02-18)
What: Urban Switch and Studii de Teren are hardcoded to Str. Unirii address. Add address toggle (like Beletage has) if these companies use different addresses.
Files: src/modules/email-signature/components/signature-configurator.tsx, src/modules/email-signature/services/company-branding.ts
User action needed: Confirm addresses for Urban Switch and Studii de Teren.
Status: Address toggle UI added for US and SDT companies. Currently configured with Str. Unirii address for both. User can update addresses in company-branding.ts when confirmed.
1.03 ✅ [STANDARD] Prompt Generator — Architecture Visualization Templates (2026-02-18)
What: Add 6+ new builtin templates per xlsx spec:
- Architectural rendering prompt (basic massing to detailed)
- Sketch → professional render prompt
- Visualization refinement prompt (photorealism fine-tuning)
- Technical compliance checking prompt
- Legal/formal review prompt (extend existing)
- Contract text cleanup prompt
- GIS / survey interpretation prompt
- BIM coordination prompt
- Report rewriting prompt
- Structured technical Q&A prompt
Files to modify: src/modules/prompt-generator/services/builtin-templates.ts
Files to create: Additional template definitions (can be in same file or split)
Status: 10 new templates added (total 14): arch-render-massing, sketch-to-render, photorealism-refinement, tech-compliance, legal-formal-review, contract-cleanup, gis-survey-interpretation, bim-coordination, report-rewrite, structured-qa.
1.04 ✅ [STANDARD] Tag Manager — US/SDT Project Seeds + Mandatory Categories (2026-02-18)
What:
- Add Urban Switch and Studii de Teren project numbering to seed data (US-001, SDT-001 format)
- Enforce mandatory 1st category (project) and 2nd category (phase) when creating tags — show validation error if missing
- Import the full tag structure from
legacy/manicprojects/current manic time Tags.txtin proper 1st→5th category hierarchy
Files to modify:
src/modules/tag-manager/services/seed-data.ts— Add US/SDT projectssrc/modules/tag-manager/components/tag-create-form.tsx— Add mandatory validation
Status: US (10 projects, US-001→US-010, color #345476) and SDT (10 projects, SDT-001→SDT-010, color #0182A1) seed data added. Mandatory validation enforces project code + company scope for project tags. Validation errors shown inline. Legacy ManicTime import already covered all Beletage projects + phases + activities + doc types.
✅ 1.05 [STANDARD] Mini Utilities — Add Missing Tools
What: Add the 5 missing tools from xlsx:
- U-value → R-value converter (R = 1/U, with material thickness input)
- AI artifact cleaner (strip markdown formatting, fix encoding, remove prompt artifacts from pasted text)
- MDLPA date locale validator (validate Romanian administrative dates against legal calendar)
- PDF reducer (compress PDF via Stirling PDF API at http://10.10.10.166:8087, or client-side canvas compression for images)
- Quick OCR (paste image → extract text; use Tesseract.js client-side or Stirling PDF OCR endpoint)
Files to modify: src/modules/mini-utilities/components/mini-utilities-module.tsx
Dependencies: tesseract.js (for OCR), possibly Stirling PDF API calls
Status: ✅ Done. All 5 tools implemented: U→R calculator (with Rsi/Rse/λ), AI artifact cleaner (markdown strip + encoding fix + typography normalise), MDLPA iframe embed, PDF reducer via Stirling PDF API with level selector, OCR via ocr.z.ai iframe. Build passes, pushed to main.
✅ 1.06 [STANDARD] Digital Signatures — File Upload + Tag Editing
What:
- Add drag-and-drop / file picker for uploading signature/stamp images (convert to base64 on upload, like Registratura attachments)
- Add tag input field to the asset form (tags field exists in type but form doesn't render it)
Files to modify:
src/modules/digital-signatures/components/— asset form component
Status: ✅ Done. Drag-and-drop/click file picker cu preview base64 în AssetForm și AddVersionForm. Tags chip input (Enter/virgulă pentru adăugare, Backspace/X pentru ștergere). Build ok, pushat.
✅ 1.07 [LIGHT] Password Vault — Company Scope + Strength Meter
What:
- Add
companyfield to credential type and form (scope passwords to a company) - Add password strength indicator (visual bar: weak/medium/strong based on length + character diversity)
- Rename
encryptedPassword→passwordin the type (it's not encrypted, the name is misleading)
Files to modify:
src/modules/password-vault/types.tssrc/modules/password-vault/components/— form and list components
Status: ✅ Done. Renamed encryptedPassword → password in type. Added company: CompanyId field. Form now has company selector (Beletage/Urban Switch/Studii/Grup). Password strength meter with 4 levels (slabă/medie/puternică/foarte puternică) based on length + character diversity (upper/lower/digit/symbol). Meter updates live. Build ok, pushat.
✅ 1.08 [LIGHT] IT Inventory — Link assignedTo to Address Book
What: Change assignedTo from free text to an autocomplete that links to Address Book contacts (same pattern as Registratura sender/recipient).
Files to modify:
src/modules/it-inventory/components/— equipment formsrc/modules/it-inventory/types.ts— AddassignedToContactId?: string
Status: ✅ Done. Added assignedToContactId?: string field to InventoryItem type. Form now shows autocomplete dropdown filtering Address Book contacts (searches by name or company). Up to 5 suggestions shown. Clicking a contact pre-fills both display name and contact ID. Placeholder "Caută după nume..." guides users. Build ok, pushed.
✅ 1.09 [STANDARD] Address Book — vCard Export + Registratura Reverse Lookup
What:
- Add "Export vCard" button per contact (generate
.vcffile download) - Add a section showing Registratura entries where this contact appears as sender or recipient
Files to modify:
src/modules/address-book/components/— contact card/detail view Files to create:src/modules/address-book/services/vcard-export.ts
Status: ✅ Done. Created vcard-export.ts generating vCard 3.0 (.vcf) with name, org, title, phones, emails, address, website, notes, contact persons. Added Download icon button on card hover. Added detail dialog (FileText icon) showing full contact info + scrollable table of all Registratura entries where this contact appears as sender or recipient (uses allEntries to bypass filters). Build ok, pushed.
✅ 1.10 [STANDARD] Word Templates — Placeholder Auto-Detection
What: When a template file URL points to a .docx, parse it client-side to extract {{placeholder}} patterns and auto-populate the placeholders[] field. Use JSZip (already installed) to read the docx XML.
Files to modify:
src/modules/word-templates/components/— template form Files to create:src/modules/word-templates/services/placeholder-parser.ts
Status: ✅ Done. placeholder-parser.ts uses JSZip to read all word/*.xml files from the .docx ZIP, searches for {{...}} patterns in both raw XML and stripped text (handles Word’s split-run encoding). Form now has: “Alege fișier .docx” button (local file picker, most reliable — no CORS) and a Wand icon on the URL field for URL-based detection (may fail on CORS). Parsing spinner shown during detection. Detected placeholders auto-populate the field. Build ok, pushed.
✅ 1.11 [STANDARD] Dashboard — Activity Feed + KPI Panels
What:
- Add an activity feed showing recent actions across modules (last 20 creates/updates/deletes from localStorage timestamps)
- Add KPI cards: entries this week, deadlines this week, overdue count, contacts added this month
- Wire the
DashboardWidgettype that already exists intypes.ts
Files to modify: src/modules/dashboard/components/ or src/app/(modules)/page.tsx
Status: ✅ Done. Created src/modules/dashboard/hooks/use-dashboard-data.ts — scans all architools:* localStorage keys directly, extracts entities with timestamps, builds activity feed (last 20, sorted by updatedAt) and KPI counters. Updated src/app/page.tsx: KPI grid (6 cards: registratura this week, open dosare, deadlines this week, overdue in red, new contacts this month, active IT equipment), activity feed with module icon + label + action + relative time (Romanian locale). Build ok, pushed.
✅ 1.12 [LIGHT] Registratura — Increase Linked-Entry Selector Limit
What: Added search/filter input (by number, subject, sender) to the linked-entry selector. Removed .slice(0, 20) cap. Also improved chip labels to show truncated subject.
Commit: cd4b0de
Status: Done ✅
✅ 1.13 [LIGHT] Word XML — Remove POT/CUT Auto-Calculation
What: Removed computeMetrics entirely from XmlGeneratorConfig, generateCategoryXml, generateAllCategories, downloadZipAll, useXmlConfig, XmlSettings, and WordXmlModule. Fields kept; auto-injection removed.
Commit: eaca24a
Status: Done ✅
PHASE 2 — New Module: Hot Desk Management ✅
Module 14 from xlsx. Entirely new.
2.01 ✅ [HEAVY] Hot Desk Module — Full Implementation (2026-02-26)
What: Build Module 14 from scratch per xlsx spec. Status: ✅ Done. Full implementation: 4 desks, week-ahead calendar, reserve/cancel, room layout with window (left) + door (right) landmarks, history. Registered in modules/navigation/flags.
PHASE 3 — Replanificare Detaliată (Ideation & Requirements)
Fază adăugată pentru rafinarea cerințelor, UX și logicii de business înainte de implementarea tehnică.
3.01 ✅ [UI/UX] Header & Navigare Globală (2026-02-27)
Cerințe noi:
- Logo-uri: Mărirea dimensiunii logo-urilor în header.
- Mini-joc Logo: Click pe logo-uri le animează (spin/bounce/ping), combo secret BTG→US→SDT declanșează confetti.
- Navigare: Click pe titlul aplicației redirecționează către Dashboard.
- Theme Toggle: Slider animat sun/moon cu gradient zi/noapte, stele, nori.
- Dark mode logos: Variante corecte light/dark pe baza temei, cu fallback montat.
Status: ✅ Done. Sidebar redesigned: logos in centered row (flex-1, theme-aware, dual-render light+dark), "ArchiTools" text below, animated theme toggle (Sun/Moon lucide icons, gradient background, stars/clouds).
3.02 ✅ [BUSINESS] Registratura — Integrare și UX (2026-02-27)
Cerințe noi:
- Tipuri de documente (Bidirecțional): Câmpul de tip document comunică cu Tag Manager. Dacă se introduce un tip nou, se salvează automat ca etichetă nouă sub o categorie fixă "Registratura" (pentru a acoperi și apeluri telefonice, video-uri, nu doar documente fizice).
- Expeditor/Destinatar (Bidirecțional): Autocomplete legat de Address Book. Dacă un contact nu există, se creează automat (minim Nume) și apare un popup rapid pentru a adăuga opțional Telefon/Email.
- Status Simplificat: Eliminarea statusului "Deschis". Înlocuire cu un simplu checkbox "Închis" (implicit totul e deschis).
- Termen Limită Intern: Clarificarea funcției (ex: termen pentru a răspunde la o intrare). Adăugare tooltip/info box explicativ pentru a maximiza eficiența echipei.
- Pregătire Integrare ERP (Responsabil): Adăugarea unui câmp "Responsabil" (Assignee) pentru a aloca sarcini interne, gândit arhitectural pentru a putea fi expus/sincronizat ușor printr-un API/Webhook viitor către un sistem ERP extern.
- Legături între intrări/ieșiri (Thread-uri & Branches): Posibilitatea de a lega o ieșire de o intrare specifică (ex: "Răspuns la adresa nr. X"), creând un "fir" (thread) vizual al conversației instituționale. Trebuie să suporte și "branching" (ex: o intrare generează mai multe ieșiri conexe către instituții diferite). UI-ul trebuie să rămână extrem de simplu și intuitiv (ex: vizualizare tip arbore simplificat sau listă indentată în detaliile documentului).
Status: ✅ Done. All 6 sub-features implemented:
- Dynamic doc types — Select + inline "Tip nou" input. New types auto-created as Tag Manager tags (category: document-type). Added "Apel telefonic" and "Videoconferință" as defaults.
- Bidirectional Address Book — Autocomplete shows "Creează contact" button when no match. QuickContactDialog popup creates contact in Address Book with minimal data (Name required, Phone/Email optional).
- Simplified status — Replaced Status dropdown with Switch toggle "Închis/Deschis". Default is open.
- Internal deadline tooltip — Added Info tooltip explaining "Termen limită intern" vs legal deadlines. Also added tooltips on "Închis" and "Responsabil" fields.
- Responsabil (Assignee) — New field with contact autocomplete + quick-create. ERP-ready with separate assigneeContactId. Shown in registry table as "Resp." column.
- Threads & Branching —
threadParentIdfield links entries as reply-to. Thread search with direction badges. ThreadView component shows parent, current entry, siblings (branches), and child replies as indented tree. Thread icon in table. Click to navigate between threaded entries.
3.03 ✅ [BUSINESS] Registratura — Termene Legale (Flux Nou) (99fbddd)
Implementat:
- ✅ Declanșare Termen: Câmpuri
recipientRegNumber+recipientRegDatepe RegistryEntry — termenul legal curge de la data înregistrării la destinatar - ✅ Sistem de Alerte: Alert banners (amber/red) în Dashboard + tab Termene legale pentru ieșiri fără date destinatar și documente expirând
- ✅ Categorii Termene: CU deja pe prima categorie; adăugat
prelungire-cu(15 zile calendaristice, acord tacit aplicabil) - ✅ Acord Tacit: Deja implementat în Phase 2 — funcționează automat
- ✅ Istoric Modificări (Audit Log):
DeadlineAuditEntryinterface, audit log pe fiecareTrackedDeadline(created/resolved), expandabil pe deadline card - ✅ Valabilitate Documente:
expiryDate+expiryAlertDayscu countdown live color-coded (red=expirat, amber=aproape) - ✅ Pregătire Web Scraping: Câmpuri
externalStatusUrl+externalTrackingIdpe RegistryEntry - ✅ Dashboard Stats: 6 carduri (adăugat "Lipsă nr. dest." + "Expiră curând")
Neimplementat (necesită integrare complexă):
- ⏳ Generare Raport/Declarație: Necesită integrare cross-module Registratura ↔ Word Templates
3.04 ✅ [ARCHITECTURE] Autentificare & Identitate (2026-02-27)
Cerințe noi:
- Devansare Prioritate Authentik: Integrarea cu Authentik (legat la Domain Controller/Active Directory).
- Sincronizare Useri: Sistemul poate citi lista de utilizatori din Authentik/AD.
Status: ✅ Done. NextAuth v4 + Authentik OIDC fully configured. Group→role mapping (admin/manager/user) and group→company mapping. Header user menu with login/logout. Env vars hardcoded in docker-compose.yml (Portainer CE limitation). See also Phase 6 below.
3.05 [BUSINESS] Email Signature — Automatizare și Branding ✅ DONE (b433857)
Implementat:
- ✅ Precompletare din cont (AD): Buton "Din cont" completează automat numele și compania din sesiunea Authentik
- ✅ Slider Dimensiune Logo: Control 50%–200% în secțiunea Stil & Aranjare, aplicat în HTML-ul generat
- ✅ Bannere Promoționale: Secțiune configurabilă cu URL imagine, URL link, text alternativ, dimensiuni; previzualizare live; salvabil în preseturile existente
- ✅ Elemente Grafice US/SDT: Iconițe decorative distincte — liniuță (Urban Switch) și punct (Studii de Teren) — înlocuiesc slash-urile generice Beletage
3.06 [BUSINESS] Template Library (Fostul Word Templates) ✅ DONE (5992fc8)
Implementat:
- ✅ Redenumire: "Șabloane Word" → "Bibliotecă Șabloane" (Template Library) în config, navigație, i18n
- ✅ Multi-format: Suport Word (.docx), Excel (.xlsx), PDF, DWG, Archicad (.tpl/.pln) cu auto-detecție tip din extensie
- ✅ Versionare Automată: Buton "Revizie Nouă" — arhivează versiunea curentă în istoric, incrementează automat semver (1.0 → 1.1)
- ✅ Istoric Versiuni: Dialog cu toate versiunile anterioare, fiecare cu link descărcare și note revizie
- ✅ Clarificare UX: Toggle "Link extern" / "Încarcă fișier", placeholder-e detectate automat și silențios doar pentru .docx, secțiune ascunsă pentru alte formate
- ✅ Backward compatible: Entități vechi fără fileType/versionHistory primesc defaults automat
3.07 ✅ [BUSINESS] Digital Signatures — Simplificare și Suport TIFF (2026-02-28)
Cerințe noi:
- Simplificare Formular: Eliminarea câmpurilor inutile pentru fluxul actual: "inițiale", "data expirare", "statut legal" și "note utilizare".
- Suport Nativ TIFF: Permiterea încărcării fișierelor
.tiff(formatul principal folosit pentru semnături/ștampile). Notă tehnică: Deoarece browserele nu randează nativ TIFF, se va implementa o conversie client-side (ex: viatiff.jssau un canvas) doar pentru preview-ul vizual, dar sistemul va stoca și va folosi fișierul TIFF original. - Organizare pe Subcategorii: Adăugarea posibilității de a grupa semnăturile/ștampilele pe subcategorii clare (ex: "Colaboratori firma X", "Experți tehnici", "Verificatori de proiect").
- Opțiuni de Descărcare Avansate:
- Descărcare fișier original (
.tiff/.png). - Generare și descărcare document Word (
.docx) gol care conține imaginea inserată automat. - Generare și descărcare document PDF gol care conține imaginea inserată automat.
- Descărcare fișier original (
Status: ✅ Done. Removed initials type, expirationDate, legalStatus, usageNotes fields. Added subcategory field with creatable input (6 defaults: Colaboratori, Experți tehnici, Verificatori de proiect, Proiectanți, Diriginți de șantier, Responsabili tehnici). TIFF upload via utif2 client-side decode → PNG preview, original TIFF stored in originalFileData. Download dropdown on each card: Original, Word (.docx via docx lib), PDF (.pdf via jsPDF). Assets grouped by subcategory in list view with subcategory filter.
3.08 ✅ [BUSINESS] IT Inventory — Simplificare și Status Nou (2026-02-28)
Cerințe noi:
- Eliminare Câmpuri Inutile: Se vor șterge câmpurile "Atribuit către" (assignedTo), "Data achiziție", "Cost achiziție" și "Expirare garanție".
- Tipuri Dinamice (Bidirecțional): Câmpul "Tip echipament" (ex: Laptop, Monitor) trebuie să permită adăugarea interactivă de noi tipuri direct din formular (similar cu logica de la Registratură/Tag Manager).
- Status Nou "Închiriat": Adăugarea statusului "Închiriat" în lista de statusuri.
- Atenționare Vizuală (Animație): Când un echipament are statusul "Închiriat", badge-ul/rândul respectiv trebuie să aibă o animație subtilă (ex: un puls de culoare, un glow) pentru a "sări în ochi" în tabelul principal.
- Vizualizare Rack (Server Rack 42U):
- Adăugarea unei vizualizări grafice (schematice) a unui rack de servere standard de 42U.
- În formularul de echipament, dacă tipul este compatibil (ex: Server, Switch, UPS, Patch Panel), se vor adăuga două câmpuri noi: "Poziție Rack (U)" (ex: 12) și "Dimensiune (U)" (ex: 1U, 2U).
- Echipamentele care au aceste date completate vor fi randate automat în vizualizarea grafică a rack-ului.
- La hover pe un echipament din rack, va apărea un tooltip cu detaliile de bază (Nume, IP, Status).
Status: ✅ Done. Rewrote types.ts: dynamic InventoryItemType (string-based) with DEFAULT_EQUIPMENT_TYPES (added server/switch/ups/patch-panel), RACK_MOUNTABLE_TYPES set, new "rented" status with STATUS_LABELS export. Removed deprecated fields (assignedTo, purchaseDate, purchaseCost, warrantyExpiry). Added rackPosition/rackSize fields. New server-rack.tsx — 42U rack visualization with color-coded status slots and tooltips. Rewrote module component: tabbed UI (Inventar + Rack 42U), 5 stat cards with purple pulse animation for rented count, inline custom type creation, conditional rack position fields for mountable types.
3.09 ✅ [BUSINESS] Address Book — Tipuri Dinamice (2026-02-27)
Cerințe noi:
- Tip Contact Dinamic: Câmpul "Tip" devine "creatable select" (dropdown + text input) cu salvare automată.
Status: ✅ Done. CreatableTypeSelect component (input + "+" button), DEFAULT_TYPE_LABELS + dynamic types from existing contacts, ContactType allows | string for custom types.
3.10 ✅ [UI/UX] Hot Desk — Orientare Vizuală (2026-02-27)
Cerințe noi:
- Punct de Reper (Fereastră): Fereastră pe stânga, ușă pe dreapta.
Status: ✅ Done. Window on left wall (sky-blue, "Fereastră"), door on right wall (amber, "Ușă").
3.11 ✅ [BUSINESS] Password Vault — Câmpuri Noi (2026-02-27)
Cerințe noi:
- Câmp Email: Adăugarea unui câmp distinct pentru "Email", separat de "Username".
- Link Clickabil: URL afișat ca link clickabil (tab nou) din lista de parole.
Status: ✅ Done. Added email: string field to VaultEntry type. Form has email input. URLs rendered as clickable <a> links with target="_blank".
3.12 [BUSINESS] Mini Utilities — Extindere și Fix-uri ✅ DONE (989a990)
Implementat:
- ✅ Transformare Numere în Litere: Convertor complet RO — lei/bani, variante compact și cu spații, suport până la 1 miliard
- ✅ Convertor Suprafețe (Bidirecțional): 5 câmpuri editabile (mp, ari, ha, km², sq ft), orice câmp actualizează restul
- ✅ Convertor U ↔ R (Bidirecțional): Toggle U→R / R→U, calcul cu Rsi/Rse/lambda
- ✅ Fix MDLPA: Iframe înlocuit cu 3 carduri link extern (portal, tutoriale, regulament)
- ✅ PDF Reducer: Drag & drop, 2 nivele (Echilibrat/Maximă), linkuri Deblocare PDF + PDF/A pe Stirling PDF
- ✅ Extractor Paletă Culori: Upload imagine → canvas downscale → top 8 culori ca swatches hex clickabile
- ⏭️ DWG to DXF: Amânat — necesită serviciu backend (ODA File Converter sau similar)
3.13 ✅ [BUSINESS] Tag Manager — Sincronizare ManicTime (11b35c7)
Implementat:
- ✅ Sincronizare Bidirecțională: Parser service (
manictime-service.ts) parsează/serializează Tags.txt; API route/api/manictimecu GET (citire + plan sync) + POST (pull/push/both); UI panel cu buton verificare, import, export, sincronizare completă - ✅ Versionare Fișier (Backup): Backup automat
Tags_backup_YYYYMMDD_HHMMSS.txtla fiecare scriere (push/both) - ✅ Validare Ierarhie: Verificare cod proiect, asociere companie, detectare duplicate; avertizări afișate în UI
- ✅ Docker config:
MANICTIME_TAGS_PATHenv var, volume mount/mnt/manictime; necesită configurare SMB pe host
Infrastructură necesară (pe server):
- Montare SMB share:
//time/tags → /mnt/manictimepe host-ul Ubuntu (cifs-utils)
3.14 [ARCHITECTURE] Storage & Securitate ✅
Cerințe noi:
- Migrare Storage (Prioritate): ✅ PostgreSQL via Prisma — realizat anterior (DatabaseStorageAdapter).
- Criptare Parole: ✅ AES-256-GCM server-side encryption. Dedicated
/api/vaultroute,src/core/crypto/service, ENCRYPTION_SECRET env var. Legacy plaintext auto-detected at decrypt. PATCH migration endpoint. - Integrare Passbolt (Wishlist): Studierea posibilității de a lega Password Vault-ul din ArchiTools direct de instanța voastră de Passbolt (via API), pentru a avea un singur "source of truth" securizat pentru parole.
3.15 [BUSINESS] AI Tools — Extindere și Integrare ✅
Implementat (commit d34c722):
- Prompt Generator v0.2.0:
- Search bar cu căutare în name/description/tags/category labels
- Filtru target type (text/image) cu dropdown + toggle rapid "Imagine"
- 4 template-uri noi imagine (18 total): Midjourney Exterior, SD Interior Design, Midjourney Infographic, SD Material Texture
- AI Chat v0.2.0 — Real API Integration:
/api/ai-chatroute: multi-provider (OpenAI gpt-4o-mini, Anthropic claude-sonnet-4-20250514, Ollama llama3.2, demo)- System prompt default în română pt context arhitectură (Legea 50/1991, norme P118, DTAC/PT)
use-chat.ts:sendMessage()cu fetch real,sendingstate,providerConfigla mount,updateSession()- UI: provider badge (Wifi/WifiOff + label), Bot icon pe mesaje assistant, spinner la generare, config banner cu detalii tech
- AI Chat + Tag Manager:
- Project selector dropdown în chat header via
useTags('project') ChatSession.projectTagId+projectName— context injectat în system prompt- Project name afișat în sidebar sesiuni
- Project selector dropdown în chat header via
- Docker: env vars AI_PROVIDER, AI_API_KEY, AI_MODEL, AI_BASE_URL, AI_MAX_TOKENS
Neimplementat (wishlist):
- Node-based Canvas (infinite canvas) — necesită bibliotecă React Flow, complexitate mare
- Nod Interpretare 3D — necesită Three.js, model ML, out of scope curent
PHASE 4 — Quality & Testing
Foundation work: tests, CI, docs, data safety.
4.01 [STANDARD] Install Testing Framework (Vitest)
What: Install and configure Vitest with React Testing Library.
npm install -D vitest @testing-library/react @testing-library/jest-dom jsdom @vitest/coverage-v8
Files to create: vitest.config.ts, src/test-setup.ts
Files to modify: package.json (add test scripts)
4.02 [STANDARD] Unit Tests — Critical Services
What: Write tests for the most critical business logic:
working-days.test.ts— Orthodox Easter 2024-2030, addWorkingDays, backward deadlinesdeadline-service.test.ts— Due date computation, tacit approval, chain resolutionregistry-service.test.ts— Number generation, overdue calculationlocal-storage.test.ts— CRUD, namespace isolationfeature-flags.test.ts— Defaults, env overrides
Coverage target: 90%+ for services.
4.03 [STANDARD] Data Export/Import for All Modules
What: Create a shared utility for backing up localStorage data:
- Per-module JSON export (download file)
- Per-module JSON import (upload + merge)
- Full backup: export ALL modules as single JSON
- Add export/import buttons to each module's main view
Files to create: src/shared/hooks/use-data-export.ts, src/shared/components/common/data-export-button.tsx
4.04 [LIGHT] Update Stale Documentation
What: Update docs to reflect current state:
docs/architecture/SYSTEM-ARCHITECTURE.md— Change modules from "Planned" to "Implemented"docs/DATA-MODEL.md— Add TrackedDeadline, Hot Desk schemasdocs/REPO-STRUCTURE.md— Add new files
4.05 [LIGHT] Wire External Tool URLs to Env Vars
What: src/config/external-tools.ts has hardcoded IPs. Wire to process.env.NEXT_PUBLIC_*_URL with fallback.
PHASE 5 — AI Chat Integration
Make Module 13 functional.
5.01 [HEAVY] AI Chat — Real API Integration
What: Replace demo mode with actual AI provider calls:
- Create
/api/ai/chatserver-side route (API keys never exposed to browser) - Provider abstraction: Anthropic Claude, OpenAI GPT, Ollama (local)
- Response streaming via ReadableStream
- Model selector in the UI
- Token usage display
Env vars:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
OLLAMA_BASE_URL=http://10.10.10.166:11434
AI_DEFAULT_PROVIDER=anthropic
AI_DEFAULT_MODEL=claude-sonnet-4-6-20261001
User action needed: Provide API keys when ready.
5.02 [STANDARD] AI Chat — Domain-Specific System Prompts
What: Architecture office-focused conversation modes:
- Romanian construction law assistant
- Architectural visualization prompt crafter
- Technical specification writer
- Urban planning regulation lookup
- Document drafting assistant
- Normative compliance checker
5.03 [LIGHT] Enable AI Chat Feature Flag
What: Set module.ai-chat enabled in flags.ts + production .env.
PHASE 6 — Authentication (Authentik SSO) ✅
Real users, real permissions. Core auth done, access control pending.
6.01 ✅ [HEAVY] Authentik OIDC Integration (2026-02-27)
What: Replace stub user with real Authentik SSO.
Status: ✅ Done. NextAuth v4 + Authentik OIDC provider configured. Group→role mapping (authentik groups → admin/manager/user). Group→company mapping (beletage/urban-switch/studii-de-teren). Cookie-based session. useAuth() returns real user. Header shows user name/email + logout. Sign in with Authentik page works.
Env vars (hardcoded in docker-compose.yml for Portainer CE):
NEXTAUTH_URL=https://tools.beletage.roNEXTAUTH_SECRET,AUTHENTIK_CLIENT_ID,AUTHENTIK_CLIENT_SECRET,AUTHENTIK_ISSUER
6.02 [STANDARD] Module-Level Access Control
What: Implement canAccessModule() with role-based rules. FeatureGate checks flag + permission.
Depends on: 6.01 ✅
6.03 [STANDARD] Data Visibility Enforcement
What: Filter storage results by visibility and createdBy fields (already stored on every entity, never enforced).
Depends on: 6.01 ✅
6.04 [LIGHT] Audit Logging
What: Log create/update/delete actions with user ID + timestamp. Console initially, later storage/N8N. Depends on: 6.01 ✅
PHASE 7 — Storage Migration (localStorage → Database) — PARTIALLY DONE
Multi-user shared data. PostgreSQL + Prisma + MinIO client configured.
7.01 ✅ [HEAVY] PostgreSQL + Prisma Setup (2026-02-27)
What: PostgreSQL + Prisma ORM setup.
Status: ✅ Done. Prisma v6.19.2 with PostgreSQL on 10.10.10.166:5432. KeyValueStore model. npx prisma generate in Dockerfile. @prisma/client in dependencies.
7.02 ✅ [HEAVY] API Storage Adapter (2026-02-27)
What: DatabaseStorageAdapter implementing StorageService via /api/storage route + Prisma.
Status: ✅ Done. Set NEXT_PUBLIC_STORAGE_ADAPTER=database to activate. All 14 modules instantly get DB persistence.
7.03 [STANDARD] Data Migration Tool
What: One-time export from localStorage → import to PostgreSQL. Preserve IDs and timestamps. Depends on: 7.02 ✅
7.04 ✅ [HEAVY] MinIO File Storage (2026-02-27)
What: MinIO client configured and tested.
Status: ✅ Done. MinIO client installed (minio npm package). Connected to 10.10.10.166:9002 (API) / 9003 (UI). Bucket tools exists. File upload adapter not yet wired to StorageService (MinioAdapter pending).
PHASE 8 — Advanced Features
Cross-cutting features that enhance the entire platform.
8.01 [HEAVY] Project Entity & Cross-Module Linking
What: New module: Projects. Central entity linking Registratura entries, Tags, Contacts, Templates.
Reference: docs/DATA-MODEL.md lines 566-582.
8.02 [STANDARD] Global Search (Cmd+K)
What: Search across all modules. Each module registers a search provider. Header bar integration.
8.03 [STANDARD] Notification System
What: Bell icon in header. Deadline alerts, overdue warnings, tacit approval triggers.
8.04 [STANDARD] Registratura — Print/PDF Export
What: Export registry as formatted PDF. Options: full registry, single entry, deadline summary.
8.05 [STANDARD] Word Templates — Clause Library + Document Generator
What: In-app clause composition, template preview, simple Word generation from templates.
8.06 [STANDARD] N8N Webhook Integration
What: Fire webhooks on events (new entry, deadline approaching, status change). N8N at http://10.10.10.166:5678.
8.07 [STANDARD] Mobile Responsiveness Audit
What: Test all modules on 375px/768px. Fix overflowing tables, forms, sidebar.
PHASE 9 — Security & External Access
9.01 [HEAVY] Guest/External Access Role
What: Read-only guest role, time-limited share links. Depends on Authentik (Phase 6).
9.02 [STANDARD] CrowdSec Integration
What: IP banning for brute force. CrowdSec at http://10.10.10.166:8088.
9.03 [LIGHT] SSL/TLS via Let's Encrypt
What: When public domain ready, configure in Nginx Proxy Manager.
PHASE 10 — CI/CD
10.01 [STANDARD] Gitea Actions CI Pipeline
What: .gitea/workflows/ci.yml — lint, typecheck, test, build on push.
Check first: Is Gitea Actions runner installed on server?
10.02 [STANDARD] E2E Tests (Playwright)
What: End-to-end tests for critical flows: navigation, Registratura CRUD, email signature, tag management.
Infrastructure Credentials Needed
| Service | What | When Needed | Status |
|---|---|---|---|
| US/SDT Logos | SVG/PNG logo files | Phase 1 (task 1.01) | ✅ Done |
| US/SDT Addresses | Office addresses for email signature | Phase 1 (task 1.02) | ✅ Done (placeholder) |
| Anthropic API Key | sk-ant-... from console.anthropic.com |
Phase 5 (task 5.01) | Pending |
| OpenAI API Key | sk-... from platform.openai.com |
Phase 5 (task 5.01) | Pending |
| Authentik Admin | Login to create OAuth app at :9100 | Phase 6 (task 6.01) | ✅ Done |
| MinIO Credentials | Access key + secret key for :9003 | Phase 7 (task 7.04) | ✅ Done |
| PostgreSQL | Database + password | Phase 7 (task 7.01) | ✅ Done |
| Gitea Actions Runner | Registration token from Gitea admin | Phase 10 (task 10.01) | Pending |
Quick Picker
15 min tasks [LIGHT]:
- 1.01 — Check logo files
1.07 — Password vault company + strength✅- 1.08 — IT inventory contact link
- 1.12 — Registry linked-entry limit
- 1.13 — Remove POT/CUT auto-calc
- 3.04 — Update stale docs
- 3.05 — Wire env var URLs
1 hour tasks [STANDARD]:
- 1.03 — Prompt generator templates
- 1.04 — Tag manager seeds + mandatory
1.05 — Mini utilities new tools✅1.06 — Digital signatures upload✅- 1.09 — Address book vCard + reverse lookup
- 1.11 — Dashboard activity feed + KPIs
- 3.01 + 3.02 — Tests setup + core tests
Full session tasks [HEAVY]:
- 2.01 — Hot Desk module (new)
- 4.01 — AI Chat API integration
- 5.01 — Authentik SSO
- 6.01 + 6.02 — PostgreSQL + API adapter
- 7.01 — Project entity module