Skip to content

Latest commit

 

History

History
196 lines (140 loc) · 4.71 KB

File metadata and controls

196 lines (140 loc) · 4.71 KB

Contributing to SecureFabric Public SDKs

Thank you for your interest in contributing to SecureFabric! This document provides guidelines for contributing to the public SDK and documentation repository.

Repository Scope & Contribution Policy

IMPORTANT: This repository is for SDKs and protocol specifications ONLY.

What You CAN Contribute

  • Client SDK improvements (Rust, JavaScript/TypeScript, Python)
  • Protocol specification updates and clarifications
  • Documentation, examples, and guides
  • Bug fixes in client libraries
  • New language SDK implementations
  • Test coverage and conformance tests

What You CANNOT Contribute

  • Server/node implementation changes (not in this repo)
  • Infrastructure, deployment, or operational code
  • Changes to private/proprietary components
  • Production credentials, keys, or certificates

Pull requests attempting to add server code, infrastructure configs, or deployment tooling will be rejected. For questions about node implementation or architecture, please contact the maintainers directly.

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you agree to uphold a respectful and inclusive environment.

How to Contribute

Reporting Issues

  • Bugs: Use the bug report template
  • Feature Requests: Use the feature request template
  • Security Issues: See SECURITY.md

Submitting Changes

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Test your changes (see Testing section)
  5. Commit with clear messages: Follow Conventional Commits
  6. Push to your fork: git push origin feature/my-feature
  7. Open a Pull Request

Development Setup

Rust SDK

cd sdk/rust
cargo build
cargo test
cargo fmt --check
cargo clippy -- -D warnings

JavaScript/TypeScript SDK

cd sdk/js
npm install
npm run build
npm test
npm run lint

Python SDK

cd sdk/python
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows
pip install -e '.[dev]'
pytest
black --check .
mypy securefabric

Testing Requirements

All contributions must include tests:

  • Unit tests for new functionality
  • Integration tests for SDK methods (where applicable)
  • Documentation updates if adding/changing APIs
  • Examples updated if changing interfaces

Code Style

Rust

  • Follow rustfmt defaults
  • Use clippy with -D warnings
  • Document public APIs with /// doc comments

JavaScript/TypeScript

  • Use ESLint + Prettier
  • TypeScript strict mode enabled
  • JSDoc comments for public APIs

Python

  • Follow PEP 8
  • Use Black for formatting
  • Type hints required for public APIs
  • Docstrings in Google style

Commit Messages

Follow Conventional Commits:

feat: add support for Python async API
fix: correct error handling in Rust SDK
docs: update quickstart guide
test: add integration tests for JS SDK
chore: update dependencies

Pull Request Guidelines

  • Title: Use conventional commit format
  • Description: Explain what and why, not how
  • Link Issues: Reference related issues
  • Tests: Ensure all tests pass
  • Documentation: Update docs if needed
  • Changelog: Update CHANGELOG.md for notable changes

Review Process

  1. Automated CI checks must pass
  2. At least one maintainer approval required
  3. All conversations must be resolved
  4. Squash merging preferred for clean history

Documentation

  • API docs: Auto-generated from code comments
  • Guides: Markdown in docs/
  • Examples: Self-contained in examples/

Update documentation when:

  • Adding new SDK methods
  • Changing existing interfaces
  • Adding new examples
  • Updating protocol specs

Protocol Specifications

Changes to protocol specs (specs/) require:

  • Clear rationale for changes
  • Backward compatibility analysis
  • Update to all affected SDKs
  • Version bump in proto file
  • Entry in CHANGELOG.md explaining the change

Breaking Changes: Any breaking protocol changes must:

  1. Increment the major version number
  2. Document migration path in CHANGELOG.md
  3. Update all SDK implementations
  4. Provide backward compatibility guidance

Licensing

By contributing, you agree that your contributions will be licensed under the Apache-2.0 license. All source files should include SPDX headers:

// SPDX-License-Identifier: Apache-2.0

Or for Python/shell scripts:

# SPDX-License-Identifier: Apache-2.0

Questions?

Thank you for contributing to SecureFabric!