Contributing Guide
Thank you for your interest in Sea Lantern. This guide explains how to contribute to the project.
Acceptable PR Scope
For contributors outside the project organization, accepted PRs should have clear scope and reasonable review cost. We especially welcome:
- documentation fixes;
- i18n text fixes;
- clear and small typo, link, or wording fixes;
- high-quality, reproducible bug fixes that are not AI-generated in bulk;
- features, refactors, or behavior changes that were discussed in an issue and accepted by the project team.
Note
For larger feature, architecture, interaction, or directory-structure changes, open an issue first. High-cost PRs submitted without prior discussion may be closed directly.
Why?
This keeps contribution review manageable, avoids work that conflicts with the development team's current plans, and still leaves room for high-quality fixes and accepted proposals.
Our principle is that the value of a contribution should be greater than the effort required to review it.
Please communicate with the project team before starting larger work.
Development team invitations consider:
- engineering judgment and code quality;
- understanding of project structure, boundaries, and maintenance cost;
- prior project experience and debugging ability;
- communication, collaboration, and willingness to maintain work over time;
- consistency and reliability across contributions.
Development Environment
| Dependency | Version |
|---|---|
| Node.js | 22.12.0+ |
| Rust | stable |
| pnpm | 11.11.0 |
Code Style
Rust
Formatting
bashcargo fmt --allChecks
bashcargo clippy --workspace -- -D warningsNaming
- Files:
snake_case, such asserver_manager.rs. - Functions:
snake_case, such asget_server_list. - Structs:
PascalCase, such asServerInstance. - Constants:
SCREAMING_SNAKE_CASE, such asMAX_MEMORY.
- Files:
Comments
- Public APIs should have doc comments.
- Complex logic should have useful inline comments.
- Avoid meaningless comments.
- Avoid unprofessional comments.
Error handling
- Return errors with
Result<T, String>where that is the local pattern. - Error messages should be clear and user-friendly.
- Avoid
unwrap(). Prefer?orunwrap_orwhen appropriate.
- Return errors with
Frontend
Vue components
- Use
PascalCasecomponent names, such asServerCard.vue. - Use
<script setup>. - Props and emits must be typed.
- Use
TypeScript
- Keep strict mode enabled.
- Avoid
any; prefer concrete types. - Use
PascalCasefor interface names.
Styles
- Use CSS variables such as
var(--sl-*). - Avoid hard-coded colors.
- Use scoped styles where appropriate.
- Use CSS variables such as
Formatting and checks
bashpnpm fmt pnpm fmt:check pnpm lint pnpm lint:fixTyped refs
- Give declared variables clear types.
- Avoid
any. - Use generic types with
ref<T>orreactivewhen needed.
UI Components and Icons
- Prefer Headless UI for Vue v1 and on-demand icon imports such as Lucide.
- Headless UI provides accessible unstyled interaction primitives such as
Listbox,Disclosure, andDialog. - Use icon components instead of repeating hard-coded SVG paths.
- Prefer Headless UI
Listboxfor custom select controls, and Lucide icons for common icon needs.
This keeps DOM duplication lower, improves accessibility consistency, and separates behavior from styling.
Git Workflow
Branch Naming
feat/name- new featurefix/description- bug fixrefactor/task- refactorchore/task- maintenancedocs/description- documentation
Commits
Commit messages are no longer enforced by local hooks or CI, but they should remain clear and readable.
Recommended style:
feat(scope): add something
fix: fix a specific problem
chore: adjust build or directory structureRun the necessary checks before committing. CI will continue to check quality on PRs and pushes.
Pull Request Flow
Fork and create a branch
bashgit checkout -b feat/your-featureDevelop and commit
bashcargo fmt --all -- --check cargo clippy --workspace -- -D warnings pnpm fmt:check pnpm lint pnpm build git add . git commit -m "feat(scope): your change"Push and open a PR
bashgit push origin feat/your-featurePR title and description
- Keep the title short and clear.
- Include a summary, test method, and related issue if any.
Review Standards
Expected
- CI passes.
- Formatting is correct.
- No clippy warnings.
- No oxlint warnings.
- The feature is complete and usable.
- No obvious performance problems.
Recommended
- Useful comments where appropriate.
- Tests where applicable.
- Related docs updated.
- UI changes follow the design style.
FAQ
How do I run the development environment?
pnpm install
pnpm tauri:devHow do I build a release version?
pnpm tauri:buildDo not use local builds as official release artifacts.
For official and Nightly releases, follow the current GitHub Actions workflows in the repository.
What if clippy fails?
- Read the warning.
- Try
cargo clippy --fixfor automatic fixes. - Fix the remaining issues manually.
- If a lint is unreasonable, use a scoped
#[allow(clippy::...)].
What if formatting fails?
Try:
cargo fmt --allGetting Help
- Ask in an issue.
- Contact maintainers.
- Read the project docs.
Code of Conduct
- Respect all contributors.
- Stay friendly and professional.
- Accept constructive feedback.
- Help new contributors.
Thank you again for contributing.