The extraction and user data backend for TypeType.
A Kotlin/Ktor server with two responsibilities:
- Wrap PipePipeExtractor to expose YouTube, NicoNico, and BiliBili extraction as a REST/JSON API
- Persist user data (history, favorites, subscriptions, playlists, watch-later, progress, settings, search history, blocked content) in PostgreSQL
See Architecture.md for current architecture and API surface overview.
| Role | Tool |
|---|---|
| Language | Kotlin |
| Server | Ktor (Netty engine) |
| Extraction | PipePipeExtractor (Java, GPL v3) |
| Build | Gradle (Kotlin DSL) |
| User data | PostgreSQL via Exposed + HikariCP |
| Cache | Dragonfly (Redis-compatible) |
- JDK 17+
- Docker and Docker Compose (for PostgreSQL and Dragonfly)
cp .env.example .env
docker compose up -d postgres dragonflydocker compose -f docker-compose.dev-mirror.yml up -d
./scripts/bootstrap-garage.shStack endpoints:
- Frontend:
http://localhost:28082 - API server:
http://localhost:28080 - Downloader:
http://localhost:28093 - Token service:
http://localhost:28081
Pull latest beta images before restart:
./scripts/pull-dev-images.sh
docker compose -f docker-compose.dev-mirror.yml up -d --force-recreate./gradlew shadowJarjava -jar build/libs/typetype-server-all.jarThe server starts on port 8080. Logs go to stdout.
Container tags are published to GHCR with:
- stable image
${{ github.repository }}onmainand Git tagsv* - beta image
${{ github.repository }}-betaondev sha-<short-sha>on every build- branch tags (
mainon stable image,devon beta image) lateston default branch (stable image) and ondev(beta image)betaondev(beta image)- release tags when pushing Git tags like
v1.2.3(1.2.3and1.2) on stable image
All configuration is via environment variables. Defaults in .env.example work for local development.
| Variable | Default | Description |
|---|---|---|
ALLOWED_ORIGINS |
— | Comma-separated CORS origins. Required — server refuses to start without it. |
DATABASE_URL |
jdbc:postgresql://localhost:5432/typetype |
PostgreSQL JDBC URL |
DATABASE_USER |
typetype |
PostgreSQL user |
DATABASE_PASSWORD |
typetype |
PostgreSQL password |
DRAGONFLY_URL |
redis://localhost:6379 |
Dragonfly/Redis URL |
DOWNLOADER_SERVICE_URL |
http://typetype-downloader:18093 |
Downloader backend base URL used by /downloader/* gateway |
A huge thanks to the projects that made this possible. TypeType-Server is a wrapper, and none of it would exist without the work these teams put in first.
- InfinityLoop1308/PipePipeExtractor — the extraction engine at the core of this server
- InfinityLoop1308/PipePipeClient — reference for consuming PipePipeExtractor in Java
- InfinityLoop1308/PipePipe — reference for multi-service support
- A-EDev/Flow — inspiration for discovery-first recommendation direction and iteration patterns
- TeamPiped/Piped — API patterns and architecture reference
- deniscerri/ytdlnis — groundbreaking work on YouTube PO token integration that directly shaped the design of TypeType-Token
GPL v3 — required by PipePipeExtractor. The TypeType frontend is a separate program communicating over HTTP and is not subject to this license.