{"id":30642437,"url":"https://github.com/napoii/alphapulse-ai","last_synced_at":"2026-05-07T04:43:45.950Z","repository":{"id":311373055,"uuid":"1043516442","full_name":"NapoII/AlphaPulse-AI","owner":"NapoII","description":"📈 Grounded daily market brief with citations 🔗 + 🤖 AI Buy/Sell signals. Built as a 🧪 Flask app with 🔄 SSE progress, 📰 Yahoo Finance news, 📊 yfinance indicators, and a sleek 🌙 dark UI.","archived":false,"fork":false,"pushed_at":"2025-08-24T03:03:31.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T12:02:45.370Z","etag":null,"topics":["flask","flask-application","investing","openai","openai-api","trading","webapp","yahoo-finance","yahoo-finance-api","yfinance","yfinance-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NapoII.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-24T02:58:01.000Z","updated_at":"2025-08-24T03:06:58.000Z","dependencies_parsed_at":"2025-08-24T12:02:49.998Z","dependency_job_id":"e2c8f9c8-593d-4cae-b8a1-861a43ae57ba","html_url":"https://github.com/NapoII/AlphaPulse-AI","commit_stats":null,"previous_names":["napoii/alphapulse-ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NapoII/AlphaPulse-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NapoII%2FAlphaPulse-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NapoII%2FAlphaPulse-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NapoII%2FAlphaPulse-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NapoII%2FAlphaPulse-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NapoII","download_url":"https://codeload.github.com/NapoII/AlphaPulse-AI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NapoII%2FAlphaPulse-AI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272931799,"owners_count":25017435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","flask-application","investing","openai","openai-api","trading","webapp","yahoo-finance","yahoo-finance-api","yfinance","yfinance-api"],"created_at":"2025-08-31T02:35:57.871Z","updated_at":"2026-05-07T04:43:40.912Z","avatar_url":"https://github.com/NapoII.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaPulse‑AI — Market Brief \u0026 AI Signals (Flask)\r\n\r\nAlphaPulse‑AI is a compact Flask app that crawls Yahoo Finance headlines for selected tickers, fetches basic indicators via yfinance, and asks OpenAI to produce a grounded Daily Brief in Markdown with numbered citations to real sources. It also returns a JSON block of Buy/Sell signals with short reasons. The UI renders the Markdown, shows signal buttons linking to Yahoo Finance, includes a live “time since last update” counter, and provides a streaming progress overlay when you run a new analysis.\r\n\r\nWhy it stands out:\r\n- Grounded Daily Brief with inline citations [n] mapped to a numbered Sources list\r\n- Clean, dark “glass” UI with a centered header and a live “last updated” counter\r\n- One‑click Run with a real‑time progress overlay (SSE) and step‑by‑step logs\r\n- Login‑protected dashboard and API key setup/validation page\r\n- Results are persisted and shown until you choose to run again\r\n\r\n## Features\r\n\r\n- News: Yahoo Finance RSS + lightweight search, deduplicated per ticker\r\n- Indicators: yfinance for price/prev_close/change %, market cap, PE, etc.\r\n- LLM: OpenAI chat completions produce:\r\n  - Markdown report containing:\r\n    - Daily Brief (4–7 sentences) with inline numeric citations [1], [2], …\r\n    - Optional Key Indicators section (only if any values exist)\r\n    - Per‑ticker insights referencing news/indicators with citations\r\n    - Numbered Sources list (1..N) from the provided news URLs\r\n  - JSON object: { \"signals\": [{ ticker, name, action, reason }...] }\r\n    - Reasons are concise and tie back to the cited sources (e.g., mentions [2])\r\n- UI/UX:\r\n  - Live count‑up badge for “time since last update” (seconds → minutes → hours → days)\r\n  - “Run now” starts a streaming run with a progress bar and live logs\r\n  - Signal buttons open Yahoo Finance pages for the recommended tickers\r\n  - News list with ticker badges linking to Yahoo quote pages\r\n\r\n## Quickstart (Windows PowerShell)\r\n\r\nRequirements: Python 3.10+ recommended.\r\n\r\n1) Create and activate a virtual environment\r\n\r\n```powershell\r\npython -m venv .venv\r\n. .venv\\Scripts\\Activate.ps1\r\n```\r\n\r\n2) Install dependencies\r\n\r\n```powershell\r\npip install -r requirements.txt\r\n```\r\n\r\n3) Optional: set environment variables (you can also enter the OpenAI key in the app)\r\n\r\n```powershell\r\n$env:SECRET_KEY = \"change-me\"            # Flask session secret\r\n$env:APP_USERNAME = \"admin\"              # Demo login (override for prod)\r\n$env:APP_PASSWORD = \"admin123\"\r\n# LLM settings\r\n$env:OPENAI_MODEL = \"gpt-4o-mini\"\r\n$env:OPENAI_API_BASE = \"https://api.openai.com/v1\"\r\n# Don’t auto-run on startup (default behavior)\r\n$env:RUN_ON_STARTUP = \"0\"\r\n```\r\n\r\n4) Run the app\r\n\r\n```powershell\r\npython run.py\r\n```\r\n\r\nOpen http://localhost:5000, log in with the credentials above, then:\r\n- If no API key is stored yet, you’ll be taken to the “API Key” page to save and validate it.\r\n- Click “Run now” to start a new analysis. You’ll see a loader with a progress bar and live logs.\r\n- When it completes, the page refreshes with the newest Markdown brief and signals.\r\n\r\n## Configuration \u0026 Data\r\n\r\n- OpenAI key: stored locally in `data/openai_api_key.txt` via the in‑app form, validated via `GET /v1/models`.\r\n- Results: last output lives in `data/last_run.json` and the AI‑only payload in `data/openai_output.json`.\r\n- Indicators: if all are unavailable, the “Key Indicators” section is omitted from Markdown.\r\n- Tickers: the run prioritizes tickers from your previous signals; if none exist, it auto-discovers trending tickers from Yahoo (region US). No DEFAULT_TICKERS are required.\r\n- The app shows the last saved results by default; it only calls external APIs when you click “Run now”.\r\n\r\n## Project Structure\r\n\r\n```\r\nAlphaPulse-AI/\r\n  app/\r\n    __init__.py           # App factory, blueprints\r\n    auth.py               # Simple login\r\n    routes.py             # Pages, /run and /run-stream (SSE)\r\n    services/\r\n      news_crawler.py     # Yahoo Finance RSS/search\r\n      openai_summarizer.py# Prompt \u0026 parsing (Markdown + JSON signals)\r\n      yfinance_utils.py   # Daily indicators\r\n  templates/\r\n    base.html             # Centered header + layout\r\n    login.html\r\n    index.html            # Dashboard, live counter, SSE overlay\r\n  static/\r\n    css/styles.css        # Dark “liquid glass” theme\r\n  data/                   # Saved outputs \u0026 API key\r\n  run.py                  # Entry point\r\n  requirements.txt\r\n```\r\n\r\n## Notes \u0026 Limitations\r\n\r\n- Authentication is minimal and in‑memory—sufficient for demos. Use a proper user store for production.\r\n- Yahoo and yfinance can rate‑limit or occasionally fail; the app falls back gracefully (e.g., omitting indicators section).\r\n- The Daily Brief strictly cites only the provided URLs; broaden crawlers if you want richer macro coverage.\r\n- SSE requires a compatible reverse proxy configuration if you deploy behind Nginx/Apache. Disable buffering for `/run-stream`.\r\n\r\n## Troubleshooting\r\n\r\n- “OpenAI key missing/invalid”: Go to the API Key page and save a valid key; we validate with `/v1/models`.\r\n- Indicators all “not available”: yfinance may be rate‑limited; try again later or cache results.\r\n- SSE doesn’t update: Check browser console and ensure your proxy doesn’t buffer SSE.\r\n\r\n## License\r\n\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapoii%2Falphapulse-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnapoii%2Falphapulse-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapoii%2Falphapulse-ai/lists"}