repowisecitizenfx/fivem

Architecture of citizenfx/fivem

citizenfx/fivem is 4,075 source files holding 59,925 symbols across 4 modules, written mainly in C++, TypeScript, C#. The largest module is code, with 2,465 files, and 25 files are entry points into the dependency graph.

How fivem fits together

The repository is split into top-level modules: code holds most of the source, ext holds supporting tooling such as the SDK and symbol upload projects, and .github holds issue templates, a pull request template and CI workflows. Startup begins in the native launcher at code/client/launcher/Main.cpp, and code/client/console/Main.cpp is a second client entry point. The networking layer is in code/components/net/src/NetLibrary.cpp, which is listed among the index's hotspot files. On the server side, code/components/citizen-server-impl/src/state/ServerGameState.cpp holds the server game state, and code/components/citizen-server-state/init.lua is a Lua entry point for that component. Build tasks are driven by code/Gruntfile.js, and ext/sdk/package.json is the manifest for the SDK package. FXServer is the server component that community servers run on.

Largest modules

  • code: 2,465 files and 497,224 lines of code
  • ext: 523 files and 411,387 lines of code
  • data: 14 files and 5,290 lines of code
  • .github: 2 files and 30 lines of code

Languages

By file count: C++ 2,125 files, TypeScript 455 files, C# 186 files, Luau 177 files, JavaScript 33 files, Shell 13 files.

Documentation

Repowise documents fivem in 3,398 pages generated from the source, 89 of them written explanations of the repository and its modules.

More on fivem: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos