Contributing to Snowflake Desktop
Core Principles
The Snowflake Desktop project welcomes contributions from the developer community. We strive to maintain high standards of code quality, documentation, and user experience. This document describes the process for contributing to the project.
Development Setup
Environment Requirements
- Node.js (latest LTS version)
- pnpm (for package management)
- Rust (stable version)
- Tauri CLI
Setting Up the Development Environment
Clone the repository:
bashgit clone https://github.com/your-username/snowflake-desktop.git cd snowflake-desktop
Install dependencies:
bashpnpm install
Set up the development environment:
bashpnpm tauri dev
Workflow
1. Task Selection
- Review the list of open issues on GitHub
- If you plan to work on an existing issue, leave a comment to avoid duplicate work
- If you want to add new functionality, first create an issue for discussion
2. Branch Creation
Create a separate branch from main
for each task:
git checkout -b feature/feature-name
# or
git checkout -b fix/fix-description
Use the following prefixes:
feature/
- for new featuresfix/
- for fixesdocs/
- for documentation changesrefactor/
- for refactoringtest/
- for adding tests
3. Development
When developing, follow these principles:
- Follow the project's code style
- Write clean, maintainable code
- Add comments where necessary
- Update documentation when changing functionality
Commits
Use meaningful commit messages in the present tense:
feat: add character relationship visualization
fix: resolve issue with project loading
docs: update installation instructions
refactor: improve timeline performance
test: add unit tests for book module
4. Testing
Before submitting a Pull Request:
- Run existing tests:bash
pnpm test
- Add tests for new functionality
- Ensure the application works on all supported platforms
5. Creating a Pull Request
Make sure your branch is up to date with
main
:bashgit checkout main git pull git checkout your-branch git rebase main
Push your changes:
bashgit push origin your-branch
Create a Pull Request on GitHub
Fill out the PR template, describing the changes made
Link the PR to the relevant issue (if applicable)
6. Code Review
After creating a PR:
- Code will be checked by automated CI checks
- Other developers will review the code
- Make changes based on received comments if necessary
Code Standards
TypeScript / Vue 3
- Use Composition API
- Follow Vue Style Guide recommendations (priority A and B)
- Use TypeScript for all new components
- Define types for all parameters and return values
Rust / Tauri
- Follow official Rust style guidelines
- Use Rust's type safety features
- Handle all potential errors
- Document public APIs
Documentation Updates
When making code changes, please update the relevant documentation:
- For new features, update
current-features.md
- For API changes, update the relevant sections of technical documentation
- For UI changes, update the user guide
Getting Help
If you have questions:
- Ask them in Discussions on GitHub
- Use the Issues section for problem reports
- Contact the core developers through the provided contacts
Thank you for your interest in Snowflake Desktop! Your contributions help improve the project and make it more useful for writers.