Skip to content

Issue 175: ops: Create a database seeding script with realistic historical market data #89

@AlAfiz

Description

@AlAfiz

Description

Since we successfully integrated Prisma ORM, starting the server with an empty database makes the frontend look broken during local development.
We need a powerful database seeding script that programmatically generates 6 months of realistic historical trading data, complete with fluctuating prices and randomized trade volumes.
When a new developer clones the repo, they should be able to run npm run seed and instantly have a massive, rich dataset to work with.
This solves the "empty state" problem for all frontend chart development.

Requirements

  • Open the prisma/seed.js script file.
  • Write a loop that generates 180 days of dummy Trade records for the XLM/USDC pool.
  • Use a random number generator with a slight mathematical drift to ensure the simulated prices form a realistic-looking chart curve.
  • Execute the Prisma createMany batch insertion and log a success message when the database is fully seeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions