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.
Ways to Contribute
Section titled “Ways to Contribute”Contributing isn’t limited to writing code. Here are some ways you can get involved:
| Method | Best For | Difficulty |
|---|---|---|
| Report bugs | All users | Low |
| Improve documentation | Users familiar with project features | Low |
| Submit feature requests | Users with real-world use cases | Low |
| Fix bugs | Go or Rust developers | Medium |
| Implement new features | Experienced project contributors | Medium-High |
| Code review | Experienced contributors | Medium |
| Write tests | Developers familiar with test frameworks | Medium |
| Community support | Experienced users | Low |
Before You Start
Section titled “Before You Start”Code of Conduct
Section titled “Code of Conduct”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.
Contributor License Agreement
Section titled “Contributor License Agreement”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.
Communication Channels
Section titled “Communication Channels”| Channel | Purpose |
|---|---|
| GitHub Issues | Bug reports, feature requests |
| GitHub Discussions | Technical discussions, usage questions, design proposals |
| Slack | Real-time chat, community support |
Contribution Workflow
Section titled “Contribution Workflow”Nantian Gateway follows the standard GitHub workflow:
- Fork the main repository to your GitHub account
- Clone your fork locally
- Create a feature branch:
git checkout -b feature/your-feature-name - Develop and test your changes on the branch
- Commit your changes:
git commit -m "feat: add your feature description" - Push the branch:
git push origin feature/your-feature-name - Create a Pull Request on GitHub targeting the
mainbranch - Wait for CI checks to pass and code review
Commit Message Convention
Section titled “Commit Message Convention”Nantian Gateway uses the Conventional Commits specification. The commit message format is:
<type>(<scope>): <description>
[optional body]
[optional footer]Common type values:
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation changes |
test | Add or modify tests |
refactor | Code refactoring (no functional change) |
perf | Performance optimization |
chore | Build, tooling, dependency changes |
ci | CI configuration changes |
style | Code formatting changes (no logic change) |
Common scope values:
| Scope | Description |
|---|---|
controlplane | Control plane code |
dataplane | Data plane code |
proto | Protocol definitions |
crd | Custom resource definitions |
helm | Helm Chart |
docs | Documentation |
website | Website 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 asdown and removed from the IR snapshot.
Closes #123Pull Request Requirements
Section titled “Pull Request Requirements”Every PR must meet the following conditions before it can be merged:
- All tests pass (
go testandcargo 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
Project Structure
Section titled “Project Structure”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 RFCsFinding Tasks
Section titled “Finding Tasks”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
TODOorFIXME - Test Coverage: Any code path that lacks tests is a good target for contribution
Next Steps
Section titled “Next Steps”- See Development Setup to learn how to set up your local development environment
- See Testing Guide to understand the test framework and workflow
- See Release Process to learn about version release rules