Repository navigation
chore!: remove the Node backend, ship only the Rust backend - #27
Merged
Merged
Conversation
- scripts/build-runtime.sh builds a runtime directory (the Rust binary, seerr-api.yml, the built frontend, committag.json) for the host or a cross target; the desktop app, the Jellyfin plugin and the homelab deploy start from it. - The release attaches foreseerr-<target> and foreseerr-plugin-<target> runtime archives for linux-x64, linux-arm64 and windows-x64, built on native runners, instead of Bun-compiled Node binaries and the launcher.js server tree. Its quality gate runs the frontend checks and the crate's fmt, clippy, tests and fresh-database migrations. - CI keeps the required job names: Lint & Test Build and Unit Tests cover the frontend, Migration Tests runs every migration on fresh SQLite and PostgreSQL databases through the Rust backend. - package.json scripts start, build and develop against the Rust backend; the Node build, compile, pack, TypeORM migration and migration-check scripts are gone, as are launcher.js, Dockerfile.local and the stale in-repo Jellyfin plugin workflow. - The i18n extractor moved to scripts/ and covers the frontend only; the backend's messages live in the crate. The mapping-pack mirror no longer imports the Node mapping layer. - compose.yaml and compose.postgres.yaml build the production image. - The Cypress suite is dropped: it prepared its database through the Node backend's TypeORM entities before every spec, and it has failed on every run since September. End-to-end coverage can be rebuilt against the Rust backend. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d of server/ The frontend imported 58 modules from server/, which pulled about 150 server files (datasource, logger, settings runtime, API clients) into the client typecheck. Move what the UI needs into a new top-level shared/ directory, aliased as @shared/*, so src/ builds without server/. - Pure constants and helpers are copied as-is: constants/*, lib/permissions, servarrMapping, seasonRequests, imageproxySources, libraryBrowseQuery, releases/calendarDateKey, anime/detect, discover/filterDefaults, types/languages and the TMDB interfaces, constants and keyword helper. - interfaces/api/* are copied; the dns-caching types are inlined. - models/*, lib/settings, lib/downloadtracker and the ratings, pushover, servarr and TMDB sort-option modules keep only their types. - TypeORM entities become plain interfaces for the API JSON. Back references and User relations are optional, lazy Promise relations (Media.blocklist, Season.media) are dropped, and User no longer lists the credential columns the API never sends. The client tsconfig now loads node types explicitly (they used to arrive through server imports) and src/test/setup.ts holds the svg stub the frontend render tests need without the server preload. server/ keeps its own copies and is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…backend The frontend, the shared types and the remaining scripts use none of the Express, TypeORM, mailer, scheduler or logging packages, so they leave package.json and the lockfile. The API docs assets now come straight from swagger-ui-dist instead of through swagger-ui-express, which would pull Express back in as a peer. README, CONTRIBUTING, the build-from-source guide, the stable contract and the release gate describe the Rust binary, its release archives and where its migrations live. Cypress leftovers go from the ignore files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The upgrade matrix the Node migration tests had, now against the migrations the Rust backend runs: databases from upstream Seerr's baseline and from Foreseerr v0.1.0, v0.5.0 and v0.7.0 are built with only the migrations those shipped, seeded with users, a movie and its request, user settings and a slider, then upgraded. The rows must survive with the new columns at their defaults, the key indexes and foreign keys must exist, and the app's own queries must read them. SQLite runs in cargo test; CI's migration job also runs the Postgres cases against its Postgres service. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aths Built on ubuntu-24.04, the binary needed glibc 2.39 and failed on Debian 12 and Ubuntu 22.04. The release now cross-builds the Linux runtimes with cargo-zigbuild against glibc 2.28 (checked: the highest symbol version is GLIBC_2.28 and it starts on Debian 10). build-runtime.sh takes a zigbuild glibc suffix on --target, adds the Rust target it cross-builds for, resolves a relative output directory against the caller's directory instead of backend-rs/, honours CARGO_TARGET_DIR, and gives the frontend the same COMMIT_TAG it writes to committag.json (they differed, so the app kept offering a reload). The desktop protocol fixture gains fallbackServerUrl, which the backend already sends in the bootstrap envelope and the desktop's copy lists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A first start imports both mapping datasets at once, each committing a 50 ms slice and beginning the next at once. SQLite has no queue for its write lock: everyone else waits in the busy handler, which only retries every 100 ms or so, so they rarely found the lock free and gave up after 5 s. The Jellyfin plugin's sign-in failed with "database is locked" after every sidecar start, and one import could fail the other. Datasets now ingest one at a time, with the lock left free for 50 ms between slices, and writers wait up to 30 s for it, as Node's single connection made every query wait its turn. Probing the write lock every half second during both imports: before, waits of 3-5 s and timeouts; now at most 63 ms, and the imports finish sooner. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Rust backend compiles the notification strings in with include_str!, so they now live in backend-rs/locale (moved from server/i18n/locale with history) and no longer depend on the Node server's directory. The Docker build stage stops copying them separately; they come with backend-rs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The binary no longer forwards to a Node server or calls Node's /internal routes: the hyper proxy (src/proxy.rs), FORESEERR_NODE_URL, FORESEERR_STANDALONE and the loopback client for Node's internal routes are gone. Everything that was already the standalone path is now the only path: - requests no handler takes, and Outcome::Forward from a handler, get the standalone fallback answer (the Forward name stays); - the OpenAPI validator always runs and answers every decision itself; FORESEERR_OPENAPI_VALIDATOR is gone (proxy only made sense with Node behind, and off was already refused standalone); - the jobs always run here, so FORESEERR_RUST_JOBS is gone, and the download tracker, job and scanner state, release sync statuses, mapping layer, sync caches, settings side effects and Trakt token refresh are read and run in-process only; - csurf, the image proxies and the log limiter lose their Node branches; the Plex and Tautulli settings keep an unsaved body in memory as Node did, without a Node fallback. The desktop and Jellyfin plugin runtimes keep their contract; they were already standalone-only. The unused hyper-util client dependency goes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Rust backend no longer has a Node server to compare against: - remove scripts/with-node.sh, the validator differential (openapi-diff.sh, openapi-diff.js and the ignored openapi_ tests in src/openapi/difftest.rs), the Node and Rust comparison (ci-compare.py) and the generators that ran TypeORM on the Node sources (gen-migrations.ts, gen-synchronize.ts). The migrations, the dev-mode synchronize DDL and their reference schemas are maintained by hand now; their headers say so. - gen-api-routes.ts reads seerr-api.yml with Bun.YAML and carries a copy of express-openapi-validator's sortRoutes, so it needs no node_modules; its output is unchanged. - ci-smoke.py and ci-standalone.py stop setting FORESEERR_STANDALONE and FORESEERR_NODE_URL; the standalone script's Node URL starts become a plain restart on the same config directory. - the workflow keeps format, lint, test, the SQLite smoke and the Postgres 18 job, checks the route table against seerr-api.yml, and runs the standalone regressions with the built frontend in their own job. It no longer triggers on server/**. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the Node backend gone, a replay compares a candidate build of the Rust backend against a reference build, typically the release that served the recording. The tool itself was never Node-specific; what changes: - targets get the CA in SHADOW_CA_FILE only (NODE_EXTRA_CA_CERTS was for Node; the Rust backend still reads it, so existing recorder setups keep working); - e2e/run.sh builds backend-rs and runs that binary (or FORESEERR_BIN) as the recorded primary and as every replay target instead of bun server/launcher.ts; - the README's examples, diagram and CA instructions describe Rust baseline, noise and candidate targets; doc comments and test fixtures no longer name a Node baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The README describes one mode: the binary is the whole backend. The hybrid forwarding section, the Node comparison checks and the removed variables (FORESEERR_NODE_URL, FORESEERR_STANDALONE, FORESEERR_RUST_JOBS, FORESEERR_OPENAPI_VALIDATOR) are gone; the fallback answers get their own section, the CI section lists the current jobs, and the files that used to be generated from or mirrored the Node sources are listed as hand-maintained. The desktop and plugin contracts are unchanged. AUDIT.md gets a dated note that its Node-related findings predate this. Co-Authored-By: Claude Opus 5.5 <[email protected]>
server/ goes: the Rust backend in backend-rs/ is the only backend, the frontend reads its types from shared/, and the locales the backend needs live in backend-rs/locale. Dockerfile.rust, identical to the Dockerfile, goes too, and the Dockerfile stops setting the removed FORESEERR_STANDALONE switch. CONTRIBUTING describes writing migrations in backend-rs/src/dbmigrate, tsconfig drops the @server alias and the decorator options TypeORM needed, and Prettier skips the Rust build output. BREAKING CHANGE: the Node server, its bun-compiled binaries and foreseerr-server.tar.gz are no longer built. Releases ship the Rust binary in the Docker image and as foreseerr-<platform> archives. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedToo many files! This PR contains 1075 files, which is 975 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
This was referenced Oct 30, 2026
Draft
Merged
The MDBList and Trakt list inputs treated any text containing the host name as a list reference; they now need the host at the start (a URL already counts through its scheme). Two conditions that could never be false go: a null check inside a truthiness branch, and a second error check right after returning on the error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Makes the Rust backend (
backend-rs/) the only backend, starting with the next release. The Node/TypeScript server and everything that built, tested or shipped it are deleted.Removed
server/(≈119k lines),launcher.js, the Bun--compilebinaries,foreseerr-server.tar.gz,Dockerfile.local,Dockerfile.rust(identical toDockerfile), Cypress, and the Node-only scripts (compile, pack, prove, check-migrations, measure-mapping).FORESEERR_NODE_URL,FORESEERR_STANDALONE,FORESEERR_RUST_JOBSandFORESEERR_OPENAPI_VALIDATOR. Standalone is the only mode.backend-rs.yml, and the Node targets in the shadow tool, which now replays Rust builds.Moved / replaced
shared/(@shared/*) instead ofserver/. Entities became plain interfaces.backend-rs/locale. The migration and dev-schema files are now maintained by hand inbackend-rs/src/dbmigrate/; CONTRIBUTING describes how to write a migration.scripts/build-runtime.shbuilds a runtime directory: the binary,seerr-api.yml,dist/public/andcommittag.json.foreseerr-{linux-x64,linux-arm64}.tar.gz,foreseerr-windows-x64.zipandforeseerr-plugin-*(the/Foreseerrsub-path build for the Jellyfin plugin), plusSHA256SUMS. Linux binaries are cross-built against glibc 2.28 with cargo-zigbuild; a native ubuntu-24.04 build needed glibc 2.39 and failed on Debian 12.Fixes found while switching the plugin and desktop over
dbmigrate/upgradetests.rs) replaces the deleted Node one. It builds databases from the upstream Seerr baseline and from Foreseerr v0.1.0, v0.5.0 and v0.7.0, seeds rows, upgrades them, and checks data, defaults, indexes and foreign keys on SQLite and Postgres.build-runtime.sh:committag.jsonget the sameCOMMIT_TAG; they used to differ, so the app kept prompting for a reload.CARGO_TARGET_DIRand adds the target for cross builds.protocol/protocol-v1.jsonnow listsfallbackServerUrl, which the backend already sends; the desktop app's copy has it.Companion changes, as local branches to be opened separately:
foreseerr-plugin-*assets;The plugin's
foreseerr.versioncan only move to the first release that ships these assets.How Has This Been Tested?
All local, with
server/deleted:bun install --frozen-lockfile,typecheck,lint(0 errors),test(56 pass),format:check,build:webandbin/check-i18n.js.i18n:extractproduces no diff.cargo fmt --check,clippy --all-targets -D warnings, andcargo test(628 pass, including the upgrade matrix). The Postgres upgrade cases ran against a local Postgres 18.ci-smoke.pyandci-standalone.py --require-webpass, and the generated route table shows no drift.GLIBC_2.28, and it starts ondebian:10-slim(which needs CA certificates installed).COPYand anENVline changed; CI builds it), the release workflow, and anything on arm64 or Windows.Screenshots / Logs (if applicable)
Checklist:
bun run buildbun run i18n:extract🤖 Generated with Claude Code