
graph TB
    Title["<b>KROW - Cloud Architecture</b><br/>Production Solution"]
    
    subgraph Prototype[" "]
        Proto["🔧 Current KROW Prototype<br/>(Demo Only)"]
    end
    
    Title --> Prototype
    Title --> Production
    
    subgraph Production["🏢 KROW - PRODUCTION ARCHITECTURE"]
        subgraph GCP["☁️ Google Cloud Platform - US Regions"]
            
            subgraph Auth["🔐 Authentication"]
                Firebase["Firebase Auth<br/>• MFA<br/>• OAuth 2.0"]
            end
            
            subgraph Backend["⚙️ Backend"]
                Functions["Cloud Functions<br/>• Serverless<br/>• Auto-scaling"]
                API["API Gateway<br/>• Secure APIs<br/>• Rate limiting"]
            end
            
            subgraph Data["💾 Data Storage"]
                Firestore["Firestore/Cloud SQL<br/>• Encrypted at rest<br/>• Auto backup"]
                Storage["Cloud Storage<br/>• Encrypted<br/>• Access control"]
            end
            
            subgraph Security["🛡️ Security"]
                IAM["Cloud IAM<br/>• Access control<br/>• Least privilege"]
                Logs["Logging & Monitoring<br/>• Audit trails<br/>• Real-time alerts"]
            end
        end
        
        subgraph Compliance["✅ COMPLIANCE"]
            GDPR["📋 GDPR Ready<br/>• US data hosting<br/>• User rights<br/>• Data portability"]
            SOC2["🏆 SOC 2 Ready<br/>• Google certified<br/>• Security controls<br/>• Full audit trails"]
        end
    end
    
    Users["👥 End Users"]
    
    Proto -.->|Migration vers| Production
    Users --> Auth
    Auth --> API
    API --> Functions
    Functions --> Firestore
    Functions --> Storage
    IAM --> Auth
    IAM --> Backend
    IAM --> Data
    Logs --> Security
    GCP --> GDPR
    GCP --> SOC2
    
    style Prototype fill:#FFF3CD,stroke:#856404,stroke-width:2px,stroke-dasharray: 5 5
    style Proto fill:#FFF3CD,stroke:#856404
    style Title fill:#1976D2,stroke:#0D47A1,stroke-width:3px,color:#FFFFFF
    style Production fill:#D4EDDA,stroke:#155724,stroke-width:3px
    style GCP fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
    style Auth fill:#E8F5E9,stroke:#2E7D32
    style Backend fill:#E8F5E9,stroke:#2E7D32
    style Data fill:#E8F5E9,stroke:#2E7D32
    style Security fill:#FFE0B2,stroke:#E65100
    style Compliance fill:#F3E5F5,stroke:#6A1B9A,stroke-width:2px
    style GDPR fill:#E1BEE7,stroke:#6A1B9A
    style SOC2 fill:#E1BEE7,stroke:#6A1B9A