๐Ÿ—๏ธ MyMindVentures AI Stack Architecture

Complete infrastructure visualization and design documentation

๐Ÿ”“ 100% Open Source (MIT License)
โœ… Fully Open Source: This diagram service is built with mermaid.js (MIT), Node.js (MIT), and runs completely self-hosted with no external paid services.

๐Ÿ“Š System Overview

The complete MyMindVentures AI Stack architecture spanning 11 docker-compose stacks with 27 services

11
Compose Stacks
27
Services
6
Networks
15+
Volumes
graph TB Internet["๐ŸŒ Internet Users"] DNS["๐Ÿ”— DNS"] Internet --> Caddy["๐Ÿ” EDGE: Caddy
Reverse Proxy + HTTPS
Rate Limiting
Security Headers"] DNS --> Caddy Caddy --> AuthStack["๐Ÿ”‘ SSO & Authentication
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Authelia (MFA)
PostgreSQL
Redis"] Caddy --> DataStack["๐Ÿ“Š Data Stack
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Airbyte ETL
PostgreSQL
S3 Compat"] Caddy --> SearchStack["๐Ÿ” Search Stack
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
SearXNG Metasearch
Redis Cache
Elasticsearch"] Caddy --> ObsStack["๐Ÿ“ˆ Observability
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Prometheus
Grafana Dashboards
Loki Logs
AlertManager"] Caddy --> DiagStack["๐Ÿ“ Diagrams
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Mermaid (Self-Hosted)
Architecture Docs"] Caddy --> DBTools["๐Ÿ—„๏ธ DB Tools
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
CloudBeaver
PgAdmin
PostgreSQL"] Caddy --> PlatformStack["๐Ÿš€ Platform
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Dokploy
Container Registry
Deployment"] ObsStack --> Backup["๐Ÿ’พ Backup System
Restic Daily Backups
Automated Encryption"] ObsStack --> IDS["๐Ÿšจ Security Monitoring
Falco Intrusion Detection
Real-time Alerts"] AuthStack --> Vault["๐Ÿ” Secrets
Vault + Consul
Secure Secret Storage"] DataStack --> Vault SearchStack --> Vault style Internet fill:#4CAF50,stroke:#333,color:#fff style Caddy fill:#2196F3,stroke:#333,color:#fff style AuthStack fill:#9C27B0,stroke:#333,color:#fff style DataStack fill:#FF9800,stroke:#333,color:#fff style SearchStack fill:#00BCD4,stroke:#333,color:#fff style ObsStack fill:#F44336,stroke:#333,color:#fff style DiagStack fill:#8BC34A,stroke:#333,color:#fff style DBTools fill:#3F51B5,stroke:#333,color:#fff style PlatformStack fill:#E91E63,stroke:#333,color:#fff style Backup fill:#607D8B,stroke:#333,color:#fff style IDS fill:#D32F2F,stroke:#333,color:#fff style Vault fill:#5E35B1,stroke:#333,color:#fff

๐Ÿ”„ Data Flow Architecture

How data moves through the system from ingestion to visualization

graph LR Source["๐Ÿ“ฅ Data Sources
APIs
Databases
External Services"] Source -->|Extract| Airbyte["๐Ÿ”€ Airbyte ETL
Data Integration
Transformation
Scheduling"] Airbyte -->|Load| DataDB["๐Ÿ—„๏ธ PostgreSQL
Data Warehouse
Production Data
Historical Data"] DataDB -->|Query| Analytics["๐Ÿ“Š Analytics Engine
Real-time Processing
Aggregations
Reports"] Analytics -->|Metrics| Prometheus["๐Ÿ“ˆ Prometheus
Time-series Database
Metrics Collection
Retention: 7 days"] Prometheus -->|Display| Grafana["๐Ÿ“Š Grafana
Visual Dashboards
Alerting
Multi-datasource"] DataDB -->|Logs| Loki["๐Ÿ“ Loki
Log Aggregation
Structured Logs
Query Interface"] Loki -->|Display| Grafana DataDB -->|Cache| Redis["โšก Redis
Session Cache
Query Results
Rate Limiting"] Source -->|Search| SearXNG["๐Ÿ” SearXNG
Metasearch Engine
Multiple Sources
Result Aggregation"] SearXNG -->|Cache| Redis DataDB -->|Backup| Restic["๐Ÿ’พ Restic
Daily Backups
Encrypted Storage
Point-in-time Recovery"] DataDB -->|Security| Falco["๐Ÿšจ Falco
Runtime Monitoring
Threat Detection
Compliance Audit"] Falco -->|Alerts| AlertManager["๐Ÿ”” AlertManager
Alert Routing
Notification
Escalation"] style Source fill:#4CAF50,stroke:#333,color:#fff style Airbyte fill:#FF9800,stroke:#333,color:#fff style DataDB fill:#3F51B5,stroke:#333,color:#fff style Analytics fill:#F44336,stroke:#333,color:#fff style Prometheus fill:#FF6F00,stroke:#333,color:#fff style Grafana fill:#E91E63,stroke:#333,color:#fff style Loki fill:#00BCD4,stroke:#333,color:#fff style Redis fill:#9C27B0,stroke:#333,color:#fff style SearXNG fill:#00BCD4,stroke:#333,color:#fff style Restic fill:#607D8B,stroke:#333,color:#fff style Falco fill:#D32F2F,stroke:#333,color:#fff style AlertManager fill:#F57C00,stroke:#333,color:#fff

๐Ÿ”’ Security Architecture

Multi-layered security approach protecting the entire infrastructure

graph TB Users["๐Ÿ‘ฅ Users"] Users -->|HTTPS| Caddy["๐Ÿ” Caddy Edge
TLS 1.3
Let's Encrypt
Security Headers
Rate Limiting"] Caddy -->|Verify| Authelia["๐Ÿ”‘ Authelia
TOTP MFA
Session Management
2FA Required"] Authelia -->|Store| Vault["๐Ÿ” HashiCorp Vault
Secret Storage
Access Control
Encryption at Rest"] Authelia -->|Access| AppStack["๐Ÿ”’ Protected Services
Microservices
Databases
APIs"] AppStack -->|Monitor| Falco["๐Ÿšจ Falco Runtime Security
Process Monitoring
File Integrity
Network Anomalies
Threat Detection"] Falco -->|Alert| AlertManager["๐Ÿ”” Immediate Alerts
Slack Notifications
Email Notifications
Escalation"] AppStack -->|Backup| Restic["๐Ÿ’พ Encrypted Backups
AES-256 Encryption
Daily Snapshots
Offsite Storage"] Users -->|Logs| Promtail["๐Ÿ“ Log Collector
Container Logs
System Logs
Application Logs"] Promtail -->|Send| Loki["๐Ÿ“ Loki
Centralized Logs
Query & Search
Audit Trail"] Loki -->|Query| Grafana["๐Ÿ“Š Security Dashboard
Failed Auth Attempts
Rate Limit Hits
Falco Alerts"] Vault -->|Manage| KeyRotation["๐Ÿ”„ Key Rotation
Automatic Cycling
Compliance
Audit Logging"] style Users fill:#4CAF50,stroke:#333,color:#fff style Caddy fill:#2196F3,stroke:#333,color:#fff style Authelia fill:#9C27B0,stroke:#333,color:#fff style Vault fill:#5E35B1,stroke:#333,color:#fff style AppStack fill:#F44336,stroke:#333,color:#fff style Falco fill:#D32F2F,stroke:#333,color:#fff style AlertManager fill:#F57C00,stroke:#333,color:#fff style Restic fill:#607D8B,stroke:#333,color:#fff style Promtail fill:#FF6F00,stroke:#333,color:#fff style Loki fill:#00BCD4,stroke:#333,color:#fff style Grafana fill:#E91E63,stroke:#333,color:#fff style KeyRotation fill:#5E35B1,stroke:#333,color:#fff

๐Ÿณ Services Topology

Complete mapping of all 27 containerized services

graph TB subgraph EDGE["๐Ÿ” EDGE LAYER"] Caddy["Caddy
Reverse Proxy"] Nginx["Nginx
Web Server"] end subgraph AUTH["๐Ÿ”‘ AUTHENTICATION & SSO"] Authelia["Authelia
SSO"] AuthDB["PostgreSQL
Auth DB"] end subgraph DATA["๐Ÿ“Š DATA STACK"] Airbyte["Airbyte
ETL"] PostgreSQL["PostgreSQL
Data WH"] S3["S3 Storage
Object Storage"] end subgraph SEARCH["๐Ÿ” SEARCH STACK"] SearXNG["SearXNG
Metasearch"] Elasticsearch["Elasticsearch
Search Index"] end subgraph OBSERVABILITY["๐Ÿ“ˆ OBSERVABILITY"] Prometheus["Prometheus
Metrics"] Grafana["Grafana
Dashboards"] Loki["Loki
Logs"] AlertManager["AlertManager
Alerts"] NodeExp["Node Exporter
Host Metrics"] cAdvisor["cAdvisor
Container Metrics"] end subgraph SECURITY["๐Ÿšจ SECURITY & BACKUP"] Falco["Falco
Intrusion Detection"] Restic["Restic
Backups"] Vault["Vault
Secrets"] Consul["Consul
Service Discovery"] end subgraph TOOLS["๐Ÿ› ๏ธ TOOLS & UTILITIES"] CloudBeaver["CloudBeaver
DB Manager"] PgAdmin["PgAdmin
DB Admin"] Mermaid["Mermaid
Diagrams"] Dokploy["Dokploy
Platform"] Terraform["Terraform
IaC"] end subgraph CACHE["โšก CACHING"] Redis["Redis
Cache/Sessions"] end EDGE --> AUTH EDGE --> DATA EDGE --> SEARCH EDGE --> OBSERVABILITY EDGE --> TOOLS AUTH --> Redis AUTH --> Vault DATA --> Redis DATA --> Vault SEARCH --> Redis OBSERVABILITY --> AlertManager SECURITY --> AlertManager AUTH --> SECURITY DATA --> SECURITY SEARCH --> SECURITY style EDGE fill:#2196F3,stroke:#333,color:#fff style AUTH fill:#9C27B0,stroke:#333,color:#fff style DATA fill:#FF9800,stroke:#333,color:#fff style SEARCH fill:#00BCD4,stroke:#333,color:#fff style OBSERVABILITY fill:#F44336,stroke:#333,color:#fff style SECURITY fill:#D32F2F,stroke:#333,color:#fff style TOOLS fill:#4CAF50,stroke:#333,color:#fff style CACHE fill:#FFD700,stroke:#333,color:#000

๐Ÿ”ง Disaster Recovery & Continuity

Business continuity and disaster recovery procedures

graph TB NormalOps["โœ… Normal Operations
All Services Running
Daily Backups
Continuous Monitoring"] IncidentDetect["๐Ÿšจ Incident Detection
Monitoring Alerts
Health Checks
User Reports"] Assessment["๐Ÿ“‹ Assessment
Root Cause Analysis
Impact Assessment
RTO/RPO Check"] NormalOps -->|Issue Detected| IncidentDetect IncidentDetect -->|Verify| Assessment Assessment -->|Service Restart| Recovery1["๐Ÿ”„ Service Recovery
Restart Failed Service
Check Dependencies
Verify Health"] Assessment -->|Data Corruption| Recovery2["๐Ÿ—„๏ธ Data Recovery
Restore from Backup
Verify Integrity
Resume Operations"] Assessment -->|Complete Failure| Recovery3["๐Ÿ—๏ธ Full Rebuild
Deploy Infrastructure
Restore All Data
Failover Complete"] Recovery1 --> Test1["โœ… Testing
Service Tests
Integration Tests
Smoke Tests"] Recovery2 --> Test2["โœ… Testing
Data Validation
Application Tests"] Recovery3 --> Test3["โœ… Testing
Full Validation
Load Testing"] Test1 -->|Pass| NormalOps Test2 -->|Pass| NormalOps Test3 -->|Pass| NormalOps Test1 -->|Fail| Escalate["๐Ÿ“ž Escalation
Manual Intervention
Engineering Team"] Test2 -->|Fail| Escalate Test3 -->|Fail| Escalate Escalate -->|Resolved| NormalOps NormalOps -->|Periodic| DRTest["๐Ÿงช DR Testing
Monthly Backups Test
Failover Drills
Documentation Update"] DRTest --> NormalOps style NormalOps fill:#4CAF50,stroke:#333,color:#fff style IncidentDetect fill:#F57C00,stroke:#333,color:#fff style Assessment fill:#FF9800,stroke:#333,color:#fff style Recovery1 fill:#2196F3,stroke:#333,color:#fff style Recovery2 fill:#00BCD4,stroke:#333,color:#fff style Recovery3 fill:#9C27B0,stroke:#333,color:#fff style Test1 fill:#4CAF50,stroke:#333,color:#fff style Test2 fill:#4CAF50,stroke:#333,color:#fff style Test3 fill:#4CAF50,stroke:#333,color:#fff style Escalate fill:#D32F2F,stroke:#333,color:#fff style DRTest fill:#5E35B1,stroke:#333,color:#fff

๐Ÿš€ Deployment Pipeline & Updates

Continuous deployment and infrastructure updates workflow

graph LR Dev["๐Ÿ‘จ๐Ÿ’ป Developer
Code Push"] Dev -->|Git Push| Repo["๐Ÿ“ฆ Git Repository
Main Branch
Docker Images"] Repo -->|Webhook| Build["๐Ÿ”จ Build Pipeline
Docker Build
Image Scan
Security Check"] Build -->|Success| Registry["๐Ÿ“ฆ Docker Registry
Container Images
Version Tags"] Build -->|Fail| Notify1["๐Ÿ“ง Notify Dev
Build Failed
Logs Available"] Notify1 -->|Fix & Push| Repo Registry -->|Deploy| Dev1["๐Ÿงช Dev Environment
Test Deployment
Smoke Tests
Integration Tests"] Dev1 -->|Pass| Staging["๐Ÿ”„ Staging Environment
Full Testing
Performance Tests
Security Scan"] Dev1 -->|Fail| Notify2["โš ๏ธ Build Issue
Testing Failed
Rollback Container"] Staging -->|Pass| Approval["โœ… Approval Gate
Manual Review
Change Log
Rollback Plan"] Staging -->|Fail| Notify2 Approval -->|Approved| Prod["๐Ÿš€ Production
Blue-Green Deploy
Health Checks
Gradual Rollout"] Approval -->|Rejected| Cancel["โŒ Deployment Cancelled
Continue Testing
Fix Issues"] Cancel -->|Ready| Approval Prod -->|Success| Monitor["๐Ÿ“Š Monitor
Metrics
Logs
Alerts"] Prod -->|Failure| Rollback["โฎ๏ธ Rollback
Previous Version
Incident Report
Postmortem"] Rollback -->|Analyze| Repo Monitor -->|Healthy| NormalOps["โœ… Normal Operations
Continuous Monitoring"] style Dev fill:#4CAF50,stroke:#333,color:#fff style Repo fill:#2196F3,stroke:#333,color:#fff style Build fill:#FF9800,stroke:#333,color:#fff style Registry fill:#00BCD4,stroke:#333,color:#fff style Dev1 fill:#9C27B0,stroke:#333,color:#fff style Staging fill:#E91E63,stroke:#333,color:#fff style Approval fill:#5E35B1,stroke:#333,color:#fff style Prod fill:#2196F3,stroke:#333,color:#fff style Monitor fill:#F44336,stroke:#333,color:#fff style Rollback fill:#D32F2F,stroke:#333,color:#fff style NormalOps fill:#4CAF50,stroke:#333,color:#fff style Notify1 fill:#F57C00,stroke:#333,color:#fff style Notify2 fill:#F57C00,stroke:#333,color:#fff style Cancel fill:#FF6F00,stroke:#333,color:#fff