ENTITY_NAME denotes your entity directory or filename; EntityName denotes its generated code type or export-name prefix. Use the actual names in your project. FIELD_NAME denotes a field name. These are placeholders, not required entities or literal files.
The application model and settings live in .admingen/project.yaml. Generator UI edits this model; Generate updates the backend, admin, OpenAPI and schema migrations from it.
The tree shows a project with an EntityName entity. Backend and admin have separate dependencies and builds. A public website is a separate application that calls the API as a client.
The tree shows main paths using EntityName as an example, not a complete inventory. Files depend on the model and project capabilities.
Your project root
project/
├── .admingen/
│ └── project.yaml # declarative model
├── backend/
│ ├── cmd/ # Go entry points
│ │ ├── api/main.go
│ │ └── migrate/main.go
│ ├── internal/ # application packages
│ │ ├── domain/
│ │ │ └── ENTITY_NAME.go
│ │ ├── app/ENTITY_NAME/
│ │ │ ├── commands.go
│ │ │ ├── queries.go
│ │ │ └── service.go
│ │ ├── adapters/
│ │ │ ├── http/generated/ENTITY_NAME_handler.go
│ │ │ └── postgres/generated/ENTITY_NAME_repository.go
│ │ ├── infrastructure/
│ │ │ ├── database/database.go
│ │ │ └── migrations/migrations.go
│ │ ├── generated/
│ │ │ ├── bootstrap/app.go
│ │ │ └── customcontracts/composition.go
│ │ └── custom/
│ │ ├── app/composition.go
│ │ └── ENTITY_NAME/hooks.go
│ ├── migrations/ # schema history
│ │ ├── manifest.json
│ │ └── custom/
│ ├── openapi/ # HTTP contract
│ │ ├── openapi.yaml
│ │ └── entities/ENTITY_NAME.yaml
│ └── go.mod
└── admin/
├── src/ # React + TypeScript
│ ├── main.tsx
│ ├── app/
│ │ ├── router.tsx
│ │ └── providers.tsx
│ ├── features/ENTITY_NAME/
│ │ ├── generated/
│ │ │ ├── model.ts
│ │ │ ├── form.tsx
│ │ │ ├── list-page.tsx
│ │ │ └── ui-extension.tsx
│ │ └── custom/
│ │ ├── extension.tsx
│ │ └── ui-extension.tsx
│ └── shared/
│ ├── api/client.ts
│ └── forms/field-controls.tsx
├── custom/vite.ts # project build settings
└── package.json
Keep your extensions in custom zones. Other files depend on enabled capabilities: media and Docker/deployment appear when configured for the project. Saving the model, generating files and applying migrations are separate operations.
Declarative model
.admingen/project.yaml describes entities, fields, relationships, access and generation settings. It defines what the application should contain. Generator UI is the main editing interface; CLI can make the same changes. Generate reads the model and produces code. Reconstructing the model from application source is not supported.
Go entry points
backend/cmd/ contains executable entry points. For example, cmd/api/main.go starts dependency composition and the HTTP server. Separate entry points let you run the API and maintenance commands independently.
Application packages
backend/internal/ holds entity types, application services, HTTP/SQL adapters and technical mechanisms, including custom extensions. Package purpose and file ownership are distinct: dependency directions and generation rules are explained in the following articles.
Schema history
backend/migrations/ contains SQL migrations and their registry. Generate adds new schema-change steps. Run the migrator separately to apply them to PostgreSQL. Released history is preserved: editing the model does not rewrite earlier migrations.
HTTP contract
backend/openapi/ describes API routes, parameters, request bodies and responses. Website and other client developers can use this contract without studying internal Go packages.
React and TypeScript
admin/src/ contains the admin application: routing, lists, forms and shared controls. Standard parts are updated from the model. Entity custom zones beside them contain your components and extensions.
Project build settings
Extend Vite configuration in admin/custom/vite.ts. The generator seeds this file only if it does not exist. After that you own the file and subsequent Generate operations preserve your settings. The overlay supports its documented options; it does not replace the entire build configuration.
Practical guides
Directory guides in Demo
With Demo enabled, generation adds Russian ADMINGEN.md guides to the covered directories. They explain file responsibilities and execution flow. Change the model through UI and custom behavior in team-owned files. The custom dashboard lives at admin/src/app/custom/dashboard.tsx; documents and images use separate stores.