How jorgeofthejungle/pse-quant-saas works
StockPilot PH is a Philippine-equities research SaaS. Investors use the Next.js screens to request rankings, stock research, watchlists, and live updates; the FastAPI gateway serves those requests using quantitative engines and persistent data. The README also documents ingestion, reports, payments, search, task workers, telemetry, caching, and disaster recovery. The repository contains a substantial legacy pipeline alongside the v2 backend; its principal scoring and valuation components are represented, but sampled evidence does not establish all legacy runtime links. Unsampled subsystem paths are based on the tree and documented capabilities.
Main entry points: routes API routes · models.py Research database · main.py FastAPI gateway · app Research web app
Components 24
Investor presentation
- Research web app
frontend/src/app - Frontend API adapters
frontend/src/lib/api.ts
API and services
- FastAPI gateway
backend/pse_quant/api/main.py - API routes
backend/pse_quant/api/routes - Identity and customers
backend/pse_quant/services/auth_service.py - Payments and webhooks
backend/pse_quant/api/routes/payments.py
Research engines
- Fundamental scoring
backend/pse_quant/core/scoring.py - Valuation and MoS
backend/pse_quant/core/mos.py - OaaS analysis
backend/pse_quant/core/oaas_engine.py - Market data ingestion
backend/pse_quant/scraper - Equity full-text search
backend/pse_quant/search/fts_engine.py - Legacy research pipeline
legacy/main.py - Legacy scoring
legacy/engine/scorer_v2.py - Legacy MoS
legacy/engine/mos.py
Workers and integrations
- Research reports
backend/pse_quant/reporting/generator.py - Leased task workers
backend/pse_quant/tasks/engine.py - SSE stream hub
backend/pse_quant/streaming/hub.py - Tracing and telemetry
backend/pse_quant/telemetry
Data and recovery
- Research database
backend/pse_quant/db/models.py - Cache engine
backend/pse_quant/cache/engine.py - Backup and snapshots
backend/pse_quant/backup/snapshot_engine.py
Other components
- Investor
- PSE data sources
- Payment provider
Connections 24
- Investor → Research web app: uses
- Research web app → Frontend API adapters: requests data
- Frontend API adapters → FastAPI gateway: HTTP JSON / SSE
- FastAPI gateway → API routes: registers
backend/pse_quant/api/main.py - FastAPI gateway → Research database: routes persistence
- FastAPI gateway → Tracing and telemetry: traces requests
backend/pse_quant/api/main.py - API routes → Identity and customers: serves identity
- API routes → Payments and webhooks: handles payment requests
- Payment provider → Payments and webhooks: sends webhooks
- API routes → Fundamental scoring: requests rankings
- API routes → Valuation and MoS: requests valuation
- API routes → OaaS analysis: requests analysis
- API routes → Equity full-text search: queries
- PSE data sources → Market data ingestion: provides market data
- Market data ingestion → Research database: stores market data
- Research database → Equity full-text search: indexes equities
backend/pse_quant/search/fts_engine.py - Legacy research pipeline → Legacy scoring: scores stocks
legacy/main.py - Legacy research pipeline → Legacy MoS: enriches MoS
legacy/main.py - Leased task workers → Research database: leases task records
backend/pse_quant/tasks/engine.py - Leased task workers → SSE stream hub: uses task stream
backend/pse_quant/tasks/engine.py - Research reports → Research database: reads research data
- Research database → Backup and snapshots: backs up
backend/pse_quant/backup/snapshot_engine.py - FastAPI gateway → Cache engine: uses cache
- Research web app → SSE stream hub: subscribes to updates