Gitea — Overview#
Identity#
- Module path: code.gitea.io/gitea
- Go version: 1.26.1
- License: MIT
- Repository: https://github.com/go-gitea/gitea
Purpose#
Gitea is a self-hosted Git service that provides a complete GitHub-like developer platform in a single binary. It targets individuals, teams, and organizations who want to run their own version control infrastructure without depending on GitHub, GitLab, or other hosted services. The project covers repositories, issues, pull requests, wikis, code review, CI/CD (Gitea Actions), container and package registry, and OAuth2/OIDC identity features.
Significance#
Gitea is among the most widely adopted self-hosted Git platforms in the Go ecosystem, with a large and active community on GitHub and its own Crowdin translation project. Forked from Gogs in November 2016, it evolved far beyond its origins and now competes directly with GitLab Community Edition in feature breadth while remaining a single deployable binary. Its design demonstrates how a large, complex web application can be shipped as a cross-platform Go monolith, and it is frequently cited as a reference for Go web application architecture at scale.
Key metrics#
- Go files: 2,875
- Top-level directories: assets, build, cmd, contrib, custom, docker, models, modules, options, public, routers, services, snap, templates, tests, tools, web_src
- Direct dependencies: ~119 (first require block in go.mod)
- First commit / age: Repository forked from Gogs, November 2016; ~8+ years old
Notable characteristics#
- Three-tier Go layering:
models/(data access via xorm ORM),services/(business logic),routers/(HTTP handlers with chi) — a clean separation rarely seen at this scale in a Go monolith. - Custom module path hosting: Uses
code.gitea.io/gitearather than a GitHub URL, self-hosting its own module proxy and demonstrating the project’s dogfooding philosophy. - Embedded Actions runtime: Integrates
github.com/nektos/actto run GitHub Actions-compatible CI/CD workflows natively, bundling a full workflow engine into the same binary. - Multi-database support: Ships with drivers and migrations for MySQL, PostgreSQL, SQLite3, and MSSQL, using xorm as the ORM layer rather than the more common GORM.
- Bindata asset embedding: Static web assets, templates, and locale files are compiled into the binary via
make build TAGS="bindata", enabling the single-binary deployment model without a separate asset server. - Full-stack Go + Node.js: The
web_src/directory contains a TypeScript/JavaScript frontend built with pnpm; Go renders templates server-side while JavaScript enhances the UI, making this a hybrid SSR/SPA architecture rather than a pure REST+SPA approach.