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.
crimson-backend
Section titled “crimson-backend”- 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
crimson-client
Section titled “crimson-client”- 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-sourcessubmodule. The companion extension is not bundled: it ships on the Chrome Web Store. - Guide: The client
crimson-proxy
Section titled “crimson-proxy”- 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
/signgrant (sharedPROXY_SECRET), the client, CDNs. - Guide: The CORS proxy · Env: Proxy & edge secrets
crimson-extension
Section titled “crimson-extension”- 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.CrimsonExtensionAPI) and any URL the page asks it to fetch. Holds no secrets. - Guide: The companion extension
crimson-native
Section titled “crimson-native”- What: an optional desktop (Electron) and mobile (Capacitor) shell around the
unmodified
crimson-clientbuild. Adds durable downloads on disk, a built-inwindow.CrimsonExtensionbridge, 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. Pullscrimson-client(withcrimson-sources) andcrimson-extensionas git submodules. - Guide: The native app
Your sources (private)
Section titled “Your sources (private)”- 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
Your backend overlay (private, optional)
Section titled “Your backend overlay (private, optional)”- What: Python modules copied into the backend’s
resolvers/,scrapers/andmanga_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_REPOCI/CD variable is set. - Guide: Backend-side E0 sources
Your music provider (private, optional)
Section titled “Your music provider (private, optional)”- 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.txtinstalled at image build. - Used by: the backend build, which clones it into
music_engine/when theMUSIC_REPOCI/CD variable is set. - Guide: Music
crimson-native-releases (private)
Section titled “crimson-native-releases (private)”- What: a private GitLab project whose generic package registry stores the
compiled desktop installers, Android APKs,
release.json, andelectron-updaterfeeds built fromcrimson-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
How they reference each other
Section titled “How they reference each other”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 secretsBranches & environments
Section titled “Branches & environments”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.
