1010 B
1010 B
Initialization
internal/initialize owns application bootstrap orchestration. It implements
biz.InitializationRepo, coordinates the explicit first-install workflow, and
formats the compatible runtime configuration API.
The package depends on a narrow Backend interface. *data.Data implements
that interface and remains responsible for opening, migrating, activating,
reloading, and persisting database-backed runtime infrastructure.
The first-install order is:
dataopens the candidate database.- The single root migration runner applies infrastructure, system, and payment schema steps.
initializeinvokessystem.SeedSystemfor administrator, menu, API, department, policy, and module administration-surface records.datapersists configuration and activates the candidate clients.
Schema migration and business seed data are deliberately separate. Normal startup and configuration reload may run migrations, but only the explicit first-install endpoint runs seed data.