How aktreides44/stocklenz works
StockLens turns SEC filings and market prices into a local SQLite dataset, serves that dataset through a read-only API, and presents it in a Flutter screener and company-detail app. The daily refresh coordinates the main data stages; the API separately refreshes its hosted database copy and reads it for requests. The app’s documented capabilities include filtering, sorting, presets, watchlists, configurable columns, scores, and price charts. Flutter internals and several pipeline implementations were not excerpted, so their relationships are shown only where documented or indexed.
Main entry points: refresh.py Data refresh · screener_page.dart Screener views · db.py Database storage · main.py API endpoints
Components 29
Data pipeline
- Data refresh
backend/pipeline/refresh.py - SEC client
backend/pipeline/sec_client.py - Filing updates
backend/pipeline/sec_updates.py - Filing extraction
backend/pipeline/extract.py - TTM figures
backend/pipeline/ttm.py - Share counts
backend/pipeline/shares.py - Latest prices
backend/pipeline/prices.py - Price history
backend/pipeline/price_history.py - Metric formulas
backend/pipeline/metrics.py - Company scores
backend/pipeline/scores.py - Pros and cons
backend/pipeline/analysis.py - Database storage
backend/pipeline/db.py - Stock database
- Runtime settings
backend/config.py
Read API
- API endpoints
backend/api/main.py - Database download
backend/api/database_file.py
Flutter app
- Screener views
app/lib/screener_page.dart - Company details
app/lib/company_page.dart - Company search
app/lib/company_search.dart - Filters and presets
app/lib/filters_panel.dart - Column chooser
app/lib/columns_dialog.dart - Watchlist
app/lib/watchlist.dart - Price chart
app/lib/price_chart.dart - Score display
app/lib/scores_view.dart
External sources
- Polygon prices
- Yahoo prices
- SEC EDGAR
- Published database
Other components
- Investor
Connections 28
- Investor → Screener views: uses
README.md - Data refresh → Filing updates: checks filings
backend/pipeline/refresh.py - Data refresh → SEC client: loads filings
backend/pipeline/refresh.py - Data refresh → Filing extraction: extracts data
backend/pipeline/refresh.py - Data refresh → TTM figures: derives TTM
backend/pipeline/refresh.py - Data refresh → Share counts: gets shares
backend/pipeline/refresh.py - Data refresh → Latest prices: gets prices
backend/pipeline/refresh.py - Data refresh → Price history: updates history
backend/pipeline/refresh.py - Data refresh → Metric formulas: calculates metrics
backend/pipeline/refresh.py - Data refresh → Company scores: adds scores
backend/pipeline/refresh.py - Data refresh → Database storage: writes database
backend/pipeline/refresh.py - SEC client → SEC EDGAR: downloads filings
backend/pipeline/sec_client.py - Latest prices → Polygon prices: requests prices
README.md - Latest prices → Yahoo prices: backs up gaps
README.md - Database storage → Pros and cons: uses rules
backend/pipeline/db.py - Database storage → Metric formulas: uses formulas
backend/pipeline/db.py - Database storage → Stock database: stores records
README.md - API endpoints → Database download: refreshes copy
backend/api/main.py - API endpoints → Database storage: reads data
backend/api/main.py - Database download → Published database: downloads database
backend/api/database_file.py - API endpoints → Screener views: serves screener data
README.md - API endpoints → Company details: serves detail data
README.md - Screener views → Filters and presets: filters companies
- Screener views → Column chooser: configures columns
- Screener views → Watchlist: shows watchlist
- Screener views → Company search: opens lookup
- Company details → Price chart: shows prices
- Company details → Score display: shows scores