Development & Contributing

How to build, test, and contribute to NH Reader.

🏗️ Project layout

wiki/            GitHub wiki source (copy to .wiki.git to publish)
src/             SvelteKit static SPA
src-tauri/       Rust backend (Tauri 2)
  src/nh_desktop.rs (API client), commands.rs (Tauri commands),
      service.rs (background queue), image_cache.rs (disk cache),
      db.rs (SQLite)

📋 Prerequisites

  • Node.js (npm) — frontend toolchain.
  • Rust (stable) + Tauri 2 prerequisites per platform (tauri docs).

⚙️ Build & run

Task Command
Install deps npm install
Dev app npm run tauri:dev (Tauri dev; Vite serves on the fixed port 14440)
Frontend type/lint npm run check
Frontend build npm run build
i18n completeness npm run check:i18n
Rust check cargo check (in src-tauri/)
Rust tests cargo test (in src-tauri/)
App release bundle npm run tauri:build:release
App debug bundle npm run tauri:build:debug
Android init npm run tauri:android:init
Android build APK npm run tauri:android:build
iOS init npm run tauri:ios:init
iOS build archive npm run tauri:ios:build

Always run npm run check for frontend changes and cargo check (+ cargo test when relevant) for Rust changes before calling a task done. For translation contributions, run npm run check:i18n.

⚠️ Working rules

  • Product identity is NH Reader (the folder name is a misnomer, not the product name).
  • Respect nhentai.net: throttle, no scraping, no hammering — it’s a public API, be polite.
  • No panics across the command boundary (return Result<_, String>).
  • Keep the changelog and documentation in sync with code changes.
  • Follow the project’s conventions before submitting code.

🤝 How to contribute

  1. Open an issue for discussion (bug or feature).
  2. Branch, implement, and verify (checks above).
  3. Open a PR to main referencing the issue.
  4. Reference the issue in the PR description when a task lands.

To contribute translations, see Contributing Translations and Localization. Language packs are 100% drop-in JSON files.

📚 Adding a documentation page

The docs/ folder is published as the GitHub Pages site from the repository’s Pages settings. To add a page:

  1. Create docs/<Page-Name>.md; the Pages layout supplies the language selector, so no Markdown translation widget is needed.
  2. Register it in docs/_data/navigation.yml, which drives the site sidebar, previous/next links, and the project page’s documentation directory.
  3. Link to other pages with relative .md paths so the links work both on GitHub and on the Pages site.

Root Markdown files are separate from the Pages documentation. GitHub does not run docs/translate.js in Markdown, so no Markdown page embeds a translation control. The Pages site translates its documentation in place without generating language-specific pages.

📜 License

BSD 3-Clause — see the repo root LICENSE.md (or README.md) for details. Note the project policy in PRIVACY.md and TOS.md.


📚 Documentation Index


NH Reader — a lightweight, modern, cross-platform client for nhentai.net.

Documentation Home · Repository · Releases · Security · Privacy · TOS · License