- Update CLAUDE.md with full project structure and conventions - Add report viewer page: score ring, WCAG compliance cards, issue list with severity filter, next steps, export + auto-fix buttons, real-time polling - Add Alembic script.py.mako template (required for alembic revision --autogenerate) - Add frontend/tsconfig.json + postcss.config.js (Next.js build requirements) - Fix TypeScript error in supabase/server.ts (explicit CookieOptions type) - Upgrade Next.js 15.3.2 → 15.5.18 (cache poisoning CVE fix) - Update .gitignore: frontend build artifacts, backend venv, tsbuildinfo TypeScript: 0 errors (npx tsc --noEmit passes) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.2 KiB
3.2 KiB
PDF Accessibility SaaS — Claude Code Briefing
What this is
A SaaS product by Aimpress that checks PDF documents for WCAG 2.1 AA / PDF/UA-1 compliance. Regulatory tailwind: EU Accessibility Act (June 2025) requires accessible documents from banks, e-commerce, e-learning, and government.
Stack
- Backend: FastAPI + Python (single language — PHP removed)
- Frontend: Next.js 15 + shadcn/ui + Tailwind CSS
- Auth: Supabase Auth (email + magic link)
- DB: PostgreSQL 16 + Alembic migrations + Row-Level Security
- Queue: Celery + Redis
- Storage: MinIO (S3-compatible, self-hosted)
- Deploy: Docker Compose + Caddy on homelab Proxmox VM
- CI: Forgejo Actions
Core AI/Checking Engine (DO NOT MODIFY without strong reason)
enterprise_pdf_checker.py— 30+ WCAG checks, ~2000 lines, uses Claude Sonnet + Google Visionpdf_remediation.py— auto-fix enginereport_generator.py— converts JSON results → HTML/PDF report
These are the product's moat. All other files wrap them.
Project structure
PDF-accessibility-saas/
├── backend/ # FastAPI app
│ ├── app/
│ │ ├── config.py # pydantic-settings
│ │ ├── deps.py # Supabase JWT auth dependency
│ │ ├── db.py # SQLAlchemy async engine
│ │ ├── main.py # FastAPI app entry
│ │ ├── routers/ # jobs, auth, billing
│ │ ├── services/ # checker, storage, queue
│ │ └── models/ # job, workspace
│ ├── alembic/ # DB migrations
│ └── pyproject.toml # uv-based deps
│
├── frontend/ # Next.js 15
│ ├── app/
│ │ ├── (marketing)/ # Landing, Pricing (public)
│ │ ├── (auth)/ # Login, Signup (Supabase)
│ │ └── (app)/ # Dashboard, Jobs, Settings (auth-gated)
│ └── lib/supabase/ # SSR client/server helpers
│
├── enterprise_pdf_checker.py # Core WCAG engine (from Oliver, reused 1:1)
├── pdf_remediation.py # Auto-fix engine
├── report_generator.py # HTML/PDF report generator
├── docker-compose.yml # Dev: postgres, redis, minio, api, celery
├── docker-compose.prod.yml # Prod: + nextjs, caddy
├── Caddyfile # Auto-SSL for pdfaccess.ai-impress.com
└── .forgejo/workflows/ci.yml # CI: test → build → deploy
Conventions
- All env vars via
pydantic-settingsinbackend/app/config.py - Logging via
structlog(JSON in prod, pretty in dev) - HTTP clients via
httpx(async) - Migrations via
alembic— never raw ALTER TABLE in code - Auth: Supabase JWT verified in
backend/app/deps.py::get_current_user() - Every endpoint requires workspace isolation (workspace_id from JWT)
- RLS active on jobs, workspaces, workspace_members, usage_events
Branding
- Primary color:
#6366F1(indigo) - Font: Inter
- Product name: "Aimpress PDF Accessibility"
- Tagline: "WCAG-compliant PDFs in 60 seconds"
- Domain:
pdfaccess.ai-impress.com
Pricing
- Free: 5 PDF/month
- Pro ($29/mo): 100 PDF + auto-fix
- Business ($149/mo): unlimited + API + team