@snaplet/seed
TypeScript icon, indicating that this package has built-in type declarations

0.96.1 • Public • Published
Seed by Snaplet logo

No data? No problem!

Automatically seed your database with production-like dummy data based on your schema for local development and testing.

Automated values

Automated values
Seed automatically determines the values in your database so you don’t have to define each and every value unless you want to be specific, in which case you just use Typescript to define those values. Our default data automatically adds necessary built-ins, like country lists, currency codes etc.

Automated relationships

Automated relationships

Seed automatically creates relational entities so you don’t have to keep track of IDs in one table when you’re defining values in another.

Type-safe by default

await seed.posts([{
  title: "Why you need Seed",
  author: {
    email: "snappy@snaplet.dev",
  },
  comments: (x) => x(3),
}]);

Seed creates a TypeScript client based off your database structure. Values are safe, and soft documented. You have the full power of the typescript language and the rich node.js infrastructure when seeding production-like data and defining data values.

Deterministic data

Deterministic data

Seed uses Copycat for its data generation functions, and all data generation is fully deterministic. That means if you use the same inputs, you'll always get the same data outputs. That makes seed great for consistent tests and development.

Try out Seed

npx @snaplet/seed init

Learn more by reading our documentation.

Readme

Keywords

none

Package Sidebar

Install

npm i @snaplet/seed

Weekly Downloads

13,960

Version

0.96.1

License

FSL-1.1-MIT

Unpacked Size

977 kB

Total Files

330

Last publish

Collaborators

  • avallete
  • jgoux
  • justinvdm
  • peter.pistorius