Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 2.9 KB

File metadata and controls

88 lines (59 loc) · 2.9 KB

Contributing to Hijarr

Contributor Agreement

By submitting a pull request, you irrevocably assign all copyright and related rights in your contribution to the project maintainer, and waive any moral rights you may hold in such contribution to the fullest extent permitted by applicable law. You represent that you are legally entitled to make this assignment and that your contribution is your original work.

If you are contributing on behalf of your employer, you confirm that your employer has authorized you to make this assignment.


Scope

Contributions are welcome for the open-source modules:

  • hijarr-proxy: DNS hijacking, Torznab fission search, SRN subtitle sync, Sonarr integration
  • hijarr-uploader: SRN upload SDK/CLI

The scraping and cleaning core (hijarr-scraper) is not open-source and does not accept external contributions.


Prerequisites

  • Go 1.25+
  • CGO_ENABLED=0 — the project uses modernc.org/sqlite (pure Go SQLite). CGO must be disabled to avoid compiler conflicts.
  • The SRNApiClient shared module is a local dependency: replace github.com/DeliYuxiang/SRNApiClient => ../srnrelay. Clone it as a sibling directory before building.

Development Workflow

  1. Read the docs first — in order:

    1. CLAUDE.md — build commands, architecture, constraints
    2. docs/CODEREF.md — auto-generated symbol index
    3. docs/progress.md — active risks and current project state
  2. Build before and after every change:

    CGO_ENABLED=0 go build ./...
  3. Run all tests:

    CGO_ENABLED=0 go test ./...
  4. Regenerate the code symbol index if you changed Go source files:

    CGO_ENABLED=0 go run ./tools/coderef > docs/CODEREF.md
  5. Keep PRs focused — one concern per PR.


Commit messages

Use Conventional Commits:

feat:  new feature
fix:   bug fix
chore: CI, deps, config
docs:  documentation only
test:  tests only
refactor: code restructuring without behavior change

Hard Rules

  • Never skip CGO_ENABLED=0modernc.org/sqlite requires pure Go mode.
  • Never register extra Gin routes adjacent to /*path wildcard routes — causes a Gin panic. All SPA catch-all routes are registered at the end of RegisterRoutes.
  • Never implement feeder/scraper-side logic (disk scan, RSS, qBittorrent, LLM subtitle cleaning) in this repository — those belong in srnfeeder.
  • Never modify docs/CODEREF.md manually — it is auto-generated by go run ./tools/coderef.

Submitting a PR

  1. Branch off main
  2. CGO_ENABLED=0 go build ./... — confirm clean build before and after
  3. CGO_ENABLED=0 go test ./... — all tests must pass
  4. If code changed: CGO_ENABLED=0 go run ./tools/coderef > docs/CODEREF.md
  5. Keep PRs focused — one concern per PR