Thank you for considering contributing to Kanban! This guide will help you get started with development.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fulsomenko/kanban/llms.txt
Use this file to discover all available pages before exploring further.
Development Setup
Prerequisites
Rust 1.70+
Install via rustup
Nix (Recommended)
For reproducible environment
Getting Started
Enter development shell
Using Nix (recommended):This provides:
- Rust toolchain (stable, rust-analyzer, rust-src)
- cargo-watch, cargo-edit, cargo-audit, cargo-tarpaulin
- bacon (background compiler)
Common Commands
Building
Running
Development Tools
- Auto-reload
- Background Compiler
- Fast Check
- Linting
- Formatting
Testing
Code Style Guidelines
Rust Best Practices
Function Parameters
Function Parameters
Prefer
&str over String for function parameters:Return Types
Return Types
Use
impl Trait for return types when appropriate:Error Handling
Error Handling
Use
Result<T, E> for recoverable errors, panic! only for unrecoverable:Function Size
Function Size
Keep functions small and focused (< 50 lines):
Project-Specific Conventions
Module Organization:- Each file should be < 300 lines
- Extract reusable patterns into separate modules
- Follow existing module structure:
app.rs- Application state and event handlingui.rs- Rendering logicevents.rs- Event loop and input handlinginput.rs- Input state managementdialog.rs- Dialog interaction patternseditor.rs- External editor integration
- All public APIs return
KanbanResult<T> - Use
thiserrorfor error definitions - Provide context in error messages
- Log errors with
tracing::error!
Architecture Principles
See the Architecture page for detailed information on:- SOLID principles applied to this codebase
- Workspace structure and dependency flow
- Design patterns (Command, Repository, Observer)
- Crate descriptions and responsibilities
Development Workflow
Domain-First Approach
State Management & Persistence
The application uses a command pattern for all state mutations: Flow:- Event Handler (kanban-tui): Processes keyboard input
- Command (kanban-domain): Encapsulates mutation
- StateManager (kanban-tui): Executes command via
CommandContext - CommandContext: Applies mutation to data vectors
- Dirty Flag: StateManager marks state as dirty
- Progressive Save: Auto-saves immediately via async channel
- Progressive Auto-Save: Changes saved immediately after each operation
- Conflict Detection: Multi-instance changes detected via file metadata
- Format Versioning: Automatic V1→V2 migration with backup creation
- Atomic Writes: Crash-safe pattern prevents corruption
StateManager handles dirty flags and persistence automatically. You just execute commands!
Testing
Writing Tests
- Unit Tests
- Integration Tests
- Guidelines
Tests go in the same file as implementation:
Branching and Release Workflow
Branch Strategy
develop → master release workflow:Commit Messages
Use semantic commit format:feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding/updating testschore: Maintenance tasksci: CI/CD changes
Monorepo Versioning
- Root
Cargo.tomldefines workspace version:version = "X.Y.Z" - All crates reference via
version.workspace = true - Cross-crate dependencies use path-only:
{ path = "../kanban-core" }(no version) - Prevents version skew during publishing
kanban-core(no internal dependencies)kanban-domain(depends on kanban-core)kanban-persistence(depends on kanban-domain)kanban-tui(depends on kanban-persistence)kanban-cli(depends on all others)kanban-mcp(depends on kanban-domain)
Release Validation
Before publishing, validate the release:- All crates use workspace versioning
- No hardcoded versions in path dependencies
- Entire workspace builds correctly
- Dry-run publish for each crate
- Dependency resolution validation
This runs automatically in CI on PRs to
develop and master.Pull Request Guidelines
Before Submitting
- Checklist
- Format
- Run
cargo fmt --allto format code - Run
cargo clippy --all-targets --all-features -- -D warnings - Run
cargo testand ensure all tests pass - Test manually with
cargo run - Create changeset with
./scripts/create-changeset.sh - Update README.md if adding user-facing features
- Update CLAUDE.md if changing architecture/conventions
Changesets
Create.changeset/<descriptive-name>.md:
patch- Bug fixes, small changes (0.1.0 → 0.1.1)minor- New features, backwards compatible (0.1.0 → 0.2.0)major- Breaking changes (0.1.0 → 1.0.0)
- Version automatically bumps based on changeset
- CHANGELOG.md updates with your description
- New version publishes to crates.io
- GitHub release created with tag
Code Review Process
Areas for Contribution
UI Improvements
Enhance TUI rendering, add color themes, improve layouts
Features
New metadata fields, filtering options, search improvements
Testing
Increase test coverage, add integration tests
Documentation
Improve docs, add examples, tutorials
Performance
Optimize rendering, reduce allocations, profiling
Refactoring
Extract patterns, improve modularity, simplify code
CI/CD and GitHub Secrets
Required Secrets
Configure these secrets in GitHub repository settings:CARGO_REGISTRY_TOKEN
CARGO_REGISTRY_TOKEN
Required for: Publishing to crates.ioHow to obtain:
- Login to crates.io with GitHub account
- Go to Account Settings → API Tokens
- Create new token with “publish-update” scope
- Add to GitHub: Settings → Secrets → Actions → New repository secret
DEPLOY_KEY
DEPLOY_KEY
Required for: Automated git commits and tag pushesHow to generate:
- Add public key (deploy_key.pub) to GitHub: Settings → Deploy keys → Add (with write access)
- Add private key (deploy_key) to GitHub: Settings → Secrets → Actions → New repository secret
CI/CD Workflows
ci.yml - Runs on all pushes and PRs:- Format check (
cargo fmt) - Linter (
cargo clippy) - Tests (
cargo test) - Build validation
- Changeset validation (PRs to develop)
- Checks for changesets (skips if none)
- Bumps version based on changesets
- Updates CHANGELOG.md
- Publishes to crates.io
- Creates GitHub release with tag
Questions?
Bug Reports
Open an issue for bugs
Feature Requests
Suggest new features
Discussions
Ask design questions
