How valor0506/finsight-ai works
FinSight AI lets users sign in, select a commodity or equity, and request an AI-generated market report. The API checks the request and queues background work; the worker fetches market and macro data, generates analysis, builds a DOCX, and stores it for status and download. The frontend also provides registration, login, dashboard, and report-status views. Several backend connections are supported by the SOURCE INDEX rather than full excerpts; integrations are shown only where the excerpts document them.
Main entry points: App.jsx App routing · report_task.py Report task · main.py FastAPI routes · client.js API client
Components 24
Web application
- App routing
frontend/src/App.jsx - Navigation
frontend/src/components/Navbar.jsx - Landing page
frontend/src/pages/Landing.jsx - Login page
frontend/src/pages/Login.jsx - Registration page
frontend/src/pages/Register.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Report request
frontend/src/pages/GenerateReport.jsx - Report status
frontend/src/pages/ReportStatus.jsx - Auth state
frontend/src/context/AuthContext.jsx - Route guard
frontend/src/components/ProtectedRoute.jsx - API client
frontend/src/api/client.js
API and identity
- FastAPI routes
backend/main.py - Token auth
backend/core/auth.py - Runtime settings
backend/core/config.py - User and reports
backend/models/database.py
Report processing
- Report task
backend/tasks/report_task.py - Celery and Redis
backend/tasks/celery_app.py - DOCX builder
backend/report_builder/docx_builder.py
Market data and analysis
- Market data fetch
backend/agents/data_fetcher.py - LLM analysis
backend/agents/llm_analyst.py
Other components
- Investor
- Market data APIs
- OpenRouter
- Supabase storage
Connections 28
- Investor → App routing: uses
- App routing → Navigation: renders
frontend/src/App.jsx - App routing → Landing page: routes to
frontend/src/App.jsx - App routing → Login page: routes to
frontend/src/App.jsx - App routing → Registration page: routes to
frontend/src/App.jsx - App routing → Dashboard: routes to
frontend/src/App.jsx - App routing → Report request: routes to
frontend/src/App.jsx - App routing → Report status: routes to
frontend/src/App.jsx - App routing → Auth state: provides auth
frontend/src/App.jsx - App routing → Route guard: guards pages
frontend/src/App.jsx - Auth state → API client: calls auth API
frontend/src/context/AuthContext.jsx - Report request → API client: requests report
frontend/src/pages/GenerateReport.jsx - Dashboard → API client: loads reports
frontend/src/pages/Dashboard.jsx - API client → FastAPI routes: HTTP requests
frontend/src/api/client.js - FastAPI routes → Token auth: uses auth
backend/main.py - FastAPI routes → User and reports: queries and writes
backend/main.py - FastAPI routes → Report task: queues task
backend/main.py - Report task → Celery and Redis: runs on
backend/tasks/report_task.py - Report task → Market data fetch: fetches data
backend/tasks/report_task.py - Report task → LLM analysis: requests analysis
backend/tasks/report_task.py - Report task → DOCX builder: builds document
backend/tasks/report_task.py - Market data fetch → Market data APIs: fetches quotes
backend/agents/data_fetcher.py - LLM analysis → OpenRouter: generates analysis
- Report task → Supabase storage: uploads and updates
backend/tasks/report_task.py - Market data fetch → Runtime settings: reads settings
backend/agents/data_fetcher.py - LLM analysis → Runtime settings: reads settings
backend/agents/llm_analyst.py - Celery and Redis → Runtime settings: reads settings
backend/tasks/celery_app.py - User and reports → Runtime settings: reads settings
backend/models/database.py