Contributing to Palpo
Thank you for your interest in contributing to Palpo! We welcome contributions from everyone, whether you're fixing bugs, adding features, improving documentation, or writing tests.
Table of Contents
- Getting Started
- Development Setup
- Making Contributions
- Code Style
- Testing
- Pull Request Process
- Reporting Issues
Getting Started
Before contributing, please:
- Read this guide in full
- Check existing issues to avoid duplicates
- For significant changes, open an issue first to discuss your proposal
Development Setup
Prerequisites
- Rust 1.94+ - Install via rustup
- PostgreSQL 17+ - Required for the database backend
- System dependencies (Linux):
Building from Source
Admin Console
Palpo includes an interactive admin console for managing the server:
Console commands:
Keyboard shortcuts:
Graceful shutdown:
When running in console+server mode, exiting the console (via exit, quit, or Ctrl+D) triggers a graceful server shutdown. The server will stop accepting new connections and exit cleanly.
When running as a daemon (without --console), send SIGTERM or SIGQUIT for graceful shutdown:
Project Structure
Palpo is organized as a Cargo workspace with the following crates:
Making Contributions
Types of Contributions
We appreciate all kinds of contributions:
- Bug fixes - Fix issues reported in the tracker
- Features - Implement new functionality (discuss first in an issue)
- Documentation - Improve docs, add examples, fix typos
- Tests - Add test coverage, improve existing tests
- Performance - Optimize code, reduce memory usage
Before You Start
- Create a branch from
mainfor your work - Keep changes focused - One logical change per PR
- Write tests for new functionality
- Update documentation if needed
Code Style
Rust Formatting
We use rustfmt with the Rust 2024 edition style. Format your code before committing:
Linting
We use clippy for linting. Your code should pass without warnings:
Spell Checking
We use typos to catch spelling mistakes:
Style Guidelines
- Use meaningful variable and function names
- Keep functions focused and reasonably sized
- Add comments for complex logic (not obvious code)
- Follow existing patterns in the codebase
- Prefer explicit error handling over
.unwrap()in production code
Testing
Running Tests
Complement Testing
We use Complement for Matrix specification compliance testing. See the tests/README.md for details.
Writing Tests
- Add unit tests for new functions and modules
- Add integration tests for API endpoints
- Test both success and error cases
- Use descriptive test names that explain what is being tested
Pull Request Process
Before Submitting
Ensure your changes pass all CI checks locally:
Submitting a PR
- Create a descriptive title - Summarize the change clearly
- Write a helpful description - Explain what and why
- Reference related issues - Use
Fixes #123orRelates to #123 - Keep it reviewable - Smaller PRs are easier to review and merge
PR Title Format
Use a clear, descriptive title:
fix: resolve login failure on invalid tokensfeat: add support for room aliasesdocs: update installation guiderefactor: simplify event handling logictest: add tests for federation endpoints
Review Process
- A maintainer will review your PR
- Address feedback and update your PR as needed
- Once approved, a maintainer will merge your PR
Reporting Issues
Bug Reports
Use the bug report template and include:
- Palpo version or git SHA
- Whether you're running in Docker
- Client used (if applicable)
- Clear description of the problem
- Steps to reproduce
Feature Requests
Use the feature request template and:
- Describe the feature clearly
- Explain the use case
- Note: Don't request missing Matrix spec features as issues
Questions?
- Check existing issues and discussions
- Open a new issue for questions about contributing
Thank you for contributing to Palpo!