codebase
All the source code for a piece of software, usually kept in one or more version control repositories.
In more detail
In the twelve-factor app approach, each application has one codebase deployed many times, and code shared between apps becomes a versioned library. An organisation may have many codebases, such as a web app and mobile apps, that need to stay consistent. A consistent layout and build tool make an unfamiliar codebase easier to find your way around.
Example
Manual memoization and scattered Effects add up to a lot of noise across a large React codebase.Related terms
- design token — A named design decision, such as a colour, font size or spacing value, stored as data so every platform can use the same value.
- codemod — A script that rewrites source code automatically, for example renaming a deprecated prop across a whole codebase.
- twelve-factor app — A short manifesto of twelve rules for building applications that deploy cleanly to modern platforms, written at Heroku and published in 2011.
- repository — A project folder whose full history is tracked by version control; in Git, your files plus the hidden .git directory that stores every commit.
- software deployment — Putting a specific version of software into an environment, such as staging or production, so that it runs there.
- library — A package of reusable code that other programs include and call, rather than a program you run on its own.
- monorepo — A single version-control repository that holds several related projects, such as a web app, an API and their shared libraries.
- build tool — A program that turns a project's source into a tested, packaged artifact with one command, fetching dependencies along the way.
- refactoring — Restructuring working code to make it clearer or easier to change without changing what it does.
- boilerplate — Repetitive code that has to be written the same way every time and adds little meaning of its own.
Taught in
- Anatomy Of A Prompt — AI Engineering: LLM Apps, RAG & Agents
- Design Tokens: W3C Specs, Global, Semantic & Component Tokens — Design Systems & Component Engineering
- System Governance: Changesets, Semantic Versioning & Deprecation — Design Systems & Component Engineering
- Codebase And Dependencies — DevOps & Site Reliability Engineering
- Config And Backing Services — DevOps & Site Reliability Engineering
- Admin Processes And The Open Source Update — DevOps & Site Reliability Engineering
- Decoupling Release From Deployment: Feature Flags — DevOps & Site Reliability Engineering
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- Structured Logging & Correlation IDs: Context Stitching — Production Full-Stack Engineering
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- Avoiding Effect Antipatterns: Derived State And Events — React 19 & Modern Component Architecture
- Creating Event Listener Hooks with Clean Teardown Logic — React 19 & Modern Component Architecture
- Code-Splitting with React.lazy: Dynamic Imports And Chunks — React 19 & Modern Component Architecture
- The React Compiler: Automated Memoization Under The Hood — React 19 & Modern Component Architecture
References
- Git documentation
- The Twelve-Factor App: I. Codebase
- Apache Maven: Introduction to the Standard Directory Layout
- MDN: Learn web development