{"id":31057296,"url":"https://github.com/sshh12/reality-index","last_synced_at":"2025-09-15T06:56:39.220Z","repository":{"id":309281610,"uuid":"1035267161","full_name":"sshh12/reality-index","owner":"sshh12","description":"An automated system that analyzes prediction market data from Polymarket and generates AI-powered newsletters about significant market movements and global events.","archived":false,"fork":false,"pushed_at":"2025-09-06T20:20:32.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T20:35:06.023Z","etag":null,"topics":["ai-newsletter","newsletters","polymarket"],"latest_commit_sha":null,"homepage":"https://reality-index.sshh.io/","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/sshh12.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-10T02:48:04.000Z","updated_at":"2025-09-06T20:20:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"8070cf76-6fef-4942-8ebe-e8078db1f436","html_url":"https://github.com/sshh12/reality-index","commit_stats":null,"previous_names":["sshh12/prediction-market-news","sshh12/reality-index"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sshh12/reality-index","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2Freality-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2Freality-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2Freality-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2Freality-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshh12","download_url":"https://codeload.github.com/sshh12/reality-index/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2Freality-index/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275219540,"owners_count":25425889,"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-09-15T02:00:09.272Z","response_time":75,"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":["ai-newsletter","newsletters","polymarket"],"created_at":"2025-09-15T06:56:35.636Z","updated_at":"2025-09-15T06:56:39.212Z","avatar_url":"https://github.com/sshh12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Reality Index Newsletter\n\nAn AI-powered subscription newsletter service that analyzes prediction market data to deliver insights on what will actually happen across politics, tech, crypto, sports, economics, and culture.\n\n\u003cimg width=\"902\" height=\"650\" alt=\"Screenshot 2025-08-10 at 5 06 33 PM\" src=\"https://github.com/user-attachments/assets/7c1d3361-8dce-483a-a913-078f3aa0881e\" /\u003e\n\n\n## What This Does\n\nA full-stack web application with subscription management that delivers personalized prediction market insights:\n\n- **React subscription interface** where users choose from 8 topic categories\n- **Database-backed user management** with topic-based segmentation\n- **AI-generated newsletters** that analyze thousands of prediction markets\n- **Automated weekly delivery** every Friday at 6 PM PST\n- **Newsletter archive** with preview functionality\n\n## Quick Start\n\n### Prerequisites\n- Python 3.12+\n- PostgreSQL database\n- OpenAI API key (for newsletter generation)\n- Postmark API key (for email delivery)\n\n### Development Setup\n\n1. **Clone and install:**\n   ```bash\n   git clone \u003cyour-repo\u003e\n   cd prediction-market-news\n   python -m venv .venv\n   source .venv/bin/activate\n   pip install -r requirements.txt\n   ```\n\n2. **Configure environment:**\n   Create an `env.sh` file with your API keys:\n   ```bash\n   export OPENAI_API_KEY=\"your-openai-key\"\n   export POSTMARK_API_KEY=\"your-postmark-key\"  \n   export DATABASE_URL=\"postgresql://user:pass@host:port/dbname\"\n   export BASE_URL=\"https://your-domain.com\"\n   ```\n\n3. **Start development servers:**\n   ```bash\n   source env.sh\n   ./dev.sh  # Starts both React frontend and FastAPI backend\n   ```\n\n### Usage\n\n```bash\n# Start web application\npython main.py web --reload\n\n# Generate test newsletter\npython main.py test-newsletter tech ai\n\n# List archived newsletters\npython main.py list-newsletters\n\n# Delete newsletter by ID\npython main.py delete-newsletter 123 --confirm\n```\n\n## Deployment\n\nDeploy to Railway as a single full-stack service:\n\n1. **Environment variables:**\n   - `OPENAI_API_KEY`\n   - `POSTMARK_API_KEY` \n   - `DATABASE_URL`\n   - `BASE_URL`\n\n2. **Single container** runs both web app and cron scheduler\n\n3. **Automated newsletters** sent every Friday at 6 PM PST to all subscribers\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshh12%2Freality-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshh12%2Freality-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshh12%2Freality-index/lists"}