Development Workflow
Getting Started
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or fix
- Make your changes
- Test your changes thoroughly
- Commit with clear messages
- Push to your fork
- Open a pull request
Setting Up Development Environment
# Clone the repository
git clone https://github.com/YOUR_USERNAME/CryptArtistStudio.git
cd CryptArtistStudio/v1
# Install dependencies
npm install
# Start development server
npm run tauri dev
Creating a Feature Branch
# Create and switch to a new branch
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/bug-description
Committing Changes
Use clear, descriptive commit messages:
# Good commit message
git commit -m "feat: Add keyboard shortcut for Mummy toggle (Ctrl+Shift+M)"
# Bad commit message
git commit -m "fixed stuff"
Code Style
TypeScript/JavaScript
- Use TypeScript for all new code
- Follow ESLint rules (configured in project)
- Use 2-space indentation
- Use const/let, avoid var
- Use arrow functions for callbacks
- Add JSDoc comments for public functions
- Use meaningful variable names
Rust
- Follow Rust naming conventions (snake_case for functions)
- Use rustfmt for code formatting
- Run clippy for linting:
cargo clippy
- Add doc comments for public functions
- Handle errors explicitly with Result types
- Avoid unwrap() in production code
CSS/Styling
- Use TailwindCSS utility classes
- Avoid inline styles
- Use consistent spacing and sizing
- Follow dark theme design
- Test on multiple screen sizes
Comments and Documentation
- Write clear comments for complex logic
- Update documentation when changing behavior
- Add examples for new features
- Keep comments up-to-date with code
Pull Request Guidelines
Before Opening a PR
- Ensure your code compiles without errors
- Run tests:
npm test and cargo test
- Check code style:
npm run lint and cargo clippy
- Rebase on latest main branch
- Squash related commits into logical units
PR Title and Description
Use a clear title following this format:
feat: Add feature description
fix: Fix bug description
docs: Update documentation
refactor: Refactor component name
perf: Improve performance of feature
In the description, include:
- What changes were made and why
- How to test the changes
- Any breaking changes
- Related issues (use #issue-number)
Review Process
- Maintainers will review your PR
- Address feedback and make requested changes
- Push updates to the same branch
- Once approved, your PR will be merged
Merge Conflicts
If your PR has merge conflicts:
# Update your branch with latest main
git fetch origin
git rebase origin/main
# Resolve conflicts in your editor
# Then continue the rebase
git rebase --continue
# Force push to your branch
git push --force-with-lease
Testing
Frontend Tests
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverage
Backend Tests
# Run all Rust tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test
cargo test test_name
Manual Testing
- Test on Windows, macOS, and Linux if possible
- Test with different screen sizes
- Test with different API providers
- Test error cases and edge cases
Areas for Contribution
Good First Issues
Look for issues labeled "good first issue" on GitHub - these are perfect for new contributors.
Help Wanted
Issues labeled "help wanted" are areas where maintainers would appreciate community contributions.
Documentation
- Improve existing documentation
- Add examples and tutorials
- Fix typos and clarity issues
- Add translations
Features and Improvements
- New program ideas
- UI/UX improvements
- Performance optimizations
- New integrations
Bug Fixes
- Fix reported bugs
- Improve error handling
- Security improvements
Thank you for contributing! Every contribution, no matter how small, helps make CryptArtist Studio better for everyone. We appreciate your time and effort.