From a9a582ca16f3e1715865db3199a9f64db2c85f53 Mon Sep 17 00:00:00 2001 From: jeffgicharu Date: Tue, 19 May 2026 04:28:22 +0300 Subject: [PATCH] fix(seed): spread paid invoices so revenue chart isn't a final-month spike MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The paid-invoice month weighting front-loaded the current month, so the dashboard Monthly Revenue chart showed the (partial) current month at ~2.5x every prior full month — reading as 'seed dumped recent data' rather than a real business. Rebalanced so paid invoices spread across the trailing 6 months with only a partial current month. --- apps/api/src/database/seeds/seed.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/api/src/database/seeds/seed.ts b/apps/api/src/database/seeds/seed.ts index 8b07aa3..a9e0090 100644 --- a/apps/api/src/database/seeds/seed.ts +++ b/apps/api/src/database/seeds/seed.ts @@ -226,7 +226,10 @@ async function demoSeed() { }> = []; let invoiceNum = 0; let invoiceCount = 0; - const PAID_MONTHS = [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 5]; // weighted toward recent months + // Spread paid invoices fairly evenly across the trailing 6 months with a + // gentle mid-window bump and only a partial current month, so the revenue + // chart reads like an established business rather than a final-month spike. + const PAID_MONTHS = [0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5]; for (const eng of engagementMap) { const count = randomBetween(2, 5); for (let i = 0; i < count; i++) {