# Contributing to MDHero Thanks for your interest in MDHero! This is a side project, so response times may vary — but contributions are very welcome. --- ## Ways to Contribute - **Report bugs** — Open an issue with clear reproduction steps and your OS/version. - **Suggest features** — Open an issue describing the problem you're solving (not just the solution). - **Submit PRs** — Bug fixes are welcome anytime. For features, please open an issue first to discuss. - **Improve docs** — README, keyboard shortcuts, install instructions — PRs for typos and clarifications are always welcome. --- ## Before You Start a Large PR **Please open an issue first.** This saves everyone time: - The feature may already be in progress - It may not fit the project's direction - We can discuss the approach before you write code Small PRs (bug fixes, typos, minor tweaks) don't need an issue first. --- ## Development Setup ### Requirements - **Node.js** 22+ - **pnpm** 10+ - **Rust** stable toolchain - **Xcode Command Line Tools** (macOS) or **MSVC Build Tools** (Windows) ### Setup ```bash # Clone git clone https://github.com/vaibhavuk-dev/mdhero.git cd mdhero # Install dependencies pnpm install # Run dev server with hot reload pnpm tauri dev ``` Port 1420 is used for dev. If it's stuck, free it with: ```bash lsof -ti:1420 | xargs kill -9 ``` ### Common Commands ```bash pnpm tauri dev # Dev with hot reload (frontend + Rust) pnpm tauri build # Production build (outputs DMG/MSI) pnpm build # Build frontend only (SvelteKit static) pnpm check # TypeScript type checking ``` --- ## Code Style ### General - **Keep changes focused.** Don't bundle unrelated changes in one PR. - **Match existing patterns.** Read nearby code before introducing new conventions. - **Prefer editing over creating.** Only add new files when there's a clear reason. - **No unnecessary abstractions.** Three similar lines is better than a premature abstraction. ### Frontend (Svelte / TypeScript) - Svelte 5 runes syntax: `$state()`, `$props()`, `$effect()`, `$derived()`. No legacy APIs. - Tailwind CSS v4 — use utility classes; reserve `