How asapino308/filinglens works
FilingLens is a local-first SEC research app. The main workflow runs from a user’s ticker search through SEC company and filing data, deterministic financial analysis, and a desktop research view; filing text can also be retrieved locally and passed with verified metrics to an optional language model for grounded answers or analyst briefs. The Streamlit app remains a fallback. The README documents these capabilities, but sampled excerpts do not show every desktop route, so uncertain internal call links are omitted.
Main entry points: service.py Research service · client.py SEC client and cache · App.tsx Desktop workspace · composition.py Financial composition
Components 22
Research interfaces
- Desktop workspace
desktop/src/App.tsx - Desktop API
src/filinglens/desktop/api.py - Research service
src/filinglens/desktop/service.py - Streamlit fallback
app.py - Saved research
desktop/src/researchPreferences.ts
SEC data
- SEC EDGAR
- SEC client and cache
src/filinglens/sec/client.py - Company lookup
src/filinglens/sec/companies.py - Submissions and filings
src/filinglens/sec/submissions.py - Company facts and XBRL
src/filinglens/sec/xbrl.py - Financial composition
src/filinglens/sec/composition.py
Analysis and retrieval
- Statements and ratios
src/filinglens/analytics/statements.py - Trends and anomalies
src/filinglens/analytics/anomalies.py - Filing text parser
src/filinglens/documents/parser.py - Sections and chunks
src/filinglens/documents/sections.py - Local retrieval
src/filinglens/documents/retrieval.py
Grounded language
- Grounded Q&A
src/filinglens/llm/grounded_qa.py - Analyst brief
src/filinglens/llm/analyst_brief.py - Provider adapters
src/filinglens/llm/base.py - Optional AI services
- Brief export
src/filinglens/reporting/export.py
Other components
- Researcher
Connections 26
- Researcher → Desktop workspace: researches in
- Researcher → Streamlit fallback: uses fallback
- Desktop workspace → Desktop API: requests data
- Desktop API → Research service: dispatches
- Desktop workspace → Saved research: reads and saves
- Research service → Company lookup: searches companies
- Research service → Submissions and filings: loads submissions
- Research service → Company facts and XBRL: loads facts
- Research service → Financial composition: composes metrics
- Company lookup → SEC client and cache: requests directory
- Submissions and filings → SEC client and cache: requests filings
- Company facts and XBRL → SEC client and cache: requests company facts
- Financial composition → SEC client and cache: loads filing data
- SEC client and cache → SEC EDGAR: fetches official data
- Financial composition → Statements and ratios: supplies financials
- Statements and ratios → Trends and anomalies: screens movements
- Research service → Filing text parser: parses filing text
- Filing text parser → Sections and chunks: provides text
- Sections and chunks → Local retrieval: provides chunks
- Research service → Local retrieval: searches evidence
- Research service → Grounded Q&A: requests answers
- Research service → Analyst brief: requests briefs
- Grounded Q&A → Provider adapters: generates grounded answers
- Analyst brief → Provider adapters: generates brief text
- Provider adapters → Optional AI services: sends prompts
- Analyst brief → Brief export: exports brief