TypeType-Server is the backend for extraction and user data.
It does two things:
- exposes extraction APIs for YouTube, NicoNico, and BiliBili via PipePipeExtractor
- persists user data in PostgreSQL
The frontend consumes it only over HTTP.
PipePipeExtractor (Java, GPL v3)
|
v
TypeType-Server (Kotlin/Ktor, GPL v3)
|
v
TypeType frontend (TypeScript/React, MIT)
No source code is shared across repos. The REST API is the only boundary.
| Component | Role |
|---|---|
| Ktor (Netty) | HTTP server |
| PipePipeExtractor | extraction engine |
| PostgreSQL | user data storage |
| Dragonfly | extraction cache |
| TypeType-Token | PO token and subtitles helper |
Authentication is JWT-based.
Public auth routes:
POST /auth/registerPOST /auth/loginPOST /auth/refreshGET /auth/mePOST /auth/guestPOST /auth/reset-password
Protected routes require Authorization: Bearer <jwt>.
Role checks:
- admin-only:
withAdminAuth - admin/moderator:
withAdminModeratorAuth
Main registration is in src/main/kotlin/dev/typetype/server/Application.kt.
Public extraction and proxy routes:
/streams,/streams/manifest,/streams/native-manifest/search,/suggestions,/trending/comments,/bullet-comments,/channel/proxy,/proxy/storyboard,/proxy/nicovideo
Protected user routes:
/history,/subscriptions,/subscriptions/feed,/subscriptions/shorts/playlists,/watch-later,/progress,/favorites,/settings/search-history,/blocked/channels,/blocked/videos/recommendation-events,/recommendation-feedback,/recommendations/home/restore,/bug-reports
Admin routes: /admin/users, /admin/settings, /admin/bug-reports
Persisted user data domains:
- history
- subscriptions
- playlists and playlist items
- favorites
- watch later
- progress
- settings
- search history
- blocked channels and blocked videos
- recommendation events and feedback
- bug reports
Schema files live in src/main/kotlin/dev/typetype/server/db/tables.
Request limits are applied by zone in plugin configuration:
- extraction zone
- channel zone
- proxy zone
- proxy storyboard zone
- user data zone
Errors return JSON with a single key: {"error":"..."}.
Common statuses: 400, 401, 403, 404, 409, 422.
This repository is GPL v3 because it links to PipePipeExtractor.
Keep backend and frontend code separated by the HTTP boundary.