Skip to main content

Microservices

ForesightX splits responsibilities by business capability. Each backend service is a FastAPI application with its own configuration, health check, tests, and deployment lifecycle.

ServiceResponsibilityPublic route prefix
AuthRegistration, login, OAuth, JWT lifecycle, session revocation/api/auth
DataQuotes, history, indicators, news, search, and streaming/api/data
PatternFeature preparation and model inference/api/pattern
ProfileUser details, portfolio, transactions, and risk/api/profile
OrchestrationMulti-service analysis and recommendation workflow/api/orchestration
FrontendResponsive React application and session-aware UI/

Boundary rules

  • A service owns its tables and migrations.
  • Cross-service reads happen through APIs, not shared database credentials.
  • External provider formats are normalized by the service that owns that integration.
  • The frontend calls same-origin NGINX routes rather than container names.
  • Optional integrations should fail explicitly or use documented fallback behavior.

Common conventions

  • GET /health for liveness and readiness checks
  • Pydantic schemas for request and response validation
  • Environment variables for deployment-specific configuration
  • Structured HTTP errors at service boundaries
  • Pytest for backend verification and Vitest for frontend components