Contributing Guide
As of March 2026. Contributions to the Presto ecosystem are welcome, whether you're fixing a typo or contributing a new feature.
Prerequisites
Before you start contributing, make sure your development environment is set up. Refer to the Environment Setup Guide to install the following tools:
- Git
- Node.js + npm
- Go (if contributing to the Presto main repository)
- VSCode + Claude Code (recommended AI-assisted development tools)
Verification: Run git --version && node --version && go version to confirm all tools are available.
Branching Strategy
All Presto repositories follow a single main branch strategy (simplified GitHub Flow model):
mainis the only long-lived branch and is always kept in a releasable state- All development happens on short-lived feature branches created from
main - There are no develop, release, or other extra branches
Feature branch naming convention:
| Prefix | Purpose | Example |
|---|---|---|
feat/ | New feature | feat/dark-mode |
fix/ | Bug fix | fix/pdf-export-crash |
docs/ | Documentation | docs/update-glossary |
refactor/ | Refactoring | refactor/template-engine |
Development Workflow
Step 1: Fork the Repository
Fork the target repository to your account on GitHub.
Verification: You can see https://github.com/<your-username>/<repo-name> in your browser.
Step 2: Clone and Configure Upstream
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>
git remote add upstream https://github.com/Presto-io/<repo-name>.gitVerification: git remote -v shows origin (your Fork) and upstream (Presto-io original repo).
Step 3: Create a Feature Branch
git checkout main
git pull upstream main
git checkout -b feat/your-feature-nameVerification: git branch shows you're on the new branch.
Step 4: Develop and Commit
Follow the Commit Convention below for your changes. Small, focused commits are recommended --- each commit should do one thing.
Step 5: Push and Create a PR
git push origin feat/your-feature-nameThen create a Pull Request on GitHub, targeting upstream/main.
Verification: You can see your PR on GitHub, and CI checks begin running.
Commit Convention
Commit messages use Chinese, in the format <type>: <description>.
| Type | Purpose | Example |
|---|---|---|
feat | New feature | feat: add dark mode support |
fix | Bug fix | fix: fix CJK garbled text in PDF export |
refactor | Refactoring (no behavior change) | refactor: extract template parser into separate module |
ui | UI adjustments | ui: adjust sidebar width |
sec | Security-related | sec: fix path traversal vulnerability |
docs | Documentation | docs: update glossary |
chore | Build/tooling/dependencies | chore: upgrade Go to 1.23 |
merge | Branch merge | merge: merge feat/dark-mode |
PR Workflow
The project currently doesn't have a PR template, but it is recommended that your PR description includes the following:
- What was done: Briefly describe the changes
- Why: Explain the motivation or related issue (if any)
- How to verify: Describe how to test your changes
Example:
## What was done
Added 3 missing terms to the glossary.
## Why
Users reported encountering unfamiliar terms while reading the template developer guide.
## How to verify
Run `npm run check` to confirm lint passes.After submitting a PR:
- Wait for CI checks to pass (if configured)
- Wait for maintainer review
- After addressing feedback, push to the same branch to automatically update the PR
Coding Conventions
Each repository has different tech stacks and convention requirements. For the complete AI development guide, refer to the AI Development Guide.
Presto Main Repository (Go)
- Use
gofmtto format code - Error handling: return
error, don't usepanic - Log format:
log.Printf("[module] ...") - Security annotations: use
// SEC-XX:comments to mark security-related code - Do not introduce new third-party Go dependencies (unless discussed in advance)
Presto Frontend (Svelte 5 + TypeScript)
- Use Svelte 5 runes syntax (
$state,$derived,$effect) - TypeScript strict mode
- Components go in
frontend/src/lib/components/ - API clients go in
frontend/src/lib/api/ - State management uses
.svelte.tsfiles
Presto-doc (Markdown)
- Toolchain: markdownlint-cli2 + prettier + autocorrect
- Line length limit: 120 characters (tables excluded)
- Run
npm run checkbefore committing to confirm zero errors - The repository has a husky pre-commit hook configured that automatically checks staged files
First-Time Contribution Suggestions
Not sure where to start? Here are some beginner-friendly contribution ideas:
- Documentation fixes: Fix typos, outdated links, or inaccurate descriptions
- Dependabot PR Review: Help review auto-created dependency update PRs to confirm CI passes and there are no breaking changes
- User experience improvements: Based on your experience using Presto, suggest improvements or submit issues
- Add tests: Add test cases for existing features
Every contribution is valuable --- we look forward to your participation.
