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, nginx, update or rollback | TypeType | docker-compose*.yml, nginx.conf, scripts/ |
| Page, route, settings control, account UI, or player controls | TypeType-Frontend | apps/web/src/ |
| 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/ |
| 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.nginx.confexposes the web, API, WebSocket, SABR, and version paths.scripts/owns install, update, secret generation, Garage provisioning, and stable deployment helpers.
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.
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.