Stack cloud pour applis IA — Maîtrise7 / 8
Secrets, Env & Config Across Environments
Five services, three environments, one leaked key away from a bad week. Config discipline is unglamorous and non-negotiable.

A five-service stack means a pile of keys, in three environments, with exactly one rule you cannot break. This is the unglamorous discipline that prevents a very bad week.
The public/secret boundary
Know which keys are publishable (Stripe pk_, Supabase anon key — safe in the client) and which are secret (sk_, service-role — server only).
Per-environment keys
Use separate keys per environment: Stripe test vs. live, a dev Supabase project vs. prod. Vercel scopes env vars to Preview / Production — set them there, not in code. A test key in production (or worse, the reverse) is a classic outage.
Never commit a secret
Keep secrets in .env.local (git-ignored) and in the platform's env settings — never in the repo. If a key ever lands in git history, rotate it; deleting the commit isn't enough.
Config done. Finale: the wiring playbook that ships the whole thing in days.
Série — Stack cloud pour applis IA — Maîtrise
- Partie 01La pile technologique IA pragmatiqueChoisir une infrastructure, c'est où disparaissent les semaines. Voici une pile par défaut qui permet à une petite équipe de livrer un produit IA en quelques jours — et quand s'en écarter.
- Partie 02Next.js sur Vercel — La couche applicativeUn framework pour l'UI, l'API et le rendu serveur ; une plateforme qui déploie au git push. La couche applicative est celle à laquelle vous ne devez jamais penser.
- Partie 03Supabase — Postgres, Auth & Storage in OneReal Postgres, auth, file storage and pgvector behind one SDK. For an AI product, having your data and your vectors in the same database is a quiet superpower.
- Partie 04Stripe — Payments & SubscriptionsFacturer de l'argent est un problème résolu — si vous laissez Stripe le résoudre. Checkout, abonnements, et le webhook qui est la véritable source de vérité.
- Partie 05Resend — Email transactionnel qui arriveLe reçu, le lien de téléchargement, la réinitialisation de mot de passe — s'ils finissent en spam, votre produit semble cassé. La délivrabilité est une fonctionnalité.
- Partie 06AWS — Quand vous dépassez la voie managéeLa stack managée couvre 90 % d'un produit IA. AWS est l'échappatoire pour les 10 % restants — les jobs longs, l'inférence GPU, les gros fichiers. Utilisez-le de manière chirurgicale.
- Partie 07Secrets, Env & Config Across Environments — vous êtes iciFive services, three environments, one leaked key away from a bad week. Config discipline is unglamorous and non-negotiable.
- Partie 08Shipping in Days — The Wiring PlaybookThe whole stack assembled into a build order: from empty repo to a paid, emailing, AI-powered product in a working week.