import type { SystemInfoConfig } from './types' export const mailConfig: SystemInfoConfig = { title: 'Unified Inbox System-Info', description: 'E-Mail-Management mit KI-Analyse und Automatisierung.', version: '1.0', architecture: { layers: [ { title: 'Inbox UI', components: ['Mail List', 'Compose', 'AI Summary'], color: '#3b82f6' }, { title: 'Mail Service', components: ['IMAP Sync', 'SMTP Send', 'Parser'], color: '#8b5cf6' }, { title: 'AI Pipeline', components: ['Classification', 'Summarization', 'Response Draft'], color: '#10b981' }, { title: 'Storage', components: ['PostgreSQL', 'MinIO (Attachments)', 'Vector DB'], color: '#f59e0b' }, ], }, features: [ { name: 'Multi-Account Support', status: 'active', description: 'Mehrere E-Mail-Konten' }, { name: 'KI-Zusammenfassung', status: 'planned', description: 'Automatische E-Mail-Zusammenfassung' }, { name: 'Smart Categorization', status: 'planned', description: 'KI-basierte Kategorisierung' }, { name: 'Response Suggestions', status: 'planned', description: 'Antwort-Vorschlaege' }, ], roadmap: [ { phase: 'Phase 1: Core (Q1)', priority: 'high', items: ['IMAP/SMTP Integration', 'Multi-Account', 'Search', 'Attachments'] }, { phase: 'Phase 2: AI (Q2)', priority: 'high', items: ['E-Mail Classification', 'Priority Detection', 'Sentiment Analysis', 'Spam Detection'] }, { phase: 'Phase 3: Automation (Q3)', priority: 'medium', items: ['Auto-Responses', 'Rules Engine', 'Workflow Triggers', 'CRM Integration'] }, ], technicalDetails: [ { component: 'IMAP', technology: 'imaplib/imapclient', description: 'E-Mail Empfang' }, { component: 'SMTP', technology: 'smtplib', description: 'E-Mail Versand' }, { component: 'AI', technology: 'OpenAI GPT-4', description: 'Text Analysis' }, { component: 'Search', technology: 'PostgreSQL FTS', description: 'Volltextsuche' }, ], auditInfo: [ { category: 'E-Mail Konten', items: [ { label: 'Konfigurierte Konten', value: 'Variabel', status: 'ok' }, { label: 'IMAP Sync', value: 'Aktiviert', status: 'ok' }, { label: 'SMTP Versand', value: 'Aktiviert', status: 'ok' }, { label: 'OAuth2 Support', value: 'Google, Microsoft', status: 'ok' }, ], }, { category: 'Sicherheit', items: [ { label: 'Verschluesselung', value: 'TLS Required', status: 'ok' }, { label: 'Credential Storage', value: 'Encrypted', status: 'ok' }, { label: 'Spam-Filter', value: 'SpamAssassin', status: 'ok' }, { label: 'Virus-Scan', value: 'ClamAV', status: 'ok' }, ], }, { category: 'KI-Features', items: [ { label: 'Kategorisierung', value: 'Geplant', status: 'warning' }, { label: 'Zusammenfassung', value: 'Geplant', status: 'warning' }, { label: 'Antwort-Vorschlaege', value: 'Geplant', status: 'warning' }, { label: 'Sentiment Analysis', value: 'Geplant', status: 'warning' }, ], }, ], fullDocumentation: `

Unified Inbox - E-Mail Management

1. Uebersicht

Der Unified Inbox aggregiert E-Mails aus mehreren Konten in einer zentralen Oberflaeche. Geplant ist die Integration von KI-Features fuer automatische Kategorisierung und Zusammenfassung.

2. Architektur

┌─────────────────────────────────────────────────────────────────────┐
│                         Unified Inbox UI                             │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────┐  │
│  │   Inbox      │  │   Compose    │  │   AI Summary (planned)   │  │
│  └──────────────┘  └──────────────┘  └──────────────────────────┘  │
└─────────────────────────────┬───────────────────────────────────────┘
                              │
                              v
┌─────────────────────────────────────────────────────────────────────┐
│                        Mail Service                                  │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐  ┌────────────┐    │
│  │ IMAP Sync  │  │ SMTP Send  │  │  Parser    │  │ AI Pipeline│    │
│  └────────────┘  └────────────┘  └────────────┘  └────────────┘    │
└─────────────────────────────┬───────────────────────────────────────┘
                              │
          ┌───────────────────┴───────────────────┐
          │                                       │
          v                                       v
┌─────────────────────────┐         ┌─────────────────────────┐
│    External Mail        │         │    Internal Storage     │
│  ├── Gmail              │         │  ├── PostgreSQL         │
│  ├── Outlook            │         │  ├── MinIO (Attachments)│
│  └── Custom IMAP        │         │  └── Qdrant (Embeddings)│
└─────────────────────────┘         └─────────────────────────┘

3. Unterstuetzte Provider

ProviderAuth-MethodeFeatures
GmailOAuth2Labels, Push-Sync
Outlook/365OAuth2Folders, Categories
Custom IMAPUser/PassStandard IMAP
ExchangeOAuth2/EWSGeplant

4. API Endpoints

EndpointMethodeBeschreibung
/api/mail/accountsGETKonfigurierte Konten
/api/mail/accountsPOSTKonto hinzufuegen
/api/mail/messagesGETE-Mails abrufen
/api/mail/messagesPOSTE-Mail senden
/api/mail/messages/{id}GETE-Mail-Details
/api/mail/syncPOSTManueller Sync

5. Sync-Strategie

Initial Sync
     │
     v
┌───────────────────────────────────────┐
│  1. Fetch Folder Structure            │
│  2. Sync Last 30 Days                 │
│  3. Index Messages                    │
│  4. Generate Embeddings (optional)    │
└─────────────────┬─────────────────────┘
                  │
                  v
Incremental Sync (alle 5 Min)
     │
     v
┌───────────────────────────────────────┐
│  1. Check for new Messages (IDLE)     │
│  2. Fetch new Messages                │
│  3. Update Index                      │
│  4. Process AI Pipeline               │
└───────────────────────────────────────┘

6. Sicherheit

7. Datenschutz

AspektMassnahme
E-Mail-InhalteLokal gespeichert, nicht an Dritte
KI-VerarbeitungOpt-in, PII-Filterung
RetentionSpiegelt Provider-Einstellung
LoeschungSync mit Provider
`, }