Thank you for your interest in contributing to SublinkPro! This guide will help you get started.
- Fork and clone the repository
- Set up your environment - see Development Guide
- Create a branch from
devfor your changes - Make your changes following our guidelines below
- Test your changes - see Testing
- Submit a pull request to the
devbranch
main- Stable release branchdev- Development branch (target for PRs)feature/*- Feature branchesfix/*- Bug fix branches
Use semantic commit prefixes:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions or updateschore:- Build process, dependency updates, or tooling changes
Examples:
feat(airports): add batch subscription update support
fix(auth): enhance SSE authentication error handling
docs(i18n): update internationalization requirements
Critical rule: When a change affects multiple layers of the application, all impacted layers must be updated together in the same PR.
If your backend change affects APIs, fields, permissions, response structures, routes, or task results:
- ✅ Update frontend request layer (
webs/src/api/) - ✅ Update frontend views (
webs/src/views/) - ✅ Update documentation
- ✅ Update skill API reference (
skill-sublinkpro/reference/api.md)
If your frontend change affects API dependencies, auth behavior, field semantics, page flows, or routing:
- ✅ Verify backend implementation matches
- ✅ Update documentation if user-facing behavior changes
- ✅ Update both English and Chinese (
*.zh-CN.md) versions together - ✅ Keep language switches and relative links consistent
- ✅ Update code, documentation, and example files together
- ✅ Update
skill-sublinkpro/reference/deploy.mdif deployment-related
Run from webs/ directory:
yarn run lint # Required for all frontend changes
yarn run build # Required when affecting build, routing, or assets
yarn run lint:fix # Auto-fix linting issues
yarn run prettier # Format codeRun from repository root:
gofmt -w <changed-files> # Format changed Go files
golangci-lint run # Run linter
go test ./... # Run all testsWhen modifying frontend UI colors, surfaces, or visual elements:
- ✅ Check both light and dark modes
- ✅ Check desktop and mobile views
- ✅ Check hover, active, disabled, and focus states
- ✅ See Frontend Theme Guidelines for comprehensive rules
This project maintains bilingual support (Chinese and English):
- ✅ New user-facing frontend text requires translations in both
zh-CNanden-US - ✅ Use
useTranslation()/Transcomponents in React - ✅ Backend responses for Web UI should include
i18nKey+i18nParams - ✅ Update both English and Chinese documentation versions
See Internationalization Guide for complete requirements.
- Add comments for complex business logic, cross-layer contracts, and non-obvious algorithms
- Comments should explain intent and constraints, not restate code
- Update comments when changing nearby code
- See Development Guide for detailed standards
- Add or update tests when changing key business logic, APIs, or protocols
- Test names should describe scenario and expected outcome
- Tests must be isolated and not depend on execution order or external state
- See Development Guide for detailed standards
- Ensure your PR targets
dev(notmain) - Fill out the PR template completely
- Link related issues if applicable
- Verify all checks pass:
- Frontend:
yarn run lintandyarn run build - Backend:
golangci-lint runandgo test ./...
- Frontend:
- Request review from maintainers
- Address feedback promptly
Automated checks run when PRs are opened, reopened, or marked ready for review:
- Backend:
golangci-lintandgo test ./... - Frontend:
yarn run lintandyarn run build
To manually re-trigger checks, comment /recheck on your PR.
When your change affects behavior visible to users or developers:
- ✅ Update relevant files in
docs/ - ✅ Update
README.mdif appropriate - ✅ Update feature documentation in
docs/features/if applicable - ✅ Keep bilingual consistency (English and
*.zh-CN.md)
For architectural guidance and detailed contribution requirements, see AGENTS.md, which covers:
- Project structure and boundaries
- Tech stack and mihomo integration
- Configuration rules
- Frontend-backend contracts
- High-value areas to inspect before changes
Please read our Code of Conduct before contributing.
- 📖 Read the Development Guide
- 🐛 Report bugs via GitHub Issues
- 💬 Join discussions on GitHub Discussions
- 📱 Chat on Telegram: SublinkPro Community
By contributing to SublinkPro, you agree that your contributions will be licensed under the same license as the project.