Automatically seed your database with production-like data based on your schema for for local development and testing.
Snaplet seed is like a seed script but way better: faster, easier to maintain and perfect for coding locally and unit testing.
Snaplet 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.
Snaplet 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
Snaplet 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.
title: ‘Why you need seed’,
// Create 3 comments linked to post
Comment: (x) => x(3),
Snaplet 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.
Seed vs Snapshot?
Snaplet is a composable tool, which means there are many ways to use it. You might want to start off with
and later you might need to use a snapshot. A snapshot is an anonymized sample of your production database that you can code, test and debug against. Snapshots are great for getting production-like data into your E2E environments so you can reproduce and fix bugs faster. If you need help figuring out which option is best for you, chat to us
, and we’ll gladly assist.->Read more about snapshots
- OR - ->Create your first snapshot!