Ga naar hoofdinhoud

Seed Data Architecture

How Gauzy seeds initial data for demo, testing, and production environments.

Overview​

Gauzy seeds the database on first launch with essential reference data:

  • Countries and currencies
  • Languages
  • Default roles and permissions
  • Feature definitions
  • Report categories
  • Organization settings

Seed Types​

TypeWhen UsedDescription
DefaultAlwaysEssential reference data
DemoDemo/dev modeSample organizations, employees, tasks
RandomTestingRandom generated test data
ProductionFirst deployMinimal bootstrap data

Seed Configuration​

Controlled via environment variables:

VariableValuesDefault
DEMOtrue / falsefalse
SEED_DEMO_DATAtrue / falsefalse

Seed Order​

Seeds execute in dependency order:

Creating Custom Seeds​

export class MySeed implements ISeedModule {
async createDefault(dataSource: DataSource): Promise<void> {
// Seed default data
}

async createRandom(
dataSource: DataSource,
tenants: ITenant[],
): Promise<void> {
// Seed random/demo data
}
}