How daishakpatel/investilens works
InvestiLens is a full-stack public-company research platform: users search for a company, explore deterministic financial and filing data, and request retrieval-grounded reports or chat whose claims are checked against cited evidence. The backend also ingests SEC filings, prices, and news, then parses and embeds documents for retrieval. Major documented capabilities include watchlists, alerts, evaluation, and observability. The graph focuses on runtime paths; some links to unsampled API handlers and product branches are omitted or marked unverified rather than inferred.
Main entry points: repositories Repositories · ingestion.py Ingestion tasks · main.py FastAPI app · base.py Data providers
Components 26
Research experience
- Dashboard UI
frontend/src/App.tsx - Research views
frontend/src/pages/tabs/ResearchTab.tsx - Typed API client
frontend/src/lib/apiClient.ts
API and services
- FastAPI app
backend/app/main.py - API routes
backend/app/api - Chat service
backend/app/chat/service.py - Research generation
backend/app/research/generator.py - Financial metrics
backend/app/finance - Watchlists and alerts
backend/app/api/watchlist.py
Evidence pipeline
- RAG retrieval
backend/app/rag/pipeline.py - Citation validation
backend/app/citation/pipeline.py - SEC ingestion
backend/app/ingestion/sec/pipeline.py - News ingestion
backend/app/ingestion/news/pipeline.py - Price ingestion
backend/app/ingestion/prices/pipeline.py - Document parsing
backend/app/ingestion/documents/pipeline.py - Embedding generation
backend/app/embeddings/pipeline.py
Data and storage
- Data providers
backend/app/providers/base.py - Repositories
backend/app/repositories - Domain models
backend/app/models - Object storage
backend/app/utils/storage.py - PostgreSQL
Background operations
- Ingestion tasks
backend/app/tasks/ingestion.py - Runtime settings
backend/app/config.py - Tracing and metrics
backend/app/observability/tracing.py - Evaluation
backend/app/eval
Other components
- Researcher
Connections 29
- Researcher → Dashboard UI: uses
README.md - Dashboard UI → Research views: routes to
frontend/src/App.tsx - Research views → Typed API client: requests data
- Typed API client → FastAPI app: calls API
- FastAPI app → API routes: registers
backend/app/main.py - API routes → Chat service: dispatches
- API routes → Research generation: dispatches
- Chat service → RAG retrieval: retrieves evidence
backend/app/chat/service.py - Chat service → Citation validation: validates claims
backend/app/chat/service.py - Research generation → Citation validation: validates claims
- RAG retrieval → Repositories: reads company data
backend/app/rag/pipeline.py - RAG retrieval → Financial metrics: routes metric queries
backend/app/rag/pipeline.py - SEC ingestion → Data providers: fetches filings
backend/app/ingestion/sec/pipeline.py - News ingestion → Data providers: fetches news
backend/app/ingestion/news/pipeline.py - Price ingestion → Data providers: fetches prices
backend/app/ingestion/prices/pipeline.py - SEC ingestion → Object storage: stores raw filings
backend/app/ingestion/sec/pipeline.py - Document parsing → Object storage: reads raw filings
backend/app/ingestion/documents/pipeline.py - Document parsing → Repositories: writes chunks
backend/app/ingestion/documents/pipeline.py - Embedding generation → Repositories: loads chunks and saves vectors
backend/app/embeddings/pipeline.py - Embedding generation → Data providers: embeds text
backend/app/embeddings/pipeline.py - Ingestion tasks → SEC ingestion: runs ingestion
backend/app/tasks/ingestion.py - Ingestion tasks → News ingestion: runs ingestion
backend/app/tasks/ingestion.py - Ingestion tasks → Price ingestion: runs ingestion
backend/app/tasks/ingestion.py - Ingestion tasks → Document parsing: parses filings
backend/app/tasks/ingestion.py - Repositories → Domain models: uses models
backend/app/repositories/companies.py - Repositories → PostgreSQL: persists records
- FastAPI app → Tracing and metrics: configures tracing
backend/app/main.py - FastAPI app → Runtime settings: loads settings
backend/app/main.py - Researcher → Watchlists and alerts: manages
README.md