https://github.com/sshh12/reality-index
An automated system that analyzes prediction market data from Polymarket and generates AI-powered newsletters about significant market movements and global events.
https://github.com/sshh12/reality-index
ai-newsletter newsletters polymarket
Last synced: 10 months ago
JSON representation
An automated system that analyzes prediction market data from Polymarket and generates AI-powered newsletters about significant market movements and global events.
- Host: GitHub
- URL: https://github.com/sshh12/reality-index
- Owner: sshh12
- License: mit
- Created: 2025-08-10T02:48:04.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-09-06T20:20:32.000Z (11 months ago)
- Last Synced: 2025-09-06T20:35:06.023Z (11 months ago)
- Topics: ai-newsletter, newsletters, polymarket
- Language: Python
- Homepage: https://reality-index.sshh.io/
- Size: 198 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Reality Index Newsletter
An 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.

## What This Does
A full-stack web application with subscription management that delivers personalized prediction market insights:
- **React subscription interface** where users choose from 8 topic categories
- **Database-backed user management** with topic-based segmentation
- **AI-generated newsletters** that analyze thousands of prediction markets
- **Automated weekly delivery** every Friday at 6 PM PST
- **Newsletter archive** with preview functionality
## Quick Start
### Prerequisites
- Python 3.12+
- PostgreSQL database
- OpenAI API key (for newsletter generation)
- Postmark API key (for email delivery)
### Development Setup
1. **Clone and install:**
```bash
git clone
cd prediction-market-news
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
2. **Configure environment:**
Create an `env.sh` file with your API keys:
```bash
export OPENAI_API_KEY="your-openai-key"
export POSTMARK_API_KEY="your-postmark-key"
export DATABASE_URL="postgresql://user:pass@host:port/dbname"
export BASE_URL="https://your-domain.com"
```
3. **Start development servers:**
```bash
source env.sh
./dev.sh # Starts both React frontend and FastAPI backend
```
### Usage
```bash
# Start web application
python main.py web --reload
# Generate test newsletter
python main.py test-newsletter tech ai
# List archived newsletters
python main.py list-newsletters
# Delete newsletter by ID
python main.py delete-newsletter 123 --confirm
```
## Deployment
Deploy to Railway as a single full-stack service:
1. **Environment variables:**
- `OPENAI_API_KEY`
- `POSTMARK_API_KEY`
- `DATABASE_URL`
- `BASE_URL`
2. **Single container** runs both web app and cron scheduler
3. **Automated newsletters** sent every Friday at 6 PM PST to all subscribers