Zum Hauptinhalt springen

Architekturübersicht

Technische Architektur der Sentry Analytics-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.11 + Uvicorn │
│ ├── /api/company/* (Corporate endpoints) │
│ ├── /api/ai/* (AI Chat endpoints) │
│ ├── /api/agent/* (Agent Tools endpoints) │
│ ├── /api/scraping/* (Scraping management) │
│ └── /api/v2/crypto/* (Crypto module) │
└───────┬──────────────────┬──────────────────┬───────────────┘
│ │ │
┌───────▼───────┐ ┌───────▼───────┐ ┌───────▼───────┐
│ PostgreSQL │ │ Vertex AI │ │ External │
│ Cloud SQL │ │ Gemini 2.5 │ │ APIs │
│ ├── reviews │ │ ├── Chat │ │ ├── Kununu │
│ ├── companies│ │ ├── RAG │ │ ├── Google │
│ └── jobs │ │ └── Function │ │ ├── Reddit │
└───────────────┘ └───────────────┘ └───────────────┘

🛠️ Technologie-Stack

Backend

KomponenteTechnologie
FrameworkFastAPI (Python 3.11)
ServerUvicorn (ASGI)
DatenbankPostgreSQL 17 (Cloud SQL)
ORMSQLAlchemy 2.0
MigrationenAlembic
AIVertex AI (Gemini 2.5)

Frontend

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

Infrastruktur

KomponenteTechnologie
HostingGoogle Cloud Run
DatenbankCloud SQL PostgreSQL
AI ServicesVertex AI
GeheimnisseSecret Manager
MonitoringCloud Logging
CI/CDGitHub Actions

📁 Projektstruktur

Vartovii/
├── backend/
│ ├── main.py # FastAPI app entry
│ ├── ai/ # AI services
│ │ ├── config.py # Model configuration
│ │ ├── client.py # Gemini client
│ │ ├── prompts/ # System prompts
│ │ ├── services/ # Chat, sentiment, report
│ │ └── rag/ # RAG corpus management
│ ├── api/ # API routers
│ ├── models/ # SQLAlchemy models
│ ├── services/ # Business logic
│ └── scrapers/ # Data collection

├── dashboard_app/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Route pages
│ │ ├── hooks/ # Custom hooks
│ │ └── api/ # API client
│ └── public/ # Static assets

├── knowledge-base/ # Docusaurus docs
│ ├── docs/ # Documentation files
│ └── docusaurus.config.js # Configuration

├── docs_site/ # Landing page
└── docs/ # Internal docs (RAG indexed)

🔄 Datenfluss

Unternehmensanalyse

1. Benutzer sucht nach "BMW"
└── Frontend → GET /api/search/smart?q=BMW

2. Smart Search prüft Aktualität
└── Backend → Database query
└── 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 die Absicht
└── Schlüsselwörter erkannt? → Function Calling
└── Keine Schlüsselwörter → Direkte Antwort

3. Tool-Ausführung (falls erforderlich)
└── search_company, get_trust_score, etc.
└── API calls to database

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

🔐 Sicherheit

  • Authentifizierung: API-Schlüssel für Agenten-Endpunkte
  • Autorisierung: IAM-basierte Zugriffssteuerung
  • Verschlüsselung: HTTPS überall, At-rest-Verschlüsselung
  • Geheimnisse: Google Secret Manager

📊 Leistung

MetrikZielIst
API-Antwort (gecached)unter 100ms~50ms
API-Antwort (DB)unter 500ms~200ms
Chat-Antwortunter 3s~1.5s
Seitenladezeitunter 2s~1.2s

Siehe Datenbankschema für detaillierte Datenmodelle.