Complete System Diagram
Comprehensive visual representation of the entire AltSportsLeagues.ai ecosystem, including all services, databases, integrations, and data flows.
π Complete Ecosystem Map
Legend:
- π Public - Accessible to external users/developers
- π Internal - Team access only
π Complete Request Lifecycle
From User Action to Database Storage
Total Latency Breakdown:
| Stage | Avg Time | Cache Hit | Cache Miss |
|---|---|---|---|
| Browser Cache | - | 0ms | Continue |
| Cloudflare CDN | 10-30ms | Return | Continue |
| Vercel Rewrite | 5-15ms | - | - |
| Cloud Run LB | 5-10ms | - | - |
| Auth Check | 10-20ms | - | - |
| Business Logic | 20-50ms | - | - |
| Database Queries | 80-150ms | - | - |
| Response Serialization | 10-20ms | - | - |
| Total (Uncached) | ~140-295ms | - | - |
| Total (Cached at Edge) | ~20-50ms | β | - |
ποΈ Data Architecture - Complete View
Entity-Relationship with Technology Mapping
Storage Technology by Entity:
| Entity | Primary DB | Secondary | Real-Time | Search |
|---|---|---|---|---|
| League | Supabase | Neo4j (graph) | Firebase | ChromaDB |
| Team | Supabase | Neo4j (relationships) | - | - |
| Player | Supabase | Neo4j (career paths) | - | - |
| Game | Supabase | - | Firebase (live scores) | - |
| Stats | Supabase | - | Firebase (live updates) | - |
| User | Firebase Auth | Supabase (profile) | Firebase | - |
| Documents | Cloud Storage | - | - | ChromaDB |
| Contracts | Supabase | Cloud Storage (PDF) | - | ChromaDB |
π Security Perimeter
π‘ Integration Architecture
External Service Integrations
Integration Patterns:
- Synchronous - Direct API calls (OpenAI, Anthropic)
- Asynchronous - Background jobs via n8n (Gmail, Jira)
- Event-Driven - Webhooks (Stripe, GitHub)
- Batch - Scheduled jobs (data sync, reports)
π CI/CD Pipeline
Complete Deployment Pipeline
Pipeline Duration:
- Automated Checks: 3-5 minutes
- Code Review: Variable (0-24 hours)
- Deployment: 5-10 minutes
- Verification: 5-10 minutes
- Total: ~15-30 minutes (excluding review)
πΎ Data Backup Strategy
Multi-Layer Backup Architecture
Backup Verification:
# Test restore procedure monthly
gcloud storage cp gs://altsportsdata-backups/neo4j/latest.backup /tmp/
# Restore to test instance
# Verify data integrity
# Document resultsπ Observability Stack
π― Service Dependencies Graph
What Depends on What
Critical Dependencies:
| Service | Hard Dependencies | Soft Dependencies |
|---|---|---|
| Backend API | Secret Manager, data_layer | Neo4j, Supabase, Firebase |
| Frontend | Firebase Auth | Backend API |
| Docs | data_layer (build time) | None (static after build) |
| MCP Servers | Backend API, OpenAI | Neo4j, Supabase |
| n8n | Backend API | Gmail, Calendar |
Failure Impact:
- Secret Manager Down β Backend can't start (critical)
- Neo4j Down β Graph queries fail (degraded mode available)
- Supabase Down β Most APIs fail (critical)
- Firebase Down β Auth fails (critical for logged-in users)
- OpenAI Down β AI features disabled (graceful degradation)
π Comprehensive System View
This page provides the complete technical architecture including all internal components, dependencies, and infrastructure details. Use this as the master reference for system design and troubleshooting.
Related: See Service Map for public-facing service details