Files
Brancheneinstufung2/gtm_architect_documentation.md

86 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dokumentation: GTM Architect Engine (v2.2)
## 1. Projektübersicht
Der **GTM Architect** ("Go-to-Market Architect") ist ein KI-gestütztes System zur Entwicklung umfassender Marktstrategien für neue technische Produkte (Schwerpunkt: Robotik & Facility Management).
Das System führt den Nutzer durch einen **9-stufigen Prozess** von der technischen Analyse über Business-Case-Modellierung bis hin zu fertigen Vertriebsunterlagen und Landingpages.
## 2. Architektur & Tech-Stack (Stand Jan 2026)
Das System ist als Microservice in die bestehende Docker-Umgebung integriert (`gtm-app`).
```mermaid
graph LR
User[Browser] -- HTTP/JSON --> Proxy[Nginx :8090]
Proxy -- /gtm/ --> NodeJS[Node.js Server :3005]
NodeJS -- Spawn Process --> Python[Python Orchestrator]
Python -- google.genai --> Gemini[Google Gemini 2.0 Flash (Text)]
Python -- google.genai --> Imagen[Google Imagen 4.0 (Text-to-Image)]
Python -- google.genai --> GeminiImg[Google Gemini 2.5 Flash Image (Image-to-Image)]
Python -- SQL --> DB[(SQLite: gtm_projects.db)]
```
### Komponenten
1. **Frontend (`/gtm-architect`):**
* Framework: **React** (Vite + TypeScript).
* **Feature:** Upload von Referenzbildern ("Image-to-Image").
* **Fix:** Robuste Darstellung von Listen-Objekten (Rollen).
2. **Backend Bridge (`server.cjs`):**
* Runtime: **Node.js** (Express).
* Funktion: Nimmt HTTP-Requests entgegen und startet Python-Prozesse.
3. **Logic Core (`gtm_architect_orchestrator.py`):**
* Runtime: **Python 3.11+**.
* **Bibliothek:** Upgrade auf **`google-genai`** (v1.x SDK). Legacy-Support entfernt.
* **Modelle (Automatische Wahl):**
* **Text:** `gemini-2.0-flash` (High Performance, ersetzt 1.5).
* **Bild (Hybrid):**
* *Mit Referenzbild:* **`gemini-2.5-flash-image`**. Nutzt das Produktfoto als strikte Vorlage ("Image-to-Image").
* *Ohne Referenzbild:* **`imagen-4.0-generate-001`**. Generiert generische Szenen ("Text-to-Image").
4. **Persistenz (`gtm_projects.db`):**
* Typ: **SQLite**.
## 3. Der 9-Phasen Prozess
| Phase | Modus | Input | Output | Beschreibung |
| :--- | :--- | :--- | :--- | :--- |
| **1** | `phase1` | Rohtext / URL | Features, Constraints | Extrahiert technische Daten. |
| **2** | `phase2` | Phase 1 Result | ICPs, Data Proxies | Identifiziert ideale Kundenprofile. |
| **3** | `phase3` | Phase 2 Result | Whales, Rollen | Identifiziert Zielkunden & Buying Center. |
| **4** | `phase4` | Phase 1 & 3 | Strategy Matrix | Entwickelt "Angles" und Pain-Points. |
| **5** | `phase5` | Alle Daten | Markdown Report | Erstellt den finalen Strategie-Report. |
| **6** | `phase6` | Phase 1, 3, 4 | Battlecards, Prompts | Generiert Einwandbehandlung & Bild-Prompts. |
| **7** | `phase7` | Phase 2, 4 | Landing Page Copy | Erstellt Landingpage-Texte. |
| **8** | `phase8` | Phase 1, 2 | Business Case | CFO-Argumentation, ROI-Logik. |
| **9** | `phase9` | Phase 1, 4 | Feature-to-Value | Übersetzung technischer Features in Nutzen. |
| **Extra** | `image` | Prompt (+Ref) | Base64 PNG | Generiert Konzeptbilder (Produkt-treu). |
## 4. Deployment & Betrieb
### Docker Integration
Der Service läuft im Container `gtm-app`.
* **Build:** Frontend-Änderungen erfordern `docker-compose up -d --build gtm-app`.
* **Dependencies:** `Pillow` und `google-genai` sind installiert.
## 5. Logging & Debugging
* **Logs:** Werden in `/app/Log_from_docker/` geschrieben.
* **Diagnose:** `helpers.py` enthält eine Diagnose-Funktion, die bei Fehlern verfügbare Modelle loggt.
## 6. Historie & Fixes (Jan 2026)
* **[FEATURE] Produkt-Identität:**
* Prompt-Engineering in `helpers.py` wurde verschärft ("Place EXACTLY this product...").
* Backend erkennt `referenceImagesBase64` vom Frontend.
* **[FIX] API-Kompatibilität:**
* Migration auf `google-genai` SDK.
* Fallback-Mechanismus für Imagen 4.0 vs. Imagen 3.0.
* Workaround für `gemini-2.5` (kein JSON-Mode bei Bildern).
* **[FIX] Stabilität:**
* Typ-Sicherheit im Frontend (Phase 3 Crash behoben).
* Einrückungsfehler in `helpers.py` korrigiert.