Skip to content

[Testing] Database Seeding Engine for Deterministic Local Environments #169

Description

@AlAfiz

Description: Develop a CLI seeding script (npm run seed) that populates the local development database with deterministic, realistic historical protocol data (users, pools, and thousands of swaps).
Context / Motivation: Frontend developers and new open-source contributors need a fully populated local API to work on charting or UI features without having to manually trigger hundreds of on-chain transactions first.
Acceptance Criteria: - [ ] Create a seeding script utilizing the project's ORM (Prisma/TypeORM).

  • Generate mock users, 3 distinct liquidity pools, and at least 5,000 historical swap records spread across a 30-day simulated timeline.
  • Ensure the script idempotently clears existing local data before applying the new seed to prevent primary key collisions.
    Technical Pointers: Use a library like faker.js to generate realistic Stellar G-addresses and randomized (but mathematically valid) swap amounts. Wrap the massive array of inserts in a single database transaction to speed up the seeding execution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions