How m1zhar/tsrp works
TSRP is an educational listed-company research app: a user selects a ticker and research section, the frontend presents analysis and related views, and the Python service supplies analysis and market data. The backend is the calculation authority; it gathers and aligns provider data before computing scores and valuation. The README also identifies expectations, catalysts and risks, snapshot comparison, charts, and exports as product capabilities. Some frontend wiring and unsampled endpoint implementations are not shown, so those relationships are omitted where evidence is insufficient.
Main entry points: index.py ASGI dispatcher · research_service.py Research orchestration · research-workspace.tsx Research workspace · analyze.py Company analysis route
Components 24
Research frontend
- Research workspace
frontend/components/research-workspace.tsx - Research brief
frontend/lib/research-brief.ts - Price chart
frontend/components/price-chart.tsx - Research export
frontend/lib/research-export.ts - Snapshot comparison
frontend/lib/snapshot-comparison.ts - API client
frontend/lib/api-client.ts - Backend token route
frontend/app/api/backend-token/route.ts
API service
- ASGI dispatcher
backend/api/index.py - Company analysis route
backend/api/analyze.py - Company search route
backend/api/search.py - Scenario route
backend/api/scenario.py - Market movers route
backend/api/movers.py - Top stocks route
backend/api/top_stocks.py - Snapshot diff route
backend/api/snapshot_diff.py
Research calculations
- Research orchestration
backend/research_service.py - Score and valuation
backend/engine.py - Growth expectations
backend/expectations.py - Valuation basis
backend/valuation_basis.py
Market data
- Period alignment
backend/financial_data.py - Yahoo and SEC adapters
backend/research_service.py
Request security
- API token verification
backend/api_auth.py - Signed scenario context
backend/scenario_context.py - Token issuance
frontend/lib/api-access-token.ts
Other components
- Researcher
Connections 23
- Researcher → Research workspace: selects research
README.md - Research workspace → Research brief: presents research
README.md - Research workspace → Price chart: shows charts
README.md - Research brief → Research export: supports export
frontend/lib/research-export.ts - Research workspace → Snapshot comparison: offers comparison
README.md - ASGI dispatcher → Company analysis route: dispatches
backend/api/index.py - ASGI dispatcher → Company search route: dispatches
backend/api/index.py - ASGI dispatcher → Scenario route: dispatches
backend/api/index.py - ASGI dispatcher → Market movers route: dispatches
backend/api/index.py - ASGI dispatcher → Top stocks route: dispatches
backend/api/index.py - ASGI dispatcher → Snapshot diff route: dispatches
backend/api/index.py - Company analysis route → Research orchestration: analyzes company
backend/api/analyze.py - Company analysis route → Signed scenario context: issues context
backend/api/analyze.py - Company analysis route → API token verification: checks token
backend/api/analyze.py - Company search route → API token verification: checks token
backend/api/search.py - Company search route → Research orchestration: searches companies
backend/api/search.py - Research orchestration → Score and valuation: calculates valuation
backend/research_service.py - Research orchestration → Growth expectations: uses expectations
backend/research_service.py - Research orchestration → Valuation basis: selects basis
backend/research_service.py - Research orchestration → Period alignment: aligns periods
backend/research_service.py - Yahoo and SEC adapters → Period alignment: aligns provider data
backend/research_service.py - Backend token route → Token issuance: issues token
- Token issuance → API token verification: authorizes requests