Skip to content

File Ownership

Files in a GoForj Project have different owners. Some are normal application code, some are extension points created once, and some are refreshed from configuration or build inputs.

Use this page when deciding whether to edit a file or change the input that creates it. File headers remain authoritative when a specific file says DO NOT EDIT.

Application and App Composition

PathOwnerCreated or refreshed byEdit?
internal/<domain>/...ApplicationYou and forj make:*Yes
app/commands.goAppInitial render and make commandsYes
app/lifecycle.goAppInitial renderYes
app/routes.goAppInitial render and controller commandsYes
app/schedules.goAppInitial renderYes
app/wire/inject_*_app.goAppInitial render and make commandsYes
app/<app>/...Additional AppSame conventions as the default AppFollow the matching default-App file
migrations/Applicationforj make:migration and application changesYes

Framework-Managed Project Files

These files implement the selected Project configuration. Change .goforj.yml, component selection, or the owning framework template instead of treating them as durable extension points.

PathCreated or refreshed byEdit?
cmd/app/main.goforj renderNo; use App registration files
cmd/<app>/main.goforj renderNo; use that App's registration files
app/root_cmd.goforj renderNo
app/wire/app.go, app/<app>/wire/app.goforj renderNo; add providers through _app.go files
app/wire/wire.goforj renderAvoid; compose custom sets through _app.go files
app/wire/inject_*.go without _appforj renderNo
internal/runtime/apps.goforj renderNo

Generated Go Output

These filenames are the concrete outputs readers will encounter; they are not wildcard categories.

CapabilityPathsRefreshed byEdit?
Wireapp/wire/wire_gen.go, app/<app>/wire/wire_gen.goforj build or Wire generationNo
Cacheinternal/caches/manager_gen.go, internal/caches/accessors_gen.goCache generation during forj buildNo
Storageinternal/storages/manager_gen.go, internal/storages/accessors_gen.goStorage generation during forj buildNo
Queuesinternal/queues/manager_gen.go, internal/queues/accessors_gen.goQueue generation during forj buildNo
Eventsinternal/events/manager_gen.go, internal/events/accessors_gen.goEvent generation during forj buildNo
Mailinternal/mail/manager_gen.go, internal/mail/accessors_gen.goMail generation during forj buildNo
Databaseinternal/database/connections_gen.goDatabase generation during forj buildNo

Build and Operational Output

PathPurposeOwner
build/api_index.jsonDefault App API indexBuild tooling
build/api_index.diagnostics.jsonDefault App indexing diagnosticsBuild tooling
build/openapi.jsonDefault App OpenAPI documentBuild tooling
build/.webindex-artifacts.lockCoordinates publication of the default App artifact setBuild tooling
build/<app>/...Equivalent artifacts for an additional AppBuild tooling
bin/app, bin/<app>Compiled App binariesGoForj build pipeline
cmd/<app>/frontend/dist/Built frontend embedded by a Web UI AppSPA build tooling
.goforj/backups/<set>/manifest.jsonBackup set inventoryBackup tooling and operators
.goforj/backups/<set>/checksums.txtBackup artifact checksumsBackup tooling and operators

Project inputs such as .goforj.yml, .env, and go.mod are configuration rather than generated output. See Configuration Reference and Environment Reference for their separate render, build, and restart boundaries.

Ownership Rules

  • Edit application behavior and App-owned _app.go extension points normally.
  • Change inputs and regenerate files marked DO NOT EDIT.
  • Keep Framework-wide fixes in GoForj templates or generators, not only in one rendered Project.
  • Do not commit build output, publication locks, or operator backup sets unless a repository explicitly owns a checked artifact.