Skip to main content

Welcome Contributors

Thank you for your interest in contributing to Minimal Tray Tasker! This guide will help you get started with contributing to the project, whether you’re fixing bugs, adding features, or improving documentation.

Getting Started

Development Environment Setup

1

Fork and Clone

Fork the repository on GitHub and clone your fork:
git clone https://github.com/YOUR-USERNAME/minimal-tray-tasker.git
cd minimal-tray-tasker
2

Install Dependencies

Install all required dependencies:
npm i
Make sure you have the prerequisites installed:
  • Node.js v18 or higher
  • Rust 1.77.2 or higher
  • Platform-specific Tauri dependencies
3

Verify Setup

Run the development server to ensure everything works:
npm run tauri dev
The application should launch successfully.
4

Create a Branch

Create a new branch for your changes:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-description

Code Style Guidelines

TypeScript/JavaScript

The project uses TypeScript with strict type checking:
  • Type everything - Avoid using any, prefer explicit types
  • Async/await - Use async/await for asynchronous operations
  • Svelte conventions - Follow Svelte 5 runes patterns ($state, $derived, $effect)
Example:
// Good
async function addTracker(name: string, amount: number): Promise<void> {
    await TrackerService.add(name, amount);
}

// Avoid
function addTracker(name, amount) {
    return TrackerService.add(name, amount);
}

Rust

Follow Rust’s standard conventions:
  • Run cargo fmt before committing
  • Run cargo clippy to catch common issues
  • Error handling - Use Result types, avoid unwrapping in production code
  • Documentation - Add doc comments for public functions
Example:
/// Initializes the notification service with hourly reminders
pub async fn init(app: AppHandle) -> Result<(), Error> {
    // Implementation
    Ok(())
}

Svelte Components

  • Component files - Use PascalCase for component files (TrackerList.svelte)
  • Props typing - Define prop types explicitly
  • Reactive statements - Use Svelte 5 runes for reactivity
Example:
<script lang="ts">
import type { SelectTracker } from '$lib/db/schema';

interface Props {
    tracker: SelectTracker;
    onComplete?: () => void;
}

let { tracker, onComplete }: Props = $props();
</script>

Testing Your Changes

Manual Testing

1

Development Mode

Test your changes in development mode:
npm run tauri dev
2

Type Checking

Run TypeScript type checking:
npm run check
3

Production Build

Verify that the production build works:
npm run tauri build
4

Cross-Platform Testing

If possible, test on multiple platforms (Linux, macOS, Windows)
Pay special attention to:
  • Daily task reset functionality (test around midnight)
  • Notification delivery
  • Autostart behavior
  • Tray icon interactions
  • Window positioning on different displays

Making Changes

Frontend Changes

When modifying the Svelte frontend:
  1. Update the UI in src/routes/ or src/lib/Components/
  2. Modify services in src/lib/trackerService.ts or src/lib/settingsService.ts
  3. Update database schema in src/lib/db/schema.ts if needed
  4. Update types - Ensure TypeScript types are correct

Backend Changes

When modifying the Rust backend:
  1. Update services in src-tauri/src/services/
  2. Add migrations if changing database structure
  3. Expose commands in src-tauri/src/lib.rs via invoke_handler
  4. Update dependencies in src-tauri/Cargo.toml if needed

Database Changes

If you need to modify the database schema:
  1. Update src/lib/db/schema.ts with the new schema
  2. Create a migration in src-tauri/src/migration_manager.rs
  3. Test migration on a fresh database and existing databases
Database migrations must be backward compatible. Test thoroughly to avoid data loss.

Submitting a Pull Request

1

Commit Your Changes

Write clear, descriptive commit messages:
git add .
git commit -m "Add feature: hourly notification customization"
Use prefixes like:
  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation
  • refactor: for code refactoring
  • style: for formatting changes
2

Push to Your Fork

Push your branch to GitHub:
git push origin feature/your-feature-name
3

Create Pull Request

Open a pull request on GitHub:
  • Provide a clear title and description
  • Reference any related issues (e.g., “Fixes #123”)
  • Describe what changed and why
  • Include screenshots for UI changes
4

Address Feedback

Respond to review comments and make requested changes:
# Make changes
git add .
git commit -m "Address review feedback"
git push origin feature/your-feature-name

Pull Request Checklist

Before submitting, ensure:
  • Code follows the project’s style guidelines
  • TypeScript type checking passes (npm run check)
  • Rust code is formatted (cargo fmt)
  • No Clippy warnings (cargo clippy)
  • Application builds successfully (npm run tauri build)
  • Changes are tested manually
  • Commit messages are clear and descriptive
  • Documentation is updated if needed

Areas to Contribute

Here are some ways you can contribute:

Feature Enhancements

  • Custom notification intervals
  • Task categories and tags
  • Statistics and progress tracking
  • Dark mode themes
  • Keyboard shortcuts
  • Task import/export

Bug Fixes

  • Check the GitHub issues for reported bugs
  • Fix platform-specific issues
  • Improve error handling

Documentation

  • Improve README and setup guides
  • Add code comments
  • Create tutorial videos or blog posts
  • Translate documentation

Performance

  • Optimize database queries
  • Reduce memory usage
  • Improve startup time

Code of Conduct

We are committed to providing a welcoming and inclusive environment:
  • Be respectful - Treat all contributors with respect
  • Be constructive - Provide helpful feedback
  • Be patient - Remember that everyone has different skill levels
  • Be collaborative - Work together to improve the project

Getting Help

If you need help contributing:
  • Check existing issues - Your question might already be answered
  • Open a discussion - Ask questions in GitHub Discussions
  • Join the community - Connect with other contributors
  • Read the docs - Review the Architecture and Building guides

Project Structure Reference

Key files to know about:
// src/lib/trackerService.ts
// Main business logic for tracker operations
export const TrackerService = {
    async add(name: string, amount?: number, daily?: boolean): Promise<void> {
        // Add tracker logic
    }
};

License

By contributing to Minimal Tray Tasker, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to Minimal Tray Tasker! Your efforts help make this tool better for everyone.

Build docs developers (and LLMs) love