← back to Patty

CLAUDE.md

44 lines

# Patty - The Petition Specialist

## Project Info
- **Directory**: /root/Projects/Patty/
- **Port**: 7460 | **PM2**: patty-petitions
- **Database**: connection string lives in `.env.local` (DATABASE_URL); use `dw_admin@127.0.0.1:5432/patty`. NEVER commit credentials to docs.
- **Auth**: admin / (AUTH_PASSWORD env — see .env.local; no longer hardcoded)
- **Stack**: Next.js 16 (App Router) + Tailwind 4 + PostgreSQL

## Purpose
AI-powered petition creation, advocacy campaigns, and signature collection platform.
Features: trending topic discovery, petition templates, email campaigns, compliance tracking.

## Key Files
- lib/db.ts -- Postgres pool
- lib/auth.ts -- Cookie auth (patty-auth cookie)
- lib/audit.ts -- Audit logger
- db/schema.sql -- Full schema

## Database Tables
- users -- User accounts (Google OAuth planned)
- petitions -- Petition content and metadata
- signatures -- Petition signatures with dedup
- email_subscribers -- Email list management
- email_campaigns -- Campaign tracking
- trending_topics -- AI-curated trending topics
- petition_templates -- Reusable petition templates
- audit_events -- Activity log

## Design System
- Primary: #7c3aed (violet-600)
- Primary Hover: #6d28d9 (violet-700)
- Secondary: #a78bfa (violet-400)
- Dark theme with --color-bg: #0a0a12

## Sidebar Tabs
1. My Petitions (Megaphone)
2. Trending Topics (TrendingUp)
3. Campaigns (Mail)
4. Subscribers (Users)
5. Templates (FileText)
6. Compliance (Shield)
7. Settings (Settings)