graph TB
subgraph Client["Client Layer"]
iOS["iOS App"]
Android["Android App"]
Web["Web App"]
end
subgraph Gateway["API Gateway Layer"]
APIGateway["API Gateway
(Kong / AWS API Gateway)
- Auth (JWT)
- Rate limiting
- Request routing"]
end
subgraph Services["Core Services Layer"]
ProfileService["Profile Service
- User profiles
- Triangle weights
- Archetype data"]
ConvoService["Conversation Service
- Message routing
- Metadata extraction
- Real-time analysis"]
MatchService["Matching Engine
- Compatibility scoring
- Calibration logic
- Match queue"]
AnalyticsService["Analytics Service
- Sentiment analysis
- Repair latency
- Vulnerability slope"]
AspirationService["Aspiration Service
- Tag management
- Growth alignment
- Sculpting index"]
end
subgraph Data["Data Layer"]
PostgreSQL["PostgreSQL
- User profiles
- Match history
- Calibration data"]
MongoDB["MongoDB
- Conversation metadata
- Sentiment scores
- Reflection data"]
Redis["Redis
- Session cache
- Real-time presence
- Rate limit counters"]
S3["S3 / Object Storage
- Profile photos
- Archived messages
- Backup data"]
end
subgraph ML["ML & Analytics Layer"]
SentimentML["Sentiment Analysis
(Hugging Face / OpenAI)"]
ArchetypeML["Archetype Classifier
(Custom trained model)"]
CompatML["Compatibility Scorer
(Ensemble model)"]
end
subgraph Queue["Message Queue"]
RabbitMQ["RabbitMQ / Kafka
- Async processing
- Event streaming
- Batch jobs"]
end
subgraph External["External Services"]
Auth0["Auth0 / Firebase Auth
- OAuth
- Social login"]
Twilio["Twilio
- SMS verification
- Push notifications"]
Sentry["Sentry
- Error tracking
- Performance monitoring"]
end
iOS --> APIGateway
Android --> APIGateway
Web --> APIGateway
APIGateway --> ProfileService
APIGateway --> ConvoService
APIGateway --> MatchService
APIGateway --> AnalyticsService
APIGateway --> AspirationService
ProfileService --> PostgreSQL
ProfileService --> Redis
ProfileService --> S3
ConvoService --> MongoDB
ConvoService --> Redis
ConvoService --> RabbitMQ
MatchService --> PostgreSQL
MatchService --> MongoDB
MatchService --> Redis
MatchService --> CompatML
AnalyticsService --> MongoDB
AnalyticsService --> SentimentML
AnalyticsService --> RabbitMQ
AspirationService --> PostgreSQL
AspirationService --> MongoDB
RabbitMQ --> ArchetypeML
RabbitMQ --> CompatML
APIGateway --> Auth0
ConvoService --> Twilio
MatchService --> Sentry
style Client fill:#1C1917,stroke:#C4622D,stroke-width:2px,color:#F5F0E8
style Gateway fill:#231f1b,stroke:#D4A853,stroke-width:2px,color:#F5F0E8
style Services fill:#2a2520,stroke:#C4622D,stroke-width:1px,color:#F5F0E8
style Data fill:#1C1917,stroke:#D4A853,stroke-width:1px,color:#F5F0E8
style ML fill:#231f1b,stroke:#C4622D,stroke-width:1px,color:#F5F0E8
style Queue fill:#2a2520,stroke:#D4A853,stroke-width:1px,color:#F5F0E8
style External fill:#1C1917,stroke:rgba(245,240,232,0.2),stroke-width:1px,color:#F5F0E8