- Notifications
You must be signed in to change notification settings - Fork928
docs: add backend contributing guide#18077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
ba40049
2369345
f3bca2a
2eb56dd
5d27d51
1b2eeaa
a18e994
fd44753
9bb61e4
35a9865
b73cc9e
d372181
5a7311e
3ee0747
d8ff123
2a9d702
619d31c
6d680eb
a4ce2c3
49311d0
253c446
18d5182
0fd7fc9
7c644d8
4a96505
08b8542
4251ca8
121e38a
b3274c8
25b9564
90b7199
7f6517d
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -7,9 +7,7 @@ Coder’s backend powers the core infrastructure behind workspace provisioning, | ||
The purpose of this guide is to help you: | ||
* Understand how the various backend components fit together. | ||
* Navigate the codebase with confidence and adhere to established best practices. | ||
* Contribute meaningful changes - whether you're fixing bugs, implementing features, or reviewing code. | ||
By aligning on tools, workflows, and conventions, we reduce cognitive overhead, improve collaboration across teams, and accelerate our ability to deliver high-quality software. | ||
mtojek marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@@ -86,3 +84,31 @@ Coder's backend is built using a collection of robust, modern Go libraries and i | ||
* [coder/serpent](https://github.com/coder/serpent): CLI framework built on `cobra`, used for large, complex CLIs | ||
* [coder/guts](https://github.com/coder/guts): generates TypeScript types from Go for shared type definitions | ||
* [coder/wgtunnel](https://github.com/coder/wgtunnel): WireGuard tunnel server for secure backend networking | ||
## Repository Structure | ||
The Coder backend is organized into multiple packages and directories, each with a specific purpose. Here's a high-level overview of the most important ones: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Great detail! Wdyt about adding a key areas of interest section under here as well, just so people scanning this can get a better idea of what's themost important. Maybe point out agent, coderd, queries, provisioner for instance. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more.
I'm intrigued! Do you have something specific in mind? Should I move up the most important ones? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think that's a great idea! Let's iterate on this further in future PRs. | ||
* [agent](https://github.com/coder/coder/tree/main/agent): core logic of a workspace agent, supports DevContainers, remote SSH, startup/shutdown script execution. Protobuf definitions for DRPC communication with `coderd` are kept in [proto](https://github.com/coder/coder/tree/main/agent/proto). | ||
* [cli](https://github.com/coder/coder/tree/main/cli): CLI interface for `coder` command built on [coder/serpent](https://github.com/coder/serpent). Input controls are defined in [cliui](https://github.com/coder/coder/tree/docs-backend-contrib-guide/cli/cliui), and [testdata](https://github.com/coder/coder/tree/docs-backend-contrib-guide/cli/testdata) contains golden files for common CLI calls | ||
* [cmd](https://github.com/coder/coder/tree/main/cmd): entry points for CLI and services, including `coderd` | ||
* [coderd](https://github.com/coder/coder/tree/main/coderd): the main API server implementation | ||
* [audit](https://github.com/coder/coder/tree/main/coderd/audit): audit log logic, defines target resources, actions and extra fields | ||
* [autobuild](https://github.com/coder/coder/tree/main/coderd/autobuild): core logic of the workspace autobuild executor, periodically evaluates workspaces for next transition actions | ||
* `httpmw`: shared HTTP middleware | ||
* `prebuilds`: prebuilt workspace logic | ||
* `provisionerdserver`: interface to provisioner processes | ||
* `rbac`: role-based access control | ||
* `telemetry`: metrics and observability | ||
* `tracing`: distributed tracing support | ||
* `workspaceapps`: app lifecycle in workspaces | ||
* `wsbuilder`: workspace build system | ||
* `database`: schema migrations and query logic | ||
* `dogfood`: internal testing and validation tools | ||
* `enterprise`: enterprise-only features and extensions | ||
* `nix`: Nix utility scripts and definitions | ||
* `provisioner`, `provisionerd`, `provisionersdk`: components for infrastructure provisioning | ||
* `pty`: terminal emulation for remote shells | ||
* `support`: shared internal helpers | ||
* `tailnet`: network stack and identity management | ||
* `vpn`: VPN and tunneling components |