Thank you for your interest in contributing to TinyTerm! This document provides guidelines and instructions for contributing to the project.
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
- Check if the bug has already been reported in the Issues
- If not, create a new issue with:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, version, etc.)
- Check if the feature has already been suggested
- Create a new issue with:
- A clear description of the feature
- Use cases and benefits
- Any implementation ideas you have
- Screenshots or mockups if applicable
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes
- Add or update tests as needed
- Update documentation
- Commit your changes:
git commit -m 'Add some feature' - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
- Node.js 18+ and npm
- Rust and Cargo
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/tinyterm.git
cd tinyterm
# Install dependencies
npm install
# Install Tauri CLI
npm install @tauri-apps/cli
# Run development server
npm run tauri devtinyterm/
├── src/ # Frontend (React + TypeScript)
│ ├── components/ # React components
│ ├── store/ # Zustand state management
│ ├── styles/ # CSS styles
│ ├── types/ # TypeScript types
│ └── App.tsx # Main app component
├── src-tauri/ # Backend (Rust)
│ ├── src/commands/ # Tauri commands
│ ├── src/models.rs # Data models
│ └── Cargo.toml # Rust dependencies
└── public/ # Static assets
- Use functional components with hooks
- Follow TypeScript strict mode
- Use meaningful variable and function names
- Add JSDoc comments for complex functions
- Keep components focused and reusable
// Good example
interface Props {
title: string;
onClose: () => void;
}
export const Modal: React.FC<Props> = ({ title, onClose }) => {
return (
<div className="modal">
<h2>{title}</h2>
<button onClick={onClose}>Close</button>
</div>
);
};- Follow Rust naming conventions
- Use
anyhowfor error handling - Add documentation comments
- Write tests for critical functions
/// Connects to an SSH server using the provided bookmark
///
/// # Arguments
/// * `bookmark` - Connection details
/// * `password` - Optional password for authentication
///
/// # Returns
/// Result containing the SSH session or an error
pub fn connect_ssh(bookmark: &Bookmark, password: Option<&str>) -> Result<Session> {
// Implementation
}Follow the Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(ssh): add private key authentication support
fix(terminal): resolve memory leak in xterm.js
docs(readme): update installation instructions
# Run tests
npm test
# Run tests with coverage
npm test -- --coverage# Run Rust tests
cd src-tauri
cargo test
# Run specific test
cargo test test_ssh_connectionTest the following areas:
- SSH connections with various authentication methods
- File transfers (upload/download)
- UI responsiveness and theme switching
- Keyboard shortcuts
- Error handling and recovery
- Update README.md for significant changes
- Add JSDoc/rustdoc comments for new APIs
- Update type definitions when interfaces change
- Keep CONTRIBUTING.md up to date
When adding a new feature:
- Update the README.md Features section
- Add usage examples if applicable
- Update API documentation
- Add changelog entry
- Pull requests will be reviewed by maintainers
- Address all review comments
- Ensure all tests pass
- Update documentation as needed
- Squash commits if requested
- Code follows project standards
- Tests are added/updated
- Documentation is updated
- No breaking changes (or documented if intentional)
- Performance considerations addressed
- Security considerations addressed
# Enable debug logging
TAURI_LOG_LEVEL=debug npm run tauri dev
# Use React DevTools
# Install extension for your browser# Run with verbose logging
RUST_LOG=debug npm run tauri dev
# Check logs
tail -f ~/.config/tinyterm/logs/app.log- Update version numbers:
package.jsonsrc-tauri/Cargo.tomlsrc-tauri/tauri.conf.json
- Update CHANGELOG.md
- Create release tag:
git tag v1.0.0 - Push tag:
git push origin v1.0.0 - Create GitHub release with release notes
- Check existing documentation
- Search existing issues
- Ask in discussions
- Contact maintainers
Your contributions help make TinyTerm better for everyone. Thank you for taking the time to contribute!