Thank you for your interest in contributing to SyncVault! This document provides guidelines and instructions for contributing to the project.
- Be respectful and considerate in your interactions
- Focus on constructive feedback
- Help create a welcoming environment for all contributors
- Flutter SDK >= 3.35.0
- Dart SDK >= 3.9.0
- Git
- A code editor (VS Code or Android Studio recommended)
-
Fork the repository on GitHub
-
Clone your forked repository:
git clone https://github.com/<your_name>/SyncVault.git
cd SyncVault- Install dependencies:
flutter pub get- Run the app to verify setup:
flutter runAlways sync with the upstream repository before starting work:
git checkout master
git pull upstream master
git push origin masterCreate a new branch for your work. Use descriptive names with appropriate prefixes:
feat/orfeature/- New featuresfix/orbugfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or changeschore/- Build process or auxiliary tool changes
Example:
git checkout -b feat/add-dropbox-support- Write clean, readable code
- Follow existing code style and conventions
- Add comments for complex logic
- Update documentation as needed
- Add tests for new functionality
Before committing, ensure your code passes all checks:
# Format code
dart format .
# Analyze code
dart analyze
# Run tests
flutter testThere are CI/CD workflows in place that check linting and formatting and will fail if these local checks also fail.
Write clear, concise commit messages following these guidelines:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit first line to 72 characters
- Reference issues and pull requests when relevant
Example:
git add .
git commit -m "feat: add Dropbox integration for file sync
- Implement Dropbox OAuth2 authentication
- Add file upload/download methods
- Update UI to show Dropbox as provider option
Fixes #123"git push -u origin feat/add-dropbox-supportThen on GitHub:
- Navigate to your fork
- Click "Compare & pull request"
- Ensure you're comparing your feature branch to
upstream/master - Fill in the PR template with:
- Clear title summarizing the change
- Description of what changed and why
- Link to related issues
- Screenshots for UI changes
- Any breaking changes or migration notes
- Respond to feedback constructively
- Make requested changes in new commits
- Once approved, a maintainer will merge your PR
- Follow Effective Dart guidelines
- Use single quotes for strings
- Prefer
constconstructors where possible - Use meaningful variable and function names
- Keep functions small and focused on a single task
- Use
fpdartfor functional error handling (Either, Option, TaskEither) - Use
freezedfor immutable data classes - Use
riverpodfor state management - Log errors appropriately using the error logging system
- Add dartdoc comments to public APIs
- Write unit tests for business logic
- Write widget tests for UI components
- Ensure tests are deterministic and independent
- Place tests in the
test/directory mirroringlib/structure
Thank you for contributing to SyncVault!