How nikunjpurohit11/hcltech-stocker works
This repository is a quantitative investing dashboard backed by a FastAPI analytics service. The user enters through the React application, explores market and stock data, and can inspect portfolio, risk, prediction, and strategy results. The frontend currently includes mock-data services alongside Supabase-backed account and portfolio functionality; prediction and backtesting capabilities also have backend implementations. Many routes and pages are documented by the source index but were not excerpted, so their internal call chains are not inferred.
Main entry points: App.tsx Application router · StockAnalysisPage.tsx Stock analysis · portfolioService.ts Portfolio service · __init__.py API routes
Components 28
Web application
- Application router
src/App.tsx - Stock analysis
src/pages/StockAnalysisPage.tsx - Portfolio dashboard
src/pages/DashboardPage.tsx - Risk analytics
src/pages/RiskAnalyticsPage.tsx - Strategy lab
src/pages/StrategyLabPage.tsx - AI insights
src/pages/AIInsightsPage.tsx
Market data
- Market service
src/services/marketService.ts - Market fixtures
src/data/mockStocks.ts - Market charts
src/components/charts/PriceChart.tsx
Portfolio and accounts
- Portfolio service
src/services/portfolioService.ts - Transactions
src/services/transactionService.ts - Authentication
src/context/AuthContext.tsx - Supabase
src/lib/supabase.ts - Financial calculations
src/utils/financialCalculations.ts
Analytics and research
- Risk analytics service
src/services/analyticsService.ts - Prediction service
src/services/predictionService.ts - Backtest client
src/services/strategyService.ts - API client
src/services/apiClient.ts
Analytics API
- FastAPI application
backend/app/main.py - API routes
backend/app/api/routes/__init__.py - Prediction inference
backend/app/services/prediction_service.py - Feature engineering
backend/app/services/feature_engineering.py - Market data provider
backend/app/providers/market_data.py - Yahoo Finance
backend/app/providers/yahoo_finance.py - Backtesting service
backend/app/services/backtest_service.py - Risk service
backend/app/services/risk_service.py - Analytics service
backend/app/services/analytics_service.py
Other components
- Investor
Connections 31
- Investor → Application router: uses
- Application router → Stock analysis: routes to
src/App.tsx - Application router → Portfolio dashboard: routes to
src/App.tsx - Application router → Risk analytics: routes to
src/App.tsx - Application router → Strategy lab: routes to
src/App.tsx - Application router → AI insights: routes to
src/App.tsx - Application router → Market service: loads market data
src/App.tsx - Stock analysis → Market service: requests history
src/pages/StockAnalysisPage.tsx - Stock analysis → Prediction service: requests prediction
src/pages/StockAnalysisPage.tsx - Stock analysis → Market charts: renders chart
src/pages/StockAnalysisPage.tsx - Market service → Market fixtures: loads fixtures
src/services/marketService.ts - Market charts → Financial calculations: formats values
src/components/charts/PriceChart.tsx - Portfolio dashboard → Portfolio service: loads portfolio
src/pages/DashboardPage.tsx - Portfolio dashboard → Transactions: loads activity
src/pages/DashboardPage.tsx - Portfolio service → Financial calculations: calculates PnL
src/services/portfolioService.ts - Portfolio service → Supabase: reads and writes
src/services/portfolioService.ts - Portfolio service → Market service: gets quotes
src/services/portfolioService.ts - Authentication → Supabase: authenticates and seeds
src/context/AuthContext.tsx - Risk analytics → Risk analytics service: requests analytics
- Strategy lab → Backtest client: runs backtest
src/pages/StrategyLabPage.tsx - Prediction service → API client: requests prediction
src/services/predictionService.ts - Backtest client → API client: requests backtest
src/services/strategyService.ts - API client → FastAPI application: calls API
- FastAPI application → API routes: registers routes
backend/app/main.py - FastAPI application → Prediction inference: loads artifacts
backend/app/main.py - Prediction inference → Feature engineering: computes features
backend/app/services/prediction_service.py - Prediction inference → Market data provider: fetches market data
backend/app/services/prediction_service.py - Market data provider → Yahoo Finance: uses provider
backend/app/providers/market_data.py - API routes → Backtesting service: dispatches backtests
- API routes → Risk service: dispatches risk
- API routes → Analytics service: dispatches analytics