Zum Hauptinhalt springen

Architekturübersicht

Technische Architektur der Vartovii-Plattform.

🏗️ Systemarchitektur

┌─────────────────────────────────────────────────────────────┐
│ FRONTEND │
│ React 19 + Vite + Tailwind + Framer Motion │
│ ├── Dashboard (company analysis) │
│ ├── Chat Widget (AI Agent) │
│ └── Knowledge Base (Docusaurus) │
└───────────────────────────┬─────────────────────────────────┘
│ HTTPS
┌───────────────────────────▼─────────────────────────────────┐
│ BACKEND API │
│ FastAPI + Python 3.13 + Uvicorn │
│ ├── /api/company/* (Corporate endpoints) │
│ ├── /api/ai/* (AI Chat endpoints) │
│ ├── /api/agent/* (Agent Tools endpoints) │
│ ├── /api/scraping/* (Scraping management) │
│ ├── /api/v2/crypto/* (Crypto module) │
│ └── /api/forensic/* (Forensic Agent - on-chain) │
└───────┬──────────────────┬──────────┬───────────────────────┘
│ │ │
┌───────▼───────┐ ┌───────▼───────┐ ┌───────▼───────┐
│ PostgreSQL │ │ Vertex AI │ │ External │
│ Cloud SQL │ │ Gemini 2.5 │ │ APIs │
│ ├── reviews │ │ ├── Chat │ │ ├── Kununu │
│ ├── companies│ │ ├── RAG │ │ ├── Google │
│ └── jobs │ │ └── Function │ │ ├── Reddit │
│ │ │ Calling │ │ ├── CoinGecko│
│ │ │ │ │ └── DefiLlama│
└───────────────┘ └───────────────┘ └───────┬───────┘

┌─────────▼─────────┐
│ Google BigQuery │
│ Ethereum Dataset │
│ (Forensic Agent) │
└───────────────────┘

🛠️ Technologie-Stack

Backend

KomponenteTechnologie
FrameworkFastAPI (Python 3.13)
ServerUvicorn (ASGI)
DatenbankPostgreSQL 17 (Cloud SQL)
ORMSQLAlchemy 2.0
MigrationenAlembic
KIVertex AI (Gemini 2.5 Flash)
AnalysenGoogle BigQuery (Ethereum dataset)

Frontend

KomponenteTechnologie
FrameworkReact 19
Build-ToolVite
StylingTailwind CSS
StateTanStack Query
DiagrammeNivo + Recharts
AnimationenFramer Motion

Infrastruktur

KomponenteTechnologie
HostingGoogle Cloud Run
DatenbankCloud SQL PostgreSQL
CacheMemorystore for Redis
KI-DiensteVertex AI (Gemini 2.5)
AnalysenGoogle BigQuery (Ethereum)
SecretsSecret Manager
MonitoringCloud Logging
CI/CDCloud Build + GitHub Actions

📁 Projektstruktur

Vartovii/
├── backend/
│ ├── main.py # FastAPI-App-Einstiegspunkt
│ ├── ai/ # KI-Dienste
│ │ ├── config.py # Modellkonfiguration
│ │ ├── client.py # Gemini-Client
│ │ ├── prompts/ # System-Prompts
│ │ ├── services/ # Chat, Sentiment, Bericht
│ │ └── rag/ # RAG-Korpusverwaltung
│ ├── api/ # API-Router
│ ├── models/ # SQLAlchemy-Modelle
│ ├── services/ # Geschäftslogik
│ └── scrapers/ # Datenerfassung

├── dashboard_app/
│ ├── src/
│ │ ├── components/ # React-Komponenten
│ │ ├── pages/ # Routen-Seiten
│ │ ├── hooks/ # Benutzerdefinierte Hooks
│ │ └── api/ # API-Client
│ └── public/ # Statische Assets

├── knowledge-base/ # Docusaurus-Dokumentation
│ ├── docs/ # Dokumentationsdateien
│ └── docusaurus.config.js # Konfiguration

├── docs_site/ # Landing Page
└── docs/ # Interne Dokumentation (RAG-indiziert)

🔄 Datenfluss

Unternehmensanalyse

1. User searches "BMW"
└── Frontend → GET /api/search/smart?q=BMW

2. Smart Search prüft Aktualität
└── Backend → Datenbankabfrage
└── Wenn veraltet → Scraping-Jobs auslösen

3. Unternehmensdaten zurückgeben
└── Backend → Frontend
└── Dashboard mit Trust Score anzeigen

AI Chat

1. Benutzer sendet Nachricht
└── Frontend → POST /api/ai/chat

2. Gemini analysiert Absicht
└── Keywords erkannt? → Function Calling
└── Keine Keywords → Direkte Antwort

3. Tool-Ausführung (falls nötig)
└── search_company, get_trust_score, etc.
└── API-Aufrufe an die Datenbank

4. Antwort formatiert
└── Backend → Frontend
└── Im Chat-Widget anzeigen

Forensic Agent (On-Chain Analytics)

1. Benutzer fragt "Check balance of 0xd8dA..."
└── Frontend → POST /api/ai/chat
└── AI erkennt Wallet-Adresse-Keyword

2. Tool-Ausführung
└── check_wallet-Funktion aufgerufen
└── BigQuery-Abfrage an das crypto_ethereum-Dataset
└── CoinGecko API für USD price

3. Antwort mit Kontext
└── ETH balance + USD value + Etherscan link
└── Backend → Frontend → Im Chat anzeigen

🔐 Sicherheit

  • Authentifizierung: API-Key für Agent-Endpoints
  • Autorisierung: IAM-basierte Zugriffskontrolle
  • Verschlüsselung: Überall HTTPS, at-rest Encryption
  • Secrets: Google Secret Manager

📊 Performance

MetrikZielAktuell
API Response (cached)unter 100ms~50ms
API Response (DB)unter 500ms~200ms
Chat Responseunter 3s~1.5s
Seitenladezeitunter 2s~1.2s