Repository guide
Each TypeType component has a narrow ownership boundary, its own checks, and its own license. User-facing issues stay in the central TypeType tracker even when the fix belongs to a component repository.
Ownership at a glance
| Change | Owning repository | Main source path |
|---|---|---|
| Docker Compose, installer, update, migration, or rollback | TypeType | docker-compose*.yml, scripts/ |
| Page, route, nginx, settings control, account UI, or player controls | TypeType-Frontend | apps/web/src/, nginx.conf |
| Extraction, API route, account data, import, recommendation, or playback session | TypeType-Server | src/main/kotlin/dev/typetype/server/ |
| PO token, YouTube player decoder, subtitle metadata, or remote-login browser | TypeType-Token | src/ |
| Download queue, transfer, mux, storage, or artifact | TypeType-Downloader | cmd/, internal/, migrations/ |
| MSE buffering, segment scheduling, seek, quality switch, or playback recovery | TypeType-Player | src/ |
| Home page algorithm, its settings, or what it deduces | TypeType-Signals | recommender/ |
| Discord presence detail, RPC handshake, or desktop tray behavior | TypeType-RPC | src-tauri/src/ |
| User, operator, or project explanation | Docs-TypeType | docs/ |
Central stack
The TypeType repository is the integration point rather than a monolithic application. It contains Git submodules for the public components, but deployment uses the component images selected in docker-compose.yml.
Important paths:
.env.examplelists supported stack-level settings and image overrides.docker-compose.ymldefines the stable service graph.docker-compose.dev.ymldefines the beta graph.scripts/owns install, update, migration backups, secret generation, Garage provisioning, and stable deployment helpers.
The default nginx configuration is bundled into the frontend image. The central stack therefore does not need to mount a matching host file on every update.
The repository is MIT licensed.
Frontend
The frontend is a Bun monorepo containing a React 19 application. TanStack Router and Query own navigation and server state, Zustand owns local state, Tailwind CSS owns styling, and Vidstack wraps the available playback providers.
Useful entry points:
apps/web/src/routesfor pages and route loaders;apps/web/src/componentsfor shared UI and the player shell;apps/web/src/libfor API clients and browser integration;apps/web/src/hooksfor query and feature behavior;apps/web/src/settingsandapps/web/src/storesfor persistent client choices.
Checks:
bun run check
bun run test
bun run knip
bun run sherif
bun run buildThe repository is MIT licensed.
Server
The Server is a Kotlin/Ktor application on JDK 25. It uses PipePipeExtractor for supported media services, PostgreSQL through Exposed and HikariCP for persistent state, and Dragonfly through the Redis protocol for cache state.
Useful entry points:
Application.ktandApplicationRoutes.ktfor service and route wiring;routes/for the HTTP contract;services/for application, extraction, and playback behavior;db/for tables and migrations;openapi.yamlandopenapi/for the published API contract.
Checks:
./gradlew test
./gradlew shadowJar
./gradlew validateOpenApiThe repository is GPL-3.0 licensed because of its extractor integration.
Token
Token is an internal Bun service with a Playwright Chromium runtime. Its name is historical: it now provides much more than subtitles or a single token endpoint. It supplies YouTube visitor and PO-token data, player decoding, SABR session metadata, subtitles, and disposable remote-login browser sessions.
The frontend must not call Token directly. Server is its consumer and security boundary. See Security boundaries before customising its container.
Checks:
bun run lint
bun test
bun run buildThe repository is MIT licensed.
Downloader
Downloader is a Go service with PostgreSQL-backed jobs, Dragonfly cache state, concurrent Range or SABR media transfer, libavformat muxing, SSE progress, and local or S3-compatible artifact storage.
Useful entry points:
internal/apiandinternal/serverfor the internal HTTP API;internal/pipeline,internal/downloader, andinternal/sabrfor job execution;internal/muxandinternal/ffmpegfor stream-copy muxing;internal/storageandinternal/artifactfor capacity and artifact delivery.
Checks:
gofmt -w cmd internal
go test ./...
go build ./...The repository is GPL-3.0-or-later licensed.
Player
Player is the dependency-free TypeScript package published as @typetype/mse on npm and JSR. It turns a Server playback session into Media Source Extension buffers on an HTMLVideoElement. The package owns scheduling and recovery, while Frontend owns the controls and page layout.
Useful entry points include type-type-mse-player.ts, playback-loop.ts, segment-scheduler.ts, media-source-controller.ts, seek-controller.ts, and player-recovery.ts.
Checks:
bun run check
bun run check:docs
bun run check:jsr
bun run test:coverage
bun run buildThe repository is MIT licensed.
RPC
RPC is the desktop companion that turns a user's current TypeType playback into a Discord Rich Presence status. It is a Tauri 2 app with a from-scratch Rust implementation of the Discord IPC protocol, no Electron and no Discord SDK dependency. It lives in the system tray and polls Server's presence endpoint only while sharing is turned on.
Useful entry points:
src-tauri/src/discord_frame.rsanddiscord_socket.rsfor the IPC wire format and local socket discovery;src-tauri/src/discord_rpc.rsfor the handshake and activity commands;src-tauri/src/presence.rsfor polling the presence endpoint;src-tauri/src/tray.rsfor the tray menu and polling lifecycle;src/main.tsfor the Settings window.
Checks:
cargo fmt --manifest-path src-tauri/Cargo.toml --check
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
cargo test --manifest-path src-tauri/Cargo.toml
bun run buildThe repository is MIT licensed.
Signals
TypeType-Signals is the optional recommender: a Python service that holds the home page algorithms and nothing else. Server calls it, fetches the videos it asks for and filters what comes back. It is experimental.
docker compose up -d --build
uv run pytestImportant paths:
recommender/algorithms/holds one file per algorithm.recommender/contract.pyand thecontract_*.pyfiles hold what Server sends and receives.tests/reference_pages.pybuilds the reference pages that prove a change altered no page.
See Signals, the recommender. The repository is licensed under the GNU Affero General Public License, version 3.
Documentation and organisation profile
Docs-TypeType is a VitePress site. User pages live in docs/guide, operator pages in docs/self-hosting, and developer-facing pages in docs/project. Build it with:
bun run docs:buildThe documentation is MIT licensed. The .github profile repository contains only organisation presentation assets and does not declare a license.
Branch and issue workflow
Component development targets dev; main represents the stable release line. See Branches and releases before changing integration pins or images.
Open bugs, feature requests, and documentation reports in the central tracker. Once the owning component is known, open its code pull request against that component's dev branch. Documentation pull requests also target dev.