Skip to content

The repositories

Crimson Haven is split across the repositories of the crimsonhaven-to group. The core stack is public and safe to share. The three optional provider repositories that find streams or audio stay out of public view, and the native app installers live in a separate private project.

Repository Visibility Role
crimson-backend public Metadata, accounts, the login wall, grants, optional app release proxy
crimson-client public The website and the in-browser sources engine host
crimson-proxy public Signed edge relay for video bytes
crimson-extension public Browser companion for CORS unblock and header injection
crimson-native public Optional Electron desktop and Capacitor mobile shell around crimson-client
your sources (crimson-sources) private Client-side stream providers, bundled into the client
your backend overlay (crimson-backend-grants) private, optional Server-side resolvers, scrapers and manga provider, baked into the backend image
your music provider (crimson-music) private, optional Where the music worker downloads audio from, baked into the backend image
crimson-native-releases private, optional Generic package registry storing native app installers and update feeds

This documentation site lives in its own repository, crimson-docs.

  • What: metadata, accounts, the login wall, grants, orchestration.
  • Stack: Python 3.14, FastAPI, PostgreSQL (psycopg 3), APScheduler, Docker.
  • Talks to: PostgreSQL (state), TMDB and AniList (metadata), the client (everything).
  • Does not: scrape or resolve third-party streaming sites in the public image.
  • Guide: The backend · Env: Backend environment
  • What: the React single-page app your visitors use, and the host for the in-browser sources engine (bundled at build time).
  • Stack: React 19, Vite, Tailwind CSS 4, served by hardened Nginx in production.
  • Talks to: the backend (API), the extension and proxy (for resolving). Bundles your sources as the vendor/crimson-sources submodule. The companion extension is not bundled: it ships on the Chrome Web Store.
  • Guide: The client
  • What: a signed, HLS-aware CORS relay that moves video segment bytes off your backend onto free edge hosting. It also holds certain edge secrets (e.g. a Jellyfin token) so even those bytes leave the backend.
  • Stack: TypeScript, Nitro (deploys to Netlify Edge and/or Cloudflare Workers).
  • Talks to: the backend’s /sign grant (shared PROXY_SECRET), the client, CDNs.
  • Guide: The CORS proxy · Env: Proxy & edge secrets
  • What: a small Chromium (MV3) companion that does local CORS unblock and header injection, so the in-browser engine can resolve gated sources and stream them straight from the CDN. One button, no build step.
  • Stack: plain JavaScript (MV3 service worker and content scripts), no bundler.
  • Talks to: the page (window.CrimsonExtension API) and any URL the page asks it to fetch. Holds no secrets.
  • Guide: The companion extension
  • What: an optional desktop (Electron) and mobile (Capacitor) shell around the unmodified crimson-client build. Adds durable downloads on disk, a built-in window.CrimsonExtension bridge, and a backend picker at first launch.
  • Stack: TypeScript and Electron on desktop; Capacitor, Java (Android), and Swift (iOS) on mobile.
  • Talks to: any chosen crimson-backend, plus third-party CDNs directly through its built-in companion bridge. Pulls crimson-client (with crimson-sources) and crimson-extension as git submodules.
  • Guide: The native app
  • What: your repository of stream providers, the only piece that knows how to find streams. The public stack deliberately ships none.
  • Stack: TypeScript, exposing the engine contract the client imports (createEngine, createMangaEngine, waitForExtensionBridge, …).
  • Talks to: the client (which bundles it), the extension and proxy (delivery), the backend grants.
  • Guide: Adding your own sources
  • What: Python modules copied into the backend’s resolvers/, scrapers/ and manga_engine/ at image build time, for sources whose final step needs a server-held secret, and for the server-side manga provider.
  • Stack: Python, laid out like the backend so the files copy straight across.
  • Used by: the backend build, which clones it when the SOURCES_REPO CI/CD variable is set.
  • Guide: Backend-side E0 sources
  • What: the source the backend’s music worker downloads audio from. The public backend imports playlists, stores and plays the library, but never names a source.
  • Stack: Python, plus its own requirements.txt installed at image build.
  • Used by: the backend build, which clones it into music_engine/ when the MUSIC_REPO CI/CD variable is set.
  • Guide: Music
  • What: a private GitLab project whose generic package registry stores the compiled desktop installers, Android APKs, release.json, and electron-updater feeds built from crimson-native.
  • Why private: the bundled client inside each installer contains private crimson-sources, so packages must never live on a public project.
  • Used by: crimson-backend (app_engine), which is the only reader via a read-only project access token and proxies files to signed-in members.
  • Guide: The native app
crimson-client
├─ submodule → your sources (vendor/crimson-sources) ← private
├─ links to → crimson-extension (Chrome Web Store listing)
└─ calls → crimson-backend (API + grants)
crimson-native
├─ submodule → crimson-client (vendor/crimson-client, brings sources)
├─ submodule → crimson-extension (vendor/crimson-extension, for nudge.js)
├─ publishes → crimson-native-releases (generic packages) ← private
└─ calls → any chosen crimson-backend
crimson-backend
├─ bakes in → your backend overlay (SOURCES_REPO) ← private, optional
├─ bakes in → your music provider (MUSIC_REPO) ← private, optional
├─ reads → crimson-native-releases (APP_RELEASES_URL) ← private, optional
└─ shares PROXY_SECRET with crimson-proxy (for the /sign grant)
crimson-proxy
└─ verifies signatures minted by crimson-backend; may hold edge secrets

Every repo lives on a single main branch. For the deployed services, pushing to main deploys to a staging stack and a v* tag deploys to production. The CI/CD pipeline page covers this in detail.