Skip to content

F12: Demo seed data — Seed:Demo flag for dev/demo environments #58

Closed

Description

@mforce

Part of Phase 1.1 (epic #14). A dev-DB wipe currently leaves every screen empty until data is re-clicked by hand; demos start from nothing.

Trigger

  • Config flag Seed:Demo (env Seed__Demo=true in deploy/.env, or user-secrets for local debug). Default false — never on unless explicitly set; prod cannot accidentally get fake data.
  • DatabaseSeeder runs it after the normal seed, gated on the account having no flocks (same empty-catalog guard as grade seeding): runs once on a fresh DB, no-op on a populated one, never resurrects deleted data.

Seeds

  • 2–3 flocks at different ages (e.g. 20wk/45wk layers + one depleted historical flock).
  • A handful of customers.
  • ~1 week of submitted daily entries per active flock — production by grade, losses, some mortality — so lots, stock, and bird-movement rows all exist through the real domain path (use the handlers/domain methods, not raw inserts).
  • One confirmed sales order (FIFO allocation exercised) + one open draft.

Acceptance

  • Fresh DB + Seed__Demo=true → every screen (dashboard, daily entry, flocks incl. ledger, stock, customers, sales, history, grades) shows plausible data on first login.
  • Second startup: no duplicates (guard respected).
  • Flag absent/false → behavior identical to today.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions