feat: add Fly deploy config, /review endpoint, and Supabase S3 support

↗ view on GitHub · adamwolfe2 · 2026-04-30 · cb876234

- Dockerfile: Node 22-slim + LibreOffice apt (mirrors nixpacks.toml config)
- fly.toml: mike-backend-amcollective, shared-cpu-1x @ 512MB, region iad
- routes/review.ts: POST /review - stateless doc review via Claude Haiku
  Fetches URL, extracts text (pdfjs/mammoth, same pattern as chatTools.ts),
  returns {summary, key_clauses, risks, recommendation} JSON
- middleware/serviceAuth.ts: timing-safe Bearer token auth (MIKE_SERVICE_TOKEN)
- index.ts: register /review route
- lib/storage.ts: R2_REGION env var instead of hardcoded 'auto'
  Set R2_REGION=us-east-1 for Supabase Storage S3, omit for Cloudflare R2
Repository adamwolfe2/mike-amcollective
Author adamwolfe2 <157528621+adamwolfe2@users.noreply.github.com>
Authored
Parents d9690965
Stats 6 files changed , +314 , -8
Part of Fly.io backend deploy + /review service endpoint

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-cb876234.md from inside the repo you want the change in.

⬇ Download capture-commit-cb876234.md