# Roadmap

## Near Term (0-4 weeks)

- Stabilize watchlist rendering and refresh consistency under API rate limits.
- Add a dedicated "Diagnostics" section in UI for health state and last error.
- Add preference schema versioning/migration logic.
- Add export/import for watchlists and preferences.
- Add markdown lint and basic CI checks for docs.

## Short Term (1-3 months)

- Refactor single-file script into modules:
  - `state.js`
  - `api.js`
  - `render.js`
  - `watchlists.js`
  - `diagnostics.js`
- Introduce unit tests for pure logic paths (formatting, preference mapping, selection routing).
- Introduce integration smoke tests for key UI flows.
- Add request throttling and optional retry policy for quote fetches.

## Mid Term (3-6 months)

- Add backend proxy option for API key protection.
- Add user profiles and cloud-synced watchlists.
- Add richer market views (sector heatmap, portfolio summary, alerts).
- Improve accessibility (keyboard nav, contrast checks, aria labels).

## Long Term (6+ months)

- Move to TypeScript for stronger contracts.
- Add plugin architecture for data providers beyond Finnhub.
- Introduce release pipeline with versioned artifacts and release notes.

## Quality Goals

- Zero uncaught runtime exceptions in core flows.
- Deterministic refresh behavior with clear observability.
- Reproducible issue triage with structured logs.
