CLAUDE.md
# Grant - Non-Profit Fundraiser ## Project Info - **Directory**: /root/Projects/Grant/ - **Port**: 7450 | **PM2**: grant-app - **Database**: connection string lives in `.env.local` (DATABASE_URL); use `dw_admin@127.0.0.1:5432/grant_app`. NEVER commit credentials to docs. - **Auth**: admin / (AUTH_PASSWORD env — see .env.local; no longer hardcoded) + Google Sign-In (user login, future) - **Stack**: Next.js 16 (App Router) + Tailwind 4 + PostgreSQL ## Purpose AI-powered fundraising platform for non-profit organizations. Grant discovery, proposal generation, news monitoring, collaboration tracking, and outreach tools. ## Key Files - lib/db.ts -- Postgres pool - lib/auth.ts -- Cookie auth (admin + future Google OAuth) - lib/audit.ts -- Audit logger with org_id scoping - app/globals.css -- Emerald/green dark theme design tokens - components/AppShell.tsx -- Main layout with sidebar - components/AuthProvider.tsx -- Auth context provider ## Database Tables - users -- User accounts (Google OAuth + admin) - organizations -- Non-profit org profiles with onboarding - grants -- Grant opportunities with AI fit scoring - grant_proposals -- Proposal drafts (LOI, full, one-pager) - news_items -- Monitored news for the org - collaborations -- Partners (nonprofits, politicians, corporations, municipalities) - outreach_templates -- AI-generated email templates - audit_events -- Full audit trail ## Design Theme - Primary: #059669 (emerald-600) - Accent: #10b981 (emerald-500) - Dark background with emerald accents