Civic empowerment platform for referencing Supreme Court rulings and enacted legislation to support political strategy, checks on power, and legislative drafting.
Democratize access to legal and legislative intelligence - giving campaigns and citizens the same analytical capabilities that well-funded lobbying firms have.
- Prevent abuse - Reference precedents to identify and challenge governmental overreach
- Check power - Understand the legal landscape for accountability
- Draft legislation - Learn from laws that survived judicial review
- Inform strategy - Support electoral, advocacy, and litigation efforts
| Source | Description | Status |
|---|---|---|
| Library of Congress - US Reports | Official bound volumes of Supreme Court decisions | Planned |
| supremecourt.gov Slip Opinions | Recent decisions (2018-present) | Planned |
| US Reports Archive | Historical bound volumes | Planned |
| Source | Description | Status |
|---|---|---|
| Congress.gov API | Official API for bills, laws, votes, members | Planned |
| Enacted Legislation | Public laws | Planned |
- Congress.gov API integration
- Supreme Court opinion scraper
- Citation parser (link cases <-> laws)
- Local database storage
- Full-text search across cases and laws
- Citation lookup
- Topic/keyword filtering
- CLI interface
- Pattern detection (what makes laws survive challenges)
- Network analysis (sponsor coalitions, citing patterns)
- Timeline/trend visualization
- Natural language queries
- Draft assistance from precedents
- Legal risk assessment
Current Phase: Private development with Bay Tides as test user for conservation advocacy use cases.
Future: Broader public release for campaigns and citizens.
civitas/
├── src/
│ └── civitas/
│ ├── __init__.py
│ ├── congress/ # Congress.gov API integration
│ ├── scotus/ # Supreme Court data ingestion
│ ├── db/ # Database models and storage
│ ├── search/ # Search functionality
│ └── analysis/ # Analysis tools
├── tests/
├── data/ # Local data storage (gitignored)
├── docs/ # Documentation
└── scripts/ # Utility scripts
- Create/activate the Python venv and install deps as needed.
- Run tests:
./venv/bin/python -m pytest -q
cd web
npm ci
npm run dev
This project deploys the Next.js app to Cloudflare Pages via GitHub Actions:
- Workflow:
.github/workflows/deploy.yml - Build:
npm run buildinweb/ - Cache cleanup:
.next/cacheremoved before deploy to avoid the 25 MiB file limit - Deploy command:
wrangler pages deploy web/.next --project-name=civitas
Required secrets/vars:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDNEXT_PUBLIC_API_URL
Target: WCAG 2.2 AA.
Implemented practices include:
- Skip link to main content
- Programmatic labels for form inputs
- Button groups with
aria-pressedstate - Decorative icons marked
aria-hidden - Reduced motion support for animated UI elements
Recommended checks:
- Keyboard-only navigation and focus visibility
- Screen reader smoke test (NVDA/VoiceOver)
- Color contrast review on badge/status colors
TBD
Currently in private development. Contribution guidelines will be added for public release.