M4: Cloudflare R2 Storage Setup (litmus-j0d6)
Create R2 bucket litmus-screenshots with public access and custom domain. Configure CORS. Document URL scheme: {base_url}/v1/{provider}/{theme}/{fixture}.webp. Add R2 credentials to GitHub Actions secrets. Note: manual infra step, document the process.
Summary of Changes
M4 is primarily a manual infrastructure setup task. The codebase is ready for R2 integration — the manifest model, URL scheme, and upload hooks are designed.
Setup steps for the user:
- Create R2 bucket
litmus-screenshotsin Cloudflare dashboard - Enable public access with custom domain
screenshots.litmus.edger.dev - Configure CORS:
- Allowed origin:
https://litmus.edger.dev - Allowed methods: GET
- Allowed origin:
- Add GitHub Actions secrets:
R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYR2_ACCOUNT_IDR2_ENDPOINT(e.g.https://${ACCOUNT_ID}.r2.cloudflarestorage.com)LITMUS_SCREENSHOTS_BASE_URL(e.g.https://screenshots.litmus.edger.dev)
URL scheme implemented:
{base_url}/v1/{provider}/{theme}/{fixture}.webp
Cache headers to configure on the bucket:
- Images:
Cache-Control: public, max-age=31536000, immutable - manifest.json:
Cache-Control: public, max-age=3600
No code changes needed for M4 — the data model and CLI upload command are ready in M3.