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.
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
- Python 3.12+
- PostgreSQL database
- OpenAI API key (for newsletter generation)
- Postmark API key (for email delivery)
-
Clone and install:
git clone <your-repo> cd prediction-market-news python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure environment: Create an
env.shfile with your API keys: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"
-
Start development servers:
source env.sh ./dev.sh # Starts both React frontend and FastAPI backend
# 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 --confirmDeploy to Railway as a single full-stack service:
-
Environment variables:
OPENAI_API_KEYPOSTMARK_API_KEYDATABASE_URLBASE_URL
-
Single container runs both web app and cron scheduler
-
Automated newsletters sent every Friday at 6 PM PST to all subscribers