feat(seed): year-long demo account for the live presentation - #28
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ce que fait cette PR
Ajoute un seed dédié additif et scopé à un seul utilisateur qui pré-remplit un compte de présentation (
cedric@agricole.com) avec un an d'activité depuis janvier 2026 : revenus, dépenses (dont récurrentes matérialisées chaque mois), occurrences, budgets et chaîne de report mensuel.Pourquoi
La présentation se fait directement sur la prod (pas d'environnement de démo séparé) et il faut de la matière — notamment pour montrer la vue annuelle. Le seed dev existant (
prisma/seed.ts) commence par unuser.deleteMany()global : inutilisable contre la prod. Ce nouveau script ne supprime que les données duuserIdciblé (jamais de wipe global), upsert le compte par email, et est idempotent.Bonus : il matérialise les récurrentes mois par mois, ce qui contourne proprement le bug « récurrente rétroactive non backfillée » (décision produit séparée).
Comment tester
npm run db:seed:demo # contre koza-dev (DATABASE_URL dev)Puis se connecter
cedric@agricole.com/cedricagricole123et vérifier :?view=year) : 6 mois de tendances, courbe d'épargne croissante ;Contre la prod (string fournie hors repo) :
DATABASE_URL='<prod>' npm run db:seed:demo.Checklist
npm run test)