One definition, four outputs
Write the model. Forge reads it to build queries, the admin and the API.
package catalog
import "github.com/forgego/forge/schema"
type Product struct {
schema.BaseSchema
}
func (Product) Fields() []schema.Field {
return []schema.Field{
schema.Int64Field("id", schema.Primary(), schema.AutoIncrement()),
schema.StringField("name", schema.Required(), schema.MaxLength(200)),
schema.StringField("sku", schema.Required(), schema.Unique()),
schema.Float64Field("price", schema.Required()),
schema.BoolField("is_active", schema.Default(true)),
schema.TimeField("created_at", schema.AutoNowAdd()),
}
}
func (Product) Meta() schema.Meta {
return schema.Meta{TableName: "products", OrderBy: []string{"name"}}
}An admin for every model you register
Search, filters, saved views, bulk actions and export. Shown here with the ecommerce example.


The parts most web backends need
Each part works on its own, and they are designed to work together.
Schema-first models
Fields, indexes, relations and hooks live in one Go definition per model. The generator, migrations, admin and API all read from it.
Read the docsTyped queries
Generated managers and field accessors give you chainable, lazy QuerySets with typed comparisons, ordering, relations and aggregates.
Read the docsMigrations from your models
makemigrations --auto compares your models with the migration history and writes the SQL. Checksums catch migration files edited after they ran.
Read the docsBuilt-in admin
A React admin with search, filters, bulk actions, inline relations, change history and per-object permission hooks.
Read the docsREST API layer
ViewSets, serializers, pagination, throttling, versioning and an OpenAPI document, modelled on Django REST Framework.
Read the docsSecure defaults
Password hashing, sessions and tokens, CSRF protection, secure cookies, CORS checks and rate limiting are on from the start.
Read the docsSee a complete Forge app running
The ecommerce example has 57 models across 10 apps, with the admin and REST API wired up. Docker runs it with PostgreSQL.
Clone the repository
The example lives in examples/ecommerce.
git clone https://github.com/forgego/forge.gitStart it with Docker
Builds the app and the admin UI, and starts PostgreSQL.
cd forge/examples/ecommerce && docker compose up --buildOpen the admin
Browse the generated admin for every model in the example.
http://localhost:8020/admin/Know what you are adopting
Forge is pre-1.0. PostgreSQL is the primary tested database. The capability status page lists what is verified in CI and what is still partial.