feat(db): deterministic full-scenario seed shared by local dev and dashboard e2e
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
Línea de trabajo
Start with packages/db/src/seed.ts and apps/dashboard/app/api/test/e2e/clickhouse/route.ts to compare the existing generators, then read packages/db/src/test-env.ts for the loopback safety pattern. Review the Drizzle schema and ClickHouse row types before defining the shared scenario engine. Done means the CLI and e2e use one deterministic generator and an integration test runs the small scenario against test databases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
@izadoesdev
Problem
Most dashboard pages can't be checked locally without setting data up by hand:
bun run db:seed <WEBSITE_ID> [EVENT_COUNT](packages/db/src/seed.ts) writes onlyevents,outgoing_links,error_spans, andweb_vitals_spans. It creates no custom events, revenue, profiles, or uptime history, and no Postgres rows, so goals, funnels, flags, monitors, alarms, and links pages stay empty.- Paths are picked at random per event, so any funnel or goal defined on top of the data shows near-zero, meaningless conversion.
- It never calls
faker.seed, so every run produces different data and screenshots can't be compared. - Dashboard e2e has a second, separate generator in
apps/dashboard/app/api/test/e2e/clickhouse/route.ts, so the two drift independently.
Proposal
One deterministic scenario engine in @databuddy/db, used by both the CLI and e2e:
bun run db:seed --scenario saas --email [email protected] [--size small|large] [--days 90] [--seed 42] [--reset]
- Ownership: attaches a "Demo" organization and website to an existing local user found by email, so it never bypasses Better Auth. The current
db:seed <WEBSITE_ID> [EVENT_COUNT]form keeps working. - A coherent story: a fictional SaaS whose sessions follow a journey model (landing → pricing → signup → onboarding → upgrade) with realistic drop-off, so seeded goals and funnels show real conversion. On top of that:
- matching custom events and revenue for upgrades
- identified profiles
- an error spike after a deploy annotation
- web vitals per page
- an uptime monitor with history and one incident, plus alarms
- flags, links, and AI crawler traffic
- Relative to now: dates are anchored to the current time so default date ranges always show data, and a fixed
--seedgives identical output across runs. - Safe: refuses to run unless
DATABASE_URLandCLICKHOUSE_URLpoint at a loopback host, likepackages/db/src/test-env.tsdoes. - Can't rot silently: inserts are typed against the Drizzle schema and ClickHouse row types, and an integration test runs the small scenario against the test databases in CI.
Delivery plan
- Engine plus web analytics: events, custom events, goals, funnels, revenue, profiles, errors, vitals.
- Uptime, alarms, status page, links, and flags.
- Point the e2e ClickHouse route at the engine and delete its generator.
Questions
- Is SaaS the right story, or would you rather have e-commerce?
- Are two sizes (
smallfor UI work,largefor query performance) worth it, or is one enough? - Should step 3 happen at all, or do you want e2e data kept separate on purpose?
Disclosure: I used Claude Code to compare the seed and e2e generators and to draft this write-up; I verified the file references by hand.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.2k
- Forks
- 220
- Merge medio
- 12 h 12 min
- PR fusionados (30 d)
- 295
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de databuddy-analytics/Databuddy
-
fix(dashboard): connecting one social identity shows loading on all provider buttonsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
databuddy-analytics/Databuddy#1106 ·
Los mantenedores suelen responder en 1 día
-
fix(dashboard): custom profile photo URL never renders, falls back to initialsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
databuddy-analytics/Databuddy#1104 ·
Los mantenedores suelen responder en 1 día
-
feat(dashboard): add Next.js and TanStack installation snippets to tracking setupPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
databuddy-analytics/Databuddy#1097 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
databuddy-analytics/Databuddy#1092 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
SDK cached reads still revalidate when evaluation is disabled or pendingPosiblemente ocupada @mvanhorn la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
databuddy-analytics/Databuddy#1091 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de databuddy-analytics/Databuddy
Issues similares
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferencePosiblemente ocupada @alok-108 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/playwright#43263 ·
Los mantenedores suelen responder en 1 día
-
bug priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
lingdojo/kana-dojo#32018 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
paperclipai/paperclip#15751 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
BuilderIO/agent-native#7275 ·
Los mantenedores suelen responder en 1 día