Repo map

Gitea architecture.

Gitea is a self-hosted Git service. Nodeway mapped the go-gitea/gitea repository at commit 943eb10, from 29 November 2026, and found 2,360 source files, 16,235 functions, classes and components, 882 routes and 120 database tables. This page is drawn from that map.

Free to start. macOS (Apple silicon and Intel), Windows and Linux.
Source files
2,360
Functions and classes
16,235
Confirmed calls
55,435
Routes
882
Tables
120

How the code is laid out

Most of it is Go: 2,124 files of 2,360, followed by TypeScript (180), Shell (29) and Vue (26).

The repository is split into 5 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are routers (420 files), modelmigration (311 files), models (249 files), cmd (40 files) and tools (17 files).

These are its top-level folders by number of source files, with 9 more files at the root. The biggest ones show their own largest folders underneath.

  • modules/702 files1 table
  • git/92 files
  • structs/61 files
  • setting/60 files
  • markup/47 files
  • packages/42 files
  • indexer/41 files
  • routers/package420 files875 routes
  • web/201 files523 routes
  • api/180 files314 routes
  • common/19 files10 routes
  • services/398 files1 table
  • auth/46 files1 table
  • repository/38 files
  • actions/28 files
  • modelmigration/package311 files
  • v1_12/23 files
  • v1_14/23 files
  • v1_16/22 files
  • models/package249 files1 route · 118 tables
  • issues/30 files17 tables
  • repo/30 files18 tables
  • actions/27 files15 tables
  • web_src/js/192 files
  • features/86 files
  • modules/32 files
  • components/31 files
  • cmd/package40 files6 routes
  • tools/package17 files
  • eslint-rules/1 file
  • docker/14 files
  • root/10 files
  • rootless/usr/local/bin/4 files
  • contrib/6 files
  • service/4 files
  • fhs-compliant-script/1 file
  • snap/2 files

Where the code starts

Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:

FileReaches
services/lfs/server.go17 files
models/actions/run.go12 files
routers/api/v1/user/app.go11 files
main.godefines main9 files
services/actions/run.go5 files
services/gitproxy/server.go5 files

Routes

Nodeway found 882 routes and linked 878 to the function that handles them. They by HTTP method: GET 464, POST 362, DELETE 20, ANY 15, PUT 14, PATCH 5. Most are under routers/web (523), routers/api (314) and routers/private (21).

Some of them

RouteMethod
/Install · routers/install/routes.goGET
/SetDefaultBranchPost · routers/web/web.goPOST
/jwksoidcKeys · routers/api/actions/actions.goGET
/runsListWorkflowRuns · routers/api/v1/api.goGET
/v2/_catalogGetRepositoryList · routers/api/packages/api.goGET
/debug/fgprofservePprof · cmd/web.goANY
/api/internalGetListLockHandler · routers/common/lfs.goGET
/-/fetch-redirectFetchRedirectDelegate · routers/init.goPOST

Data model

Nodeway found 120 database tables, defined with xorm. Code in the repository reads or writes 119 of them. The most used:

TableUsed by
repository46 columns · models/repo/repo.go32 read44 write
user46 columns · models/user/user.go44 read25 write
comment37 columns · links to issue, label and milestone · models/issues/comment.go19 read17 write
issue21 columns · links to milestone · models/issues/issue.go20 read7 write
attachment12 columns · links to comment, issue and release · models/repo/attachment.go17 read10 write
release17 columns · models/repo/release.go20 read5 write
label13 columns · models/issues/label.go18 read7 write
branch12 columns · models/git/branch.go18 read6 write

One request, traced

Nodeway followed GET /token from its route to the code that handles it, then along confirmed calls until it reached the action_run table.

  1. GET /tokenroute · routers/api/actions/actions.go
  2. oidcTokenfunction · routers/api/actions/oidc.go:48
  3. CreateOIDCTokenfunction · services/actions/oidc.go:115
  4. LoadAttributesmethod · models/actions/run_job.go:187
  5. LoadRunmethod · models/actions/run_job.go:164
  6. GetRunByRepoAndIDfunction · models/actions/run.go:288
  7. action_runtable · read here

The most-called code

Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.

FunctionCallers
GetEnginefunction · models/db/context.go961
Errorfunction · modules/log/logger_global.go905
ServerErrorAutomethod · services/context/context_response.go559
APIErrorInternalmethod · services/context/api.go385
HTMLmethod · services/context/context_response.go230
APIErrormethod · services/context/api.go221
Tracefunction · modules/log/logger_global.go216
Warnfunction · modules/log/logger_global.go193

Open this repo in Nodeway

Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:

git clone https://github.com/go-gitea/gitea.git
  • Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
  • Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
  • Search for GetEngine and trace what it calls, or pick a route and follow it to the database.

New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.

Questions

What language is Gitea written in?

Mostly Go: 2,124 of its 2,360 source files at commit 943eb10, then TypeScript with 180.

Where does the Gitea code start?

The entry point that reaches the most code is services/lfs/server.go, which leads to 17 files through its imports.

How many routes does Gitea have?

Nodeway found 882 routes, 878 of them linked to a handler. The most are under routers/web.

What database tables does Gitea use?

120 tables, defined with xorm. The most used are repository, user and comment.

How this page was made

Generated from a map Nodeway's analyzer (version 18) made of go-gitea/gitea at commit 943eb10, committed on 29 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.

More codebases, mapped

All repo maps

See your whole codebase in minutes.

Open a folder and Nodeway maps it on your own computer. No account, and nothing is uploaded.

More guides