System Architecture
LatentGEO is a production-ready, full-stack SaaS platform for SEO/GEO audits built with modern technologies and best practices.Technology Stack
Backend
FastAPI + SQLAlchemy + Celery
Frontend
Next.js 16 (App Router)
Real-time
Server-Sent Events (SSE)
Infrastructure Components
| Component | Technology | Purpose |
|---|---|---|
| Database | Supabase Postgres | Primary data store with pooling |
| Cache & Queue | Redis | Real-time events, caching, Celery broker |
| Storage | Supabase Storage | File uploads and artifacts |
| Task Queue | Celery | Background job processing |
| Monitoring | Sentry | Error tracking and performance |
System Architecture Diagram
Deployment Modes
LatentGEO supports two canonical Docker deployment modes:1. Standard Mode (docker-compose.yml)
Production-ready configuration:
- Backend/worker containers without code mounts
- Frontend in production mode (optimized build)
- Server-side API URL:
http://backend:8000 - Client-side API URL:
http://localhost:8000 - Suitable for staging and production environments
2. Development Mode (docker-compose.dev.yml)
Hot-reload development configuration:
- Hot reload for both backend and frontend
- Code mounted as volumes for instant updates
- Debug mode enabled
- Ideal for local development
Key Environment Variables
Backend Configuration
Frontend Configuration
Service URLs
When running locally:| Service | URL | Purpose |
|---|---|---|
| Frontend | http://localhost:3000 | User interface |
| Backend API | http://localhost:8000 | REST API |
| API Docs | http://localhost:8000/docs | Swagger UI |
| ReDoc | http://localhost:8000/redoc | Alternative API docs |
| OpenAPI JSON | http://localhost:8000/openapi.json | OpenAPI schema |
Real-time Communication
SSE vs Webhooks
LatentGEO uses both SSE and webhooks for different purposes:- SSE (Server-Sent Events): Real-time progress updates for the UI dashboard
- Webhooks: External integrations (GitHub, HubSpot, etc.)
- SSE solves real-time UX for audit progress
- Webhooks solve external automation and integrations
Security Features
Authentication
Auth0 integration with JWT bearer tokens
Rate Limiting
Redis-backed distributed rate limiting
CORS
Configurable CORS with credential support
Security Headers
CSP, HSTS, X-Frame-Options, etc.
Next Steps
Backend Details
Explore the FastAPI backend architecture
Frontend Details
Explore the Next.js frontend architecture
Real-time System
Deep dive into SSE implementation