Saltar al contenido principal

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
}
}