How imskr/northstar works
Northstar is a private, self-hosted portfolio ledger. An investor uses the browser app to manage holdings and trades, sync quotes, and review accounting, allocation, and goal projections; the Flask APIs provide account-scoped state and market data, with the database canonical after login. The README documents browser localStorage as a fast offline working copy. The sampled sources show API registration, authentication, persistence, catalog, and market-provider calls; goal and analytics features are documented but their internal implementation was not sampled.
Main entry points: __init__.py Flask application · auth.py Authentication · market_api.py Market API · market_provider.py Quote normalization
Components 12
Browser client
- Ledger and goals
static/js/app.js - Local working copy
Flask services
- Flask application
northstar/__init__.py - Authentication
northstar/auth.py - Password reset
northstar/password_reset.py - Portfolio state API
northstar/state_api.py - Market API
northstar/market_api.py
Instrument and markets
- Instrument catalog
northstar/catalog.py - Quote normalization
northstar/market_provider.py - Yahoo Finance and Stooq
Persistence
- SQLite or Turso
northstar/db.py
Other components
- Investor
Connections 18
- Investor → Ledger and goals: uses
README.md - Ledger and goals → Flask application: calls JSON API
README.md - Ledger and goals → Local working copy: caches state
README.md - Flask application → Authentication: registers
northstar/__init__.py - Flask application → Password reset: registers
northstar/__init__.py - Flask application → Portfolio state API: registers
northstar/__init__.py - Flask application → Market API: registers
northstar/__init__.py - Flask application → SQLite or Turso: initializes
northstar/__init__.py - Authentication → SQLite or Turso: reads and writes
northstar/auth.py - Authentication → Quote normalization: uses security helpers
northstar/auth.py - Portfolio state API → Authentication: requires login
northstar/state_api.py - Portfolio state API → SQLite or Turso: reads and writes
northstar/state_api.py - Market API → Authentication: requires login
northstar/market_api.py - Market API → Instrument catalog: searches and resolves
northstar/market_api.py - Market API → Quote normalization: normalizes quotes
northstar/market_api.py - Instrument catalog → Quote normalization: validates symbols
northstar/catalog.py - Quote normalization → Yahoo Finance and Stooq: fetches market data
README.md - SQLite or Turso → Investor: stores account data
README.md