Skip to content
Documentation GitHub
Getting Started

CONTRIBUTING

Thank you for your interest in contributing to Inklings. This guide covers everything you need to get started.

Getting Started

For prerequisites (Node.js, pnpm, Rust, gitleaks, platform-specific dependencies) and initial setup, see Getting Started.

Additional dev tools:

  • git-cliff (brew install git-cliff) — changelog generator, used by tools/release.sh
  • dprint (brew install dprint) — markdown formatter
  • uv (brew install uv on macOS, or https://docs.astral.sh/uv/) — Python package manager, required for apps/python-sidecar/

Finding Work

  • Browse open issues for tasks
  • Issues labeled good first issue are suitable for new contributors
  • Comment on an issue to claim it before starting work
  • If you want to work on something not yet tracked, open an issue first to discuss the approach

Architecture Overview

Inklings is a polyglot modular monolith with Clean Architecture. Compile-time enforcement is achieved via separate Rust crates with a strict dependency direction:

Framework → Infrastructure → Application → Domain

See the Development Guide for full details.

Layer Organization

LayerPathResponsibility
Domaincrates/domain/Pure business entities, no external deps
Applicationcrates/application/Use cases + service traits
Infrastructurecrates/infrastructure/Storage, import, embedding, sync, etc.
Commandscrates/commands/Transport-agnostic validation + error sanitization
Frameworkapps/desktop/src-tauri/Tauri commands wiring everything together
Frontendapps/desktop/src-react/React UI (TypeScript)

Development Methodology

All features are implemented end-to-end through all layers (vertical slicing), not layer-by-layer:

  1. Domain (Rust entity/validation)
  2. Application (Rust use case + service traits)
  3. Infrastructure (storage implementation)
  4. Framework (Tauri command)
  5. Frontend (React component)

Rule: If you can’t demo it, you haven’t finished it.

Each use case gets its own file. See the Development Guide for full details and the file-per-use-case pattern.

Testing Strategy

LayerApproachCoverage Target
DomainPure unit tests100%
ApplicationUnit tests with mocked repos>90%
InfrastructureUnit tests with temp dirs>80%
IntegrationReal SQLite (tests/core/)Key scenarios
FrontendPlaywright with mocked backendCritical paths

Test naming convention: test_[what]_[condition]_[expected]

Terminal window
cargo test # Rust unit + integration tests
cargo test -p core-tests # Rust integration tests (real SQLite, in tests/core/)
pnpm test # All tests via Turbo (Playwright frontend integration tests in apps/desktop/tests/)

Code Conventions

Rust

  • Linting: cargo clippy — all warnings must be resolved before committing
  • Formatting: cargo fmt

TypeScript

  • Linting: pnpm lint (oxlint)
  • Type checking: pnpm typecheck

Commit Messages

Follow Conventional Commits format:

<type>(<scope>): <description>
TypeWhen to use
featNew feature or capability
fixBug fix
refactorCode restructuring without behavior change
choreBuild, tooling, dependency changes
docsDocumentation changes
testAdding or fixing tests
perfPerformance improvements

Examples:

  • feat(editor): add image block drag-and-drop
  • fix(sync): advance cursor only after successful merge
  • refactor(application): extract shared loop driver
  • chore(ci): exclude http-bridge from CI compilation
  • docs(contributing): rewrite with updated paths
  • test(integration): add page lifecycle smoke test

Pre-commit Hook

The pre-commit hook runs gitleaks (secret scanning) only. Formatting and linting are not enforced at commit time.

Before submitting a PR, run the quality gate:

Terminal window
./tools/precheck.sh --fix # auto-fix formatting/linting, then validate

Pull Request Process

  1. Create a feature branch from main
  2. Implement your changes following the vertical slicing approach
  3. Ensure tests pass: cargo test and pnpm test
  4. Ensure linting passes: cargo clippy, cargo fmt --check, pnpm lint
  5. Write a clear PR description explaining what changed and why
  6. Request review from a maintainer
Infrastructure Provisioning (release managers only)

The tools/provision/ directory contains scripts that automate deployment configuration (GitHub secrets, Supabase auth/SMTP, Sentry, Cloudflare, signing, distribution).

Quick Start

Terminal window
# Bootstrap will auto-install missing CLI tools (gh, jq, curl) via your package manager
./tools/provision/bootstrap.sh --environment staging --dry-run

Auto-Installed Prerequisites

The bootstrap script detects your OS and package manager, then offers to install missing tools:

ToolmacOS (brew)Linux (apt/dnf/pacman)Windows (winget/choco/scoop)
ghghghGitHub.cli
jqjqjqjqlang.jq
curlcurlcurlcURL.cURL

Manual Prerequisites (cannot be scripted)

These require interactive setup or access to external dashboards:

PrerequisiteHow to set up
GitHub CLI authgh auth login — requires browser-based OAuth flow
Supabase access tokensupabase.com/dashboard/account/tokens → Generate new token
Sentry auth tokensentry.io → Settings → Auth Tokens → Create New Token (scopes: project:read, org:read)
Cloudflare API tokendash.cloudflare.com/profile/api-tokens → Create Token → Edit Cloudflare Workers
Resend API keyresend.com/api-keys → Create API Key (domain must be verified first)
Google OAuth credentialsconsole.cloud.google.com → APIs & Services → Credentials → OAuth 2.0 Client IDs
Apple OAuth credentialsdeveloper.apple.com → Certificates, Identifiers & Profiles → Service IDs
Apple Developer enrollmentdeveloper.apple.com/programs — required for code signing (INK-161)
Apple code signing certificateXcode → Settings → Accounts → Manage Certificates → export .p12
Windows signing providerChoose one: SignPath, SSL.com eSigner, or Azure Trusted Signing
CrabNebula accountcrabnebula.dev — for desktop app distribution
Tauri updater key passwordYou choose this — used when running tools/provision/signing/generate-tauri-keys.sh

All manual credentials go into tools/provision/.env.provision (gitignored). See tools/provision/.env.provision.example for the full template.

Validation

After provisioning, verify everything is in place:

Terminal window
./tools/provision/validate.sh --environment staging

This prints a pass/fail report card for all services without making any changes.

Releasing

Releases are managed by tools/release.sh, which automates version bumping, changelog generation, tagging, and production deployment:

Terminal window
./tools/release.sh # Full release (tests + version bump + tag + deploy)
./tools/release.sh --dry-run # Preview version + changelog without changes
./tools/release.sh --skip-tests # Skip quality gate
./tools/release.sh --skip-deploy # Version + tag only, no production promotion

The script uses git-cliff to calculate the next semantic version from conventional commit messages and generate categorized release notes (Features, Bug Fixes, Performance, Breaking Changes).

Version is synced across three files: Cargo.toml (workspace), tauri.conf.json, and pyproject.toml.

Documentation

License

This project is proprietary software. See LICENSE for details.

Was this page helpful?