Repackarr is an automated manager for game repacks, designed to track updates and simplify library maintenance. It integrates with qBittorrent for library monitoring, Prowlarr for release discovery, and IGDB for metadata enrichment.
- Type: SvelteKit 5 Full-stack Application.
- Runtime: Node.js (Adapter-Node).
- Database: SQLite via
better-sqlite3andDrizzle ORM. - Styling: Tailwind CSS v4.
- Primary Logic: Server-side services for API integration and background task scheduling.
manager.ts: The central orchestrator. Handles the high-level logic for library synchronization and update searching.qbit.ts: Manages the connection to qBittorrent. Filters torrents by category and extracts version information.prowlarr.ts: Interfaces with Prowlarr's API to search indexers, parse releases, and handle version comparisons.igdb.ts: Handles game metadata lookups (covers, Steam IDs, release dates).scheduler.ts: Manages background tasks usingnode-cron. Initialized inhooks.server.ts.progress.ts: A singleton manager for tracking real-time progress of long-running scans.
games: Tracks owned games, their current versions, and IGDB metadata.releases: Stores discovered updates found via Prowlarr.appSettings: Key-value store for UI-managed configuration and latest per-game skipped release snapshots.scanLogs: Lightweight history of library syncs and update searches.
Crucial: Follow these identity settings for all commits:
- Name: Berkay Yetgin
- Email: 85676216+Yakrel@users.noreply.github.com
- Commit Style: Clean messages, no AI-generated metadata or trailers.
The parsing logic (extracting versions from release names) is the most sensitive part of the app.
- Mandatory Test: Run
npx tsx tests/test_parsing.tsbefore every commit. - Goal: Maintain 100% Accuracy against the
tests/torrent_examples.jsondataset.
pnpm install
cp .env.example .env # Configure your qBit/Prowlarr detailsRepackarr uses Drizzle Kit for schema management.
- Push Schema:
pnpm db:push(Directly updates the local SQLite database). - Generate Migrations:
pnpm db:generate(Required for schema changes). - Baseline: Pre-release migration history is squashed into a single initial migration.
- Studio:
pnpx drizzle-kit studio(Visual DB explorer).
- Development:
pnpm dev - Production Build:
pnpm build && node build - Check/Lint:
pnpm check
- Server Logic: Keep heavy business logic in
src/lib/server/services. Routes should primarily act as thin controllers. - Type Safety: Use Zod schemas (found in
src/lib/server/validators.ts) for validating API inputs and settings. - Logging: Use the centralized
logger(Winston) insrc/lib/server/logger.tsinstead ofconsole.log. - Svelte 5: The project uses Svelte 5 (Runes). Prefer
$state,$derived, and$effectfor reactivity. - Environment Variables: Defined in
src/lib/server/config.ts. Ensure new variables are added there and to.env.example.
- qBittorrent: Expects a specific category (default:
games) to monitor. - Prowlarr: Requires an API key and the base URL.
- IGDB: Requires
IGDB_CLIENT_IDandIGDB_CLIENT_SECRETfor covers and search autocomplete.
- Adding a Filter: Modify the parsing logic in
src/lib/server/prowlarr.tsor update default keywords insrc/lib/server/config.ts. - New API Endpoint: Create a new folder in
src/routes/api/with a+server.tsfile. - Schema Change: Update
src/lib/server/schema.tsand runpnpm db:push. - UI Update: Modify components in
src/lib/server/components/ui/or pages insrc/routes/.