Buffalo
By Gobuffalo contributors
Buffalo is a full-stack web development ecosystem for the Go programming language that bundles routing, templating, asset building, database migrations, and a scaffolding CLI into one cohesive toolkit. It is modeled loosely on Ruby on…
Definition
Buffalo is a full-stack web development ecosystem for the Go programming language that bundles routing, templating, asset building, database migrations, and a scaffolding CLI into one cohesive toolkit. It is modeled loosely on Ruby on Rails' convention-over-configuration philosophy, generating a working application skeleton with a single command and wiring together the pieces a typical web app needs. Buffalo is used by teams who want Rails-like productivity for building server-rendered or API-driven web applications while staying in Go's compiled, statically typed environment.
Overview
Buffalo was created to address a gap many Go developers felt when moving from more opinionated frameworks in other languages: Go's standard library and most of its web libraries are deliberately minimal, leaving teams to assemble routing, ORM, templating, and build tooling themselves. Buffalo instead follows the convention-over-configuration approach popularized by Ruby on Rails, generating a complete project layout, database configuration, and asset pipeline from its `buffalo new` command so a team can start writing business logic immediately. Under the hood, Buffalo composes several independently usable Go packages under the Gobuffalo organization: the `pop` package handles database access and migrations across PostgreSQL, MySQL, SQLite, and CockroachDB; `plush` provides server-side templating with Go-flavored expression syntax; and `buffalo-pop` and the built-in asset pipeline wire together compiling and serving front-end assets, historically through Webpack integration and more recently through simpler asset handling. The `buffalo dev` command watches the file system and rebuilds the Go binary automatically, giving a live-reload development loop comparable to what interpreted-language frameworks provide natively despite Go being compiled. Buffalo distinguishes itself from lighter Go frameworks and routers, such as Chi or Gorilla Mux, by covering the entire application lifecycle rather than just HTTP routing; those tools are typically building blocks that Buffalo could theoretically be composed from, whereas Buffalo ships an opinionated, pre-integrated stack. Compared with Rails or Django in other languages, Buffalo trades some of their vast plugin ecosystems and dynamic-language flexibility for Go's static typing, single-binary deployment, and generally lower runtime memory footprint. In practice, Buffalo is used for building server-rendered web applications, internal admin tools, and JSON APIs where a team wants scaffolding for models, migrations, and routes generated automatically rather than hand-assembled. Its code generators can produce full CRUD resources — model, migration, controller, and templates — from a single command, which shortens the path from a data model to a working feature during early development. The trade-off for that convenience is the same one convention-heavy frameworks have always carried: adopting Buffalo means adopting its directory layout, its choice of templating engine, and its migration tooling, which is less flexible than composing a project from independently chosen libraries such as Chi for routing and a separately selected ORM. Buffalo's community and plugin ecosystem, while active, is considerably smaller than Rails' or Django's, so teams evaluating it for a large long-term project should weigh that against Go's compiled-binary deployment advantages and static typing, which many teams pick Buffalo for in the first place despite the smaller surrounding ecosystem.
Key Features
- Project scaffolding CLI that generates a complete app skeleton
- Convention-over-configuration approach inspired by Ruby on Rails
- Built-in database migrations and ORM through the pop package
- Plush templating engine for server-rendered HTML views
- Live-reload development server via the buffalo dev command
- Code generators for full CRUD resources from one command
- Support for PostgreSQL, MySQL, SQLite, and CockroachDB backends
- Integrated asset pipeline for front-end build tooling