Welcome
Contributions and suggestions are welcome! Scratch is designed to be a minimal, focused note-taking app with exceptional user experience.What makes Scratch special is its minimal feature set and focus on user experience. We’re not trying to build Obsidian or Notion, so not every feature will be a fit.
Before Contributing
Small Fixes and Improvements
Go ahead and open a PR for:- Bug fixes
- Performance improvements
- UI/UX refinements
- Documentation updates
- Code quality improvements
Bigger Changes
If you’re not sure whether a feature fits Scratch’s philosophy:Open an issue first
Describe the feature and explain how it aligns with Scratch’s minimal, focused approach.
Development Philosophy
Scratch prioritizes:- Simplicity - Minimal feature set, focused on core note-taking
- Performance - 5-10x smaller and faster than alternatives
- User Experience - Keyboard-first, distraction-free, polished
- Code Quality - Clean, maintainable, low technical debt
Code Quality Standards
General Principles
- Clean codebase - No commented-out code or TODOs in production
- Type safety - TypeScript throughout the frontend
- Proper patterns - React contexts, hooks, memoization where appropriate
- Performance first - Debouncing, async operations, memoization
Frontend (React/TypeScript)
Backend (Rust)
Pull Request Process
Address CodeRabbit comments
The repository uses CodeRabbit for automated code review. Address any comments before requesting review.
Testing Guidelines
Manual Testing
Since Scratch focuses on user experience, thorough manual testing is essential:-
Core workflows:
- Creating, editing, and deleting notes
- Search functionality
- Wikilinks and markdown features
- Keyboard shortcuts
-
Edge cases:
- Large notes (>10,000 lines)
- Many notes (>1,000 files)
- Special characters in titles
- External file modifications
-
Platform-specific:
- Test on macOS, Windows, or Linux as applicable
- Verify native integrations work correctly
Performance Testing
- Check auto-save doesn’t cause lag
- Verify search is responsive with many notes
- Ensure file watcher doesn’t impact performance
Development Setup
See the Building from Source guide for detailed setup instructions.Quick Start
Code Style
TypeScript/React
- Use functional components with hooks
- Prefer
constoverlet - Use arrow functions for callbacks
- Extract complex logic into custom hooks
- Keep components small and focused
Rust
- Follow standard Rust formatting (
cargo fmt) - Use
clippyfor linting (cargo clippy) - Prefer
anyhowfor internal error handling - Convert errors to strings at Tauri command boundaries
Naming Conventions
- Components: PascalCase (
EditorToolbar.tsx) - Hooks: camelCase with
useprefix (useNotes.ts) - Utilities: camelCase (
formatDate.ts) - Constants: UPPER_SNAKE_CASE (
MAX_RESULTS) - Tauri commands: snake_case (
save_note)
Project Structure
Getting Help
If you need help with your contribution:- Open an issue for discussion
- Check existing issues for similar questions
- Review the Architecture documentation
- Look at recent PRs for examples
License
By contributing to Scratch, you agree that your contributions will be licensed under the MIT License.Recognition
All contributors are appreciated! Significant contributions will be recognized in release notes.View on GitHub
Visit the repository to get started