Contributing to Pubky
Thank you for your interest in contributing to Pubky! This guide will help you get started.
Ways to Contribute
Section titled “Ways to Contribute”1. Documentation
Section titled “1. Documentation”Help improve this knowledge base:
- Fix typos and errors
- Add missing information
- Improve clarity and explanations
- Add examples and tutorials
- Translate to other languages
2. Code Contributions
Section titled “2. Code Contributions”Contribute to Pubky projects:
- Pubky Core: Protocol and Homeserver
- Pubky Ring: Mobile key manager
- Pubky App: Social application (pubky.app)
- Pubky Nexus: Indexing service
- Pubky CLI: Command-line tool
- PKDNS, Homegate, Pubky Docker: Infrastructure tools
3. Community Support
Section titled “3. Community Support”Help others in the community:
- Answer questions on Telegram
- Help troubleshoot issues
- Share your projects and experiences
- Write blog posts and tutorials
4. Testing & Bug Reports
Section titled “4. Testing & Bug Reports”Improve quality through:
- Testing beta features
- Reporting bugs with detailed reproduction steps
- Suggesting improvements
- Validating fixes
Contributing to Documentation
Section titled “Contributing to Documentation”Quick Edits
Section titled “Quick Edits”For small fixes (typos, links, formatting):
- Fork the repository: github.com/pubky/pubky-knowledge-base
- Make your changes: Edit markdown files in
src/content/docs/ - Submit a pull request: Include a clear description
Larger Contributions
Section titled “Larger Contributions”For new pages or significant changes:
- Discuss first: Open an issue to discuss your plans
- Follow the structure: Match existing page organization under
src/content/docs/ - Use standard markdown links:
[Link text](/path/to/page/)for internal links,[text](url)for external - Register in sidebar: If adding a new top-level page, add it to the
sidebararray inastro.config.mjs - Test locally: Build with Starlight to verify
Build locally:
git clone https://github.com/pubky/pubky-knowledge-basecd pubky-knowledge-basenpm installnpm run dev# Visit http://localhost:4321Documentation Style Guide
Section titled “Documentation Style Guide”Markdown Conventions:
- Each page needs a frontmatter block with at least a
titlefield - Use
## Sectionfor major sections (H2) - Use
### Subsectionfor subsections (H3) - Use standard markdown links for both internal and external references
Code Blocks:
// Always specify languageconst example = "like this";Linking:
<!-- Internal -->[Pubky Core](/explore/pubkycore/introduction/)
<!-- External -->[Official Docs](https://docs.pubky.org/)Admonitions:
:::noteInformational callout.:::
:::tipHelpful suggestion.:::
:::cautionImportant warning.:::Images:
<!-- Always include descriptive alt text -->Contributing Code
Section titled “Contributing Code”General Process
Section titled “General Process”- Check existing issues: See if someone is already working on it
- Open an issue: Describe what you want to build/fix
- Fork and branch: Create a feature branch
- Write code: Follow project conventions
- Test thoroughly: Ensure tests pass
- Submit PR: Include description and link to issue
Code Quality Standards
Section titled “Code Quality Standards”All code contributions should:
- ✅ Pass existing tests
- ✅ Add tests for new features
- ✅ Follow language-specific style guides
- ✅ Include documentation/comments where needed
- ✅ Not introduce new linter warnings
- ✅ Be accompanied by a clear commit message
Commit Message Format:
type: brief description (max 72 chars)
Longer explanation if needed. Wrap at 72 characters.
Fixes #123Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, no logic change)refactor: Code restructuringtest: Adding or updating testschore: Maintenance tasks
Example:
feat: add HTTPS record support to PKDNS
Implements HTTPS DNS record type handling in the PKDNS resolver,enabling service binding records for modern applications.
Fixes #456Development Setup
Section titled “Development Setup”Pubky Core (Rust)
Section titled “Pubky Core (Rust)”# Clonegit clone https://github.com/pubky/pubky-corecd pubky-core
# Buildcargo build
# Run testscargo test
# Run homeserver locallycargo run --bin pubky-homeserver
# Format codecargo fmt
# Lintcargo clippyRequirements:
- Rust 1.89+
Pubky Ring (React Native)
Section titled “Pubky Ring (React Native)”# Clonegit clone https://github.com/pubky/pubky-ringcd pubky-ring
# Install dependenciesyarn installcd ios && pod install && cd ..
# Run on iOSyarn ios
# Run on Androidyarn android
# Run testsyarn test
# Lintyarn lintRequirements:
- Node.js >= 22.11.0
- Yarn 1.x
- React Native environment (Xcode for iOS, Android Studio for Android)
Pubky Nexus (Rust)
Section titled “Pubky Nexus (Rust)”# Clonegit clone https://github.com/pubky/pubky-nexuscd pubky-nexus
# Start dependencies (Neo4j, Redis, PostgreSQL)cd docker && cp .env-sample .env && docker compose up -d && cd ..
# Buildcargo build
# Run all servicescargo run -p nexusd
# Run API onlycargo run -p nexusd -- api
# Run watcher onlycargo run -p nexusd -- watcher
# Run migrationscargo run -p nexusd -- db migration run
# Load test data and run tests (requires cargo-nextest)cargo run -p nexusd -- db mockcargo nextest run -p nexus-common --no-fail-fastcargo nextest run -p nexus-webapi --no-fail-fastcargo nextest run -p nexus-watcher --no-fail-fastRequirements:
- Rust
- Docker for databases
- cargo-nextest (
cargo install cargo-nextest)
Pubky CLI (Rust)
Section titled “Pubky CLI (Rust)”# Clonegit clone https://github.com/pubky/pubky-clicd pubky-cli
# Buildcargo build
# Install locallycargo install --path .
# Run testscargo test
# Generate completionspubky-cli tools completions bash > completions.bashCommunity Guidelines
Section titled “Community Guidelines”Code of Conduct
Section titled “Code of Conduct”We expect all contributors to:
- Be respectful: Treat everyone with respect and kindness
- Be collaborative: Work together constructively
- Be inclusive: Welcome diverse perspectives
- Be professional: Keep discussions focused and productive
- Give credit: Acknowledge others’ contributions
Communication Channels
Section titled “Communication Channels”- Telegram: t.me/pubkycore - General discussion and support
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Long-form conversations and proposals
- Pull Requests: Code review and technical discussion
Getting Help
Section titled “Getting Help”Before asking:
- Check the FAQ
- Search existing issues
- Read the Troubleshooting guide
- Review relevant documentation
When asking:
- Be specific about your problem
- Include relevant code/logs
- Mention what you’ve tried
- Specify your environment
Review Process
Section titled “Review Process”Documentation PRs
Section titled “Documentation PRs”- Reviewed by documentation maintainers
- Usually merged within 1-3 days
- Focus on clarity, accuracy, and consistency
Code PRs
Section titled “Code PRs”Review criteria:
- Code quality and style
- Test coverage
- Performance implications
- Security considerations
- Breaking changes
- Documentation updates
Timeline:
- Initial review: 1-7 days
- Revisions: As needed
- Merge: After approval from maintainer(s)
Tips for faster review:
- Keep PRs focused and small
- Include tests
- Update documentation
- Respond to feedback promptly
- Be patient and respectful
Specialized Contributions
Section titled “Specialized Contributions”Writing Examples
Section titled “Writing Examples”Share practical examples:
- Create a repository: Your example project
- Add to awesome-pubky: Link to curated list
- Write a tutorial: Blog post or documentation
- Record a video: Screencast or presentation
Building Clients
Section titled “Building Clients”Building a Pubky App-compatible client?
- Use pubky-app-specs: npm package
- Follow the spec: Ensure interoperability
- Test against Nexus: Use nexus.pubky.app
- Share your work: Let the community know!
Running Infrastructure
Section titled “Running Infrastructure”Contributing infrastructure:
- Public Homeserver: Host for community use
- PKDNS Instance: Provide DNS resolution
- Nexus Instance: Run custom indexer
- PKARR Relay: Improve network performance
Translations
Section titled “Translations”Help translate documentation:
- Choose a language: Check what needs translation
- Create language folder: e.g.,
/es/for Spanish - Translate markdown files: Maintain structure
- Submit PR: Include translation credits
Recognition
Section titled “Recognition”Contributors
Section titled “Contributors”All contributors are recognized in:
- Repository README files
- Release notes for significant contributions
- Community shout-outs
Maintainers
Section titled “Maintainers”Consistent, high-quality contributors may be invited to become maintainers with:
- Merge permissions
- Release authority
- Architecture input
License
Section titled “License”By contributing to Pubky projects, you agree that your contributions will be licensed under the MIT License (or the project’s specific license).
MIT License Basics:
- ✅ Commercial use allowed
- ✅ Modification allowed
- ✅ Distribution allowed
- ✅ Private use allowed
- ⚠️ No warranty provided
Getting Started Checklist
Section titled “Getting Started Checklist”Ready to contribute? Here’s your checklist:
For Documentation:
- Fork pubky-knowledge-base repository
- Make your changes in
src/content/docs/ - Test locally with Starlight (
npm run dev) - Submit pull request
For Code:
- Check project’s CONTRIBUTING.md
- Set up development environment
- Create feature branch
- Write code and tests
- Pass all checks (lint, test, build)
- Submit pull request
For Community:
- Join Telegram channel
- Introduce yourself
- Answer questions where you can
- Share your projects
Questions?
Section titled “Questions?”- Documentation: Open an issue on pubky-knowledge-base
- Code: Check project-specific issues
- General: Ask on Telegram
Thank you for contributing to Pubky! Together we’re building a decentralized, censorship-resistant web. 🚀