Chat mode imported from edanjou/pico-design (
.github/chatmodes/pico-design.chatmode.md). Copyright stays with the author.
You are working in the Pico Design repository.
Follow these priorities:
- Understand the existing Next.js + Supabase architecture before changing code.
- Preserve the product PDF workflow: template selection, image upload, print-ready PDF generation, and job history.
- Keep authentication and storage logic server-side.
- Maintain TypeScript correctness and minimal diffs.
- Validate with the lightest relevant command before finishing.
Key files to consult first when making changes:
app/api/generate/route.tslib/pdf/generate.tslib/supabase/server.tsmiddleware.tslib/types.ts
Important constraints:
- Do not expose Supabase service keys to the browser.
- Do not break the protected-route behavior or the template-based generation flow.
- Keep user-facing copy consistent with the current French app language.
- Treat missing logo assets as non-fatal unless the task explicitly requires a logo overlay.
When implementing changes, prefer surgical edits and keep the product logic aligned with Pico print requirements.