Outrage is a web application that empowers citizens to quickly and effectively contact their elected representatives about issues they care about. With AI-powered draft generation, comprehensive representative lookup, and a Chrome extension for auto-filling contact forms, Outrage makes civic engagement accessible to everyone.
- π Address-based Representative Lookup: Find all your representatives (federal, state, and local) with a single address search
- π€ AI-Powered Draft Generation: Create personalized, persuasive emails using Anthropic's Claude
- π§ Multi-Representative Contact: Send emails to multiple representatives simultaneously
- π Shareable Campaigns: Create and share campaigns to mobilize others around issues
- π₯ YouTube Integration: Automatically extracts political demands from YouTube videos via cron jobs
- π§ Chrome Extension: Auto-fills government contact forms on .gov websites
- π Campaign Analytics: Track how many messages have been sent for each campaign
- πΎ Session Persistence: Save and resume drafts across sessions
- π― Smart Representative Selection: AI suggests which representatives to contact based on your issues
Click to view application flow
- Address Input - Google Maps autocomplete for easy address entry
- Demands Selection - Browse pre-populated demands or enter custom ones
- Representative Selection - View and select from all your representatives
- Personal Info - Add optional details to strengthen your message
- Draft Preview - Review and edit AI-generated drafts before sending
- Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, PostgreSQL (Vercel Postgres/Neon)
- AI/ML: Anthropic Claude API, Apify (YouTube transcripts)
- External APIs: Google Maps, Cicero (representatives data)
- Infrastructure: Vercel (hosting), GitHub Actions (CI/CD)
- Node.js (v18 or higher)
- npm (v9 or higher)
- PostgreSQL database (local or cloud)
- API keys (see Environment Variables section)
-
Clone the repository
git clone https://github.com/mitchellgordon95/Outrage.git cd Outrage -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your API keys and configuration (see below) -
Set up the database
# Run the SQL scripts to create tables psql -d your_database -f campaigns_schema.sql psql -d your_database -f youtube_demands_schema.sql -
Start the development server
npm run dev
Open http://localhost:3456 to see the application
Create a .env.local file with the following variables:
# Database
DATABASE_URL=your_postgresql_connection_string
POSTGRES_URL=your_postgresql_connection_string
# Google APIs
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
# Cicero API (Representative Data)
CICERO_API_KEY=your_cicero_api_key
# AI/ML
ANTHROPIC_API_KEY=your_anthropic_api_key
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
APIFY_TOKEN=your_apify_token
# Chrome Extension
NEXT_PUBLIC_CHROME_EXTENSION_ID=your_extension_id
# YouTube Integration
YOUTUBE_CHANNEL_LIST=channel1,channel2,channel3
# Cron Jobs
CRON_SECRET=your_cron_secret
# Optional: Analytics
# Add Vercel Analytics or other tracking servicesThe Chrome extension enables auto-filling of government contact forms.
- Navigate to
chrome-extension/directory - Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
chrome-extensionfolder
See chrome-extension/README.md for detailed development instructions.
The application uses PostgreSQL with two main tables:
- campaigns: Stores campaign information and tracking data
- youtube_demands: Stores extracted demands from YouTube videos
See campaigns_schema.sql and youtube_demands_schema.sql for complete schemas.
- Endpoint:
/api/cron/youtube-demands - Frequency: Daily
- Function: Fetches videos from configured YouTube channels and extracts political demands
Configure in vercel.json or your hosting platform's cron configuration.
- Push your code to GitHub
- Import the project in Vercel
- Add all environment variables in Vercel dashboard
- Deploy
The application is built with Next.js and can be deployed to any platform that supports Node.js applications. Ensure you:
- Set up PostgreSQL database
- Configure environment variables
- Set up cron jobs for YouTube processing
# Run tests
npm test
# Run tests in watch mode
npm test -- --watchGET /api/demands/categories- Fetch categorized demands including YouTube sourcesGET /api/campaigns- List popular campaigns
POST /api/lookup-representatives- Find representatives by addressPOST /api/generate-representative-draft- Generate AI draftPOST /api/campaigns/create- Create new campaignPOST /api/campaigns/[id]/increment- Track message sent
See individual route files for detailed request/response schemas.
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code patterns
- Use TypeScript for type safety
- Write tests for new features
- Ensure
npm run lintpasses
This project is licensed under the MIT License - see the LICENSE file for details.
- Cicero API for comprehensive representative data
- Anthropic for Claude AI
- Apify for YouTube transcript extraction
- All contributors and users making civic engagement easier
- Issues: GitHub Issues
- Email: contact@outrage.gg
- Discussions: GitHub Discussions
Built with β€οΈ to make democracy more accessible