Repository navigation
Batch 1: foundation (package layout, cuts, one-click install, tests, CI) - #1
Merged
Merged
Conversation
Restructure the hackathon prototype into a maintainable personal app. - Split the 2,100-line main.py into the watchstock/ package: app factory, routes (stocks, market, personal), services (snapshot freshness), scoring (pure functions), analysis (LLM prompts), store/db (SQL + migrations), and providers/ as the only network layer (yahoo via yfinance, openrouter). - Remove multi-user accounts/login, admin CRUD endpoints, sentence-transformers (+PyTorch), NewsAPI and the Elasticsearch-era docs. News now comes from yfinance; search and screeners go through yfinance too. - Fix: data was served from the DB forever. Snapshots now expire after 4h, carry `as_of`, and fall back to the last snapshot (flagged stale) if Yahoo fails. - Fix: failed fetches and failed/invalid LLM replies were persisted. They are now returned as 502s with a readable message and never stored. - Fix: yfinance and LLM calls blocked the event loop. They run in threads. - Fix: chat sent the question twice. Fix: AI report links rendered as "undefined" (marked >= 13 renderer API). - AI reports are stored separately with model + timestamp; the UI requests one after the dashboard loads instead of blocking the search on the LLM. - Packaging: pyproject + uv.lock; start.bat installs uv and runs the app, uv fetches Python itself. Server binds 127.0.0.1 only, no auto-reload. - 40 pytest tests with fake providers, ruff, GitHub Actions on Ubuntu + Windows. - scripts/fake_server.py + scripts/ui_smoke.js for UI work without network. - Docs: CLAUDE.md, docs/HANDOFF.md, docs/ARCHITECTURE.md, docs/DECISIONS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TW7cJeWrcBW5SJHr4ZKtSH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TW7cJeWrcBW5SJHr4ZKtSH
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of five batches turning the hackathon prototype into a personal tool. Plan and status:
docs/HANDOFF.md. Rationale:docs/DECISIONS.md.What changed
main.pysplit into thewatchstock/package. All network access goes throughwatchstock/providers/(yfinance, OpenRouter). Seedocs/ARCHITECTURE.md.start.batis now the only step. It installsuv, which fetches Python and the pinned deps (uv.lock). The server listens on 127.0.0.1 only.Not in this batch (on purpose)
Scoring formulas are unchanged except the news penalty, which needed the embedding model. Formula fixes are batch 2. Frontend split, vendored libs and DOMPurify are batch 3.
Needs live testing on Windows
Checklist in
docs/HANDOFF.mdunder "Needs live testing".Generated by Claude Code