Architecture
Complete System Diagram

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:

StageAvg TimeCache HitCache Miss
Browser Cache-0msContinue
Cloudflare CDN10-30msReturnContinue
Vercel Rewrite5-15ms--
Cloud Run LB5-10ms--
Auth Check10-20ms--
Business Logic20-50ms--
Database Queries80-150ms--
Response Serialization10-20ms--
Total (Uncached)~140-295ms--
Total (Cached at Edge)~20-50msβœ…-

πŸ—‚οΈ Data Architecture - Complete View

Entity-Relationship with Technology Mapping

Storage Technology by Entity:

EntityPrimary DBSecondaryReal-TimeSearch
LeagueSupabaseNeo4j (graph)FirebaseChromaDB
TeamSupabaseNeo4j (relationships)--
PlayerSupabaseNeo4j (career paths)--
GameSupabase-Firebase (live scores)-
StatsSupabase-Firebase (live updates)-
UserFirebase AuthSupabase (profile)Firebase-
DocumentsCloud Storage--ChromaDB
ContractsSupabaseCloud Storage (PDF)-ChromaDB

πŸ” Security Perimeter

Defense in Depth Architecture

Security Layers Count: 4 major layers, 15+ security controls


πŸ“‘ 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

Complete Monitoring Architecture


🎯 Service Dependencies Graph

What Depends on What

Critical Dependencies:

ServiceHard DependenciesSoft Dependencies
Backend APISecret Manager, data_layerNeo4j, Supabase, Firebase
FrontendFirebase AuthBackend API
Docsdata_layer (build time)None (static after build)
MCP ServersBackend API, OpenAINeo4j, Supabase
n8nBackend APIGmail, 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

Platform

Documentation

Community

Support

partnership@altsportsdata.comdev@altsportsleagues.ai

2025 Β© AltSportsLeagues.ai. Powered by AI-driven sports business intelligence.

πŸ€– AI-Enhancedβ€’πŸ“Š Data-Drivenβ€’βš‘ Real-Time