[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
122
readme.md
122
readme.md
@@ -53,28 +53,33 @@ Für eine umfassende Übersicht über allgemeine Projektdokumente, Architektur u
|
||||
|
||||
---
|
||||
|
||||
## Current Status (March 7, 2026) - Infrastructure Stabilization
|
||||
## ✅ Current Status (March 7, 2026) - STABILIZED & INTEGRATED
|
||||
|
||||
### 1. Docker Architecture Update
|
||||
* **Docker Volumes:** Databases are now stored in named Docker volumes (`connector_db_data`, `explorer_db_data`) instead of bind mounts to resolve permission issues on Synology.
|
||||
* **Secure Configuration:** All API keys and secrets are now strictly loaded from `.env` via `docker-compose.yml` environment mapping. File-based secrets (`*.txt`) are deprecated.
|
||||
* **Healthchecks:** Added robust healthchecks for `company-explorer` and `connector-superoffice` to prevent Nginx startup race conditions.
|
||||
### 1. Infrastructure Hardening
|
||||
* **Volumes:** Critical databases (Company Explorer, Connector, Lead Engine) now reside in named Docker volumes (`*_db_data`), resolving persistence issues on Synology.
|
||||
* **Security:** API keys and tokens are strictly managed via `.env` injection. Hardcoded secrets have been removed.
|
||||
* **Stability:** Nginx proxy waits for backend health checks before starting.
|
||||
|
||||
### 2. SuperOffice Connector (v2.1)
|
||||
* **Status:** Healthy and authenticated.
|
||||
* **Database:** Uses internal volume `/app/data/connector_queue.db`.
|
||||
### 2. SuperOffice Connector (v2.1.1)
|
||||
* **Status:** Active & Syncing via Webhook.
|
||||
* **Safety:** Implemented robust "Echo Shield" logic. The worker actively ignores events triggered by its own API user to prevent infinite loops.
|
||||
* **Filtering:** Updates are only processed if relevant fields (Name, URL, JobTitle) have changed.
|
||||
|
||||
### 3. Company Explorer (v0.7.3)
|
||||
* **Status:** Healthy.
|
||||
* **Styling:** Frontend styling is currently disabled (PostCSS removed) to allow stable builds. Needs to be re-enabled post-migration.
|
||||
* **Data:** Recovered via Synology Drive and injected into Docker volume.
|
||||
### 3. Company Explorer (v0.7.4)
|
||||
* **Frontend:** Styling (Tailwind/PostCSS) restored. Build pipeline fixed.
|
||||
* **Database:** Schema fully repaired and aligned with current codebase.
|
||||
|
||||
### 4. Lead Engine (Trading Twins)
|
||||
* **Integration:** Successfully integrated into the main stack (`docker-compose.yml`) and accessible via Gateway (`/lead/`).
|
||||
* **Status:** UI is operational. Mail ingest requires MS Graph credentials.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Next Steps for User (Immediate Actions)
|
||||
## 🚀 Next Steps for User
|
||||
|
||||
1. **Migration:** Follow the plan in `RELOCATION.md` to deploy on the new Ubuntu VM.
|
||||
2. **Backup:** Ensure regular backups of the new Docker volumes.
|
||||
2. **Configuration:** Add Microsoft Graph credentials to `.env` to enable Lead Engine mail ingest.
|
||||
3. **Backup:** Ensure regular backups of the new Docker volumes.
|
||||
|
||||
---
|
||||
|
||||
@@ -198,7 +203,7 @@ Die Klasse `DataProcessor` ist das Herzstück der Anreicherungslogik und enthäl
|
||||
|
||||
### `process_reevaluation_rows(...)`
|
||||
- **Zweck:** Führt den vollständigen Anreicherungsprozess gezielt für Zeilen aus, die im Google Sheet manuell mit einem 'x' in der "ReEval Flag"-Spalte markiert wurden. Vor der Neubewertung werden alle zuvor abgeleiteten Daten in der Zeile gelöscht.
|
||||
- **Input:** `row_limit` (maximale Anzahl zu verarbeitender Zeilen), `clear_flag` (ob das 'x'-Flag nach der Verarbeitung entfernt werden soll) und die booleschen Flags zur Schritt-Steuerung.
|
||||
- **Input:** `row_limit` (maximale Anzahl zu verarbeitender Zeilen), `clear_flag` (ob das 'x'-Flag nach der Verarbeitung entfernt werden soll) und die boolesche Flags zur Schritt-Steuerung.
|
||||
- **Output:** Aktualisiert die markierten Zeilen im Google Sheet mit neu angereicherten Daten.
|
||||
|
||||
### `process_website_scraping(...)`
|
||||
@@ -833,91 +838,6 @@ Die konsolidierte Lösung besteht aus fünf Haupt-Containern, die von `docker-co
|
||||
|
||||
- **Effiziente Entwicklung:** Die Python-Skripte (`*.py`) werden als Volumes eingebunden ("Sideloading"). Änderungen am Python-Code erfordern daher **keinen** kompletten Docker-Rebuild, sondern nur einen Neustart des Containers.
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
## 10. Deployment & Entwicklung
|
||||
|
||||
|
||||
|
||||
### Produktions-Deployment
|
||||
|
||||
|
||||
|
||||
Für den dauerhaften Betrieb auf einem Server (z.B. Synology Diskstation) wird die gesamte Anwendung mit einem einzigen Befehl gestartet.
|
||||
|
||||
|
||||
|
||||
1. **Stellen Sie sicher, dass Docker und Docker Compose installiert sind.**
|
||||
|
||||
2. **Navigieren Sie in das Hauptverzeichnis des Projekts.**
|
||||
|
||||
3. **Starten Sie den gesamten Stack:**
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
|
||||
docker-compose up -d --build
|
||||
|
||||
```
|
||||
|
||||
Der `--build`-Parameter ist nur beim ersten Start oder nach Änderungen an den Dockerfiles oder Frontend-Komponenten (z.B. `App.tsx`) notwendig.
|
||||
|
||||
|
||||
|
||||
### Zugriff
|
||||
|
||||
|
||||
|
||||
- **Marketing & Intelligence Hub:** Die zentrale Landingpage ist unter `http://<Server-IP>:8090` erreichbar.
|
||||
|
||||
- **B2B Marketing Assistant:** Direkt erreichbar unter `http://<Server-IP>:8090/b2b/`.
|
||||
|
||||
- **Market Intelligence Tool:** Direkt erreichbar unter `http://<Server-IP>:8090/market/`.
|
||||
|
||||
- **GTM Architect:** Direkt erreichbar unter `http://<Server-IP>:8090/gtm/`.
|
||||
|
||||
|
||||
|
||||
### Entwicklung & Sideloading
|
||||
|
||||
|
||||
|
||||
Dank des Volume-Mountings für die Python-Skripte ist die Entwicklung sehr effizient:
|
||||
|
||||
|
||||
|
||||
1. **Ändern Sie den Python-Code** in `b2b_marketing_orchestrator.py`, `market_intel_orchestrator.py` oder `gtm_architect_orchestrator.py`.
|
||||
|
||||
2. **Starten Sie den betroffenen Container neu**, damit die Änderungen wirksam werden:
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
|
||||
# Für den B2B Assistant
|
||||
|
||||
docker-compose restart b2b-app
|
||||
|
||||
|
||||
|
||||
# Für das Market Intelligence Backend
|
||||
|
||||
docker-compose restart market-backend
|
||||
|
||||
# Für den GTM Architect
|
||||
docker-compose restart gtm-app
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Ein zeitaufwändiger `docker-compose build` ist nur bei Änderungen am Frontend-Code, an den `Dockerfile`n oder an den `requirements.txt`/`package.json`-Dateien notwendig.
|
||||
|
||||
### API-Authentifizierung (Company Explorer)
|
||||
|
||||
Der `company-explorer` Dienst erfordert nun eine HTTP Basic Authentication für alle API-Endpunkte (`/api/*`). Dies dient dem internen Zugriffsschutz.
|
||||
@@ -1037,4 +957,4 @@ Diese Tests befinden sich in `company-explorer/backend/tests/` und prüfen die i
|
||||
Allgemeine Tests im Hauptverzeichnis zur Absicherung der Schnittstellen.
|
||||
|
||||
* **`test_opener_api.py`**: Testet spezifisch den `/api/provision/superoffice-contact` Endpunkt des Company Explorers.
|
||||
* **`test_core_functionality.py`**: Basis-Checks für die System-Integrität (Datenbank-Verbindung, API-Health).
|
||||
* **`test_core_functionality.py`**: Basis-Checks für die System-Integrität (Datenbank-Verbindung, API-Health).
|
||||
|
||||
Reference in New Issue
Block a user