Skip to content

Contributing Overview

Nantian Gateway is an open source project that welcomes all forms of contribution. Whether you’re fixing bugs, adding features, writing documentation, or making suggestions, this guide will help you understand where to start and how to participate.

Contributing isn’t limited to writing code. Here are some ways you can get involved:

MethodBest ForDifficulty
Report bugsAll usersLow
Improve documentationUsers familiar with project featuresLow
Submit feature requestsUsers with real-world use casesLow
Fix bugsGo or Rust developersMedium
Implement new featuresExperienced project contributorsMedium-High
Code reviewExperienced contributorsMedium
Write testsDevelopers familiar with test frameworksMedium
Community supportExperienced usersLow

By participating in the Nantian Gateway project, you agree to follow the project’s Code of Conduct. In short: respect others, communicate constructively, and reject any form of harassment or discrimination.

Before submitting your first Pull Request, you need to sign the Contributor License Agreement (CLA). The CLA ensures the project can continue to distribute your contributions under the Apache 2.0 license. When you submit your first PR, the CLA assistant will automatically guide you through the signing process.

ChannelPurpose
GitHub IssuesBug reports, feature requests
GitHub DiscussionsTechnical discussions, usage questions, design proposals
SlackReal-time chat, community support

Nantian Gateway follows the standard GitHub workflow:

  1. Fork the main repository to your GitHub account
  2. Clone your fork locally
  3. Create a feature branch: git checkout -b feature/your-feature-name
  4. Develop and test your changes on the branch
  5. Commit your changes: git commit -m "feat: add your feature description"
  6. Push the branch: git push origin feature/your-feature-name
  7. Create a Pull Request on GitHub targeting the main branch
  8. Wait for CI checks to pass and code review

Nantian Gateway uses the Conventional Commits specification. The commit message format is:

<type>(<scope>): <description>
[optional body]
[optional footer]

Common type values:

TypeDescription
featNew feature
fixBug fix
docsDocumentation changes
testAdd or modify tests
refactorCode refactoring (no functional change)
perfPerformance optimization
choreBuild, tooling, dependency changes
ciCI configuration changes
styleCode formatting changes (no logic change)

Common scope values:

ScopeDescription
controlplaneControl plane code
dataplaneData plane code
protoProtocol definitions
crdCustom resource definitions
helmHelm Chart
docsDocumentation
websiteWebsite and documentation site

Example:

feat(controlplane): add health check for backend endpoints
Add periodic health checking for backend endpoints in the control plane.
When an endpoint is unhealthy for 3 consecutive checks, it is marked as
down and removed from the IR snapshot.
Closes #123

Every PR must meet the following conditions before it can be merged:

  • All tests pass (go test and cargo test)
  • Code formatting checks pass (gofmt, rustfmt, clippy)
  • No lint warnings
  • New features include corresponding test cases
  • API changes include corresponding documentation updates
  • At least one maintainer approval

Understanding the project structure helps you quickly locate the code you need to modify:

nantian-gw/
├── gateway/ # Go control plane
│ ├── cmd/manager/ # Control plane entry point
│ ├── internal/
│ │ ├── controller/ # Kubernetes controllers
│ │ ├── translator/ # Resource translator (Kubernetes → IR)
│ │ ├── ir/ # Internal Representation (IR) definitions
│ │ ├── xds/ # xDS gRPC server
│ │ ├── admin/ # Admin API server
│ │ └── reconciler/ # Reconciliation loops
│ └── deploy/helm/ # Helm Chart
├── dataplane/ # Rust data plane
│ ├── src/
│ │ ├── proxy/ # Proxy core
│ │ ├── xds/ # xDS client
│ │ ├── http/ # HTTP route handling
│ │ ├── grpc/ # gRPC route handling
│ │ ├── stream/ # TCP/UDP stream handling
│ │ ├── ai/ # AI gateway module
│ │ ├── wasm/ # Wasm runtime
│ │ ├── tls/ # TLS handling
│ │ └── admin/ # Admin API server
│ └── Cargo.toml
├── proto/ # Protobuf definitions
│ └── gateway/control/v1/ # xDS protocol definitions
├── dashboard/ # Next.js admin console
├── website/ # Documentation site (Starlight)
└── docs/ # Design docs and RFCs

If you’re not sure where to start, here are some ways to find contribution tasks:

  • Good First Issue: GitHub Issues labeled good first issue, suitable for new contributors
  • Help Wanted: Issues labeled help wanted, indicating maintainers want community help but haven’t had time to address them
  • Documentation Improvements: Places in the docs site and code comments marked with TODO or FIXME
  • Test Coverage: Any code path that lacks tests is a good target for contribution