Component Interaction Diagram
This diagram shows the actual Earna AI system architecture with Supabase as the backend, featuring GPT-4o as the primary AI model with alternatives like Claude and Gemini, real-time messaging, and file attachments.
Communication Patterns
Communication Types:
Pattern | Use Case | Technology | Latency |
---|---|---|---|
REST API | Web/mobile requests | Next.js API Routes | 50-200ms |
WebSocket | Real-time updates | Dashboard sync | < 100ms |
Server Actions | Form submissions | Next.js 15 | 100-500ms |
Streaming | AI responses | Server-Sent Events | 50-300ms |
Edge Functions | Authentication | Vercel Edge Runtime | 10-50ms |
Database | Persistent storage | PostgreSQL + Redis | 5-20ms |
Vector Search | Semantic queries | pgvector | 10-50ms |
Service Integration:
- Edge Functions for API endpoints
- Environment variables for secure configuration
- Webhook integration for credit bureau updates
- Health checks via monitoring endpoints
- Rate limiting for API protection
Last updated on