TypeType is a frontend SPA. It renders client-side and talks to backend services over HTTP.
Runtime responsibilities:
- TypeType frontend (this repo): UI, routing, state, playback UX
- TypeType-Server: extraction, auth, user data
- TypeType-Token: PO token and subtitle helper for YouTube flows
PipePipeExtractor (Java, GPL v3)
|
v
TypeType-Server (Kotlin/Ktor, GPL v3)
|
v
TypeType frontend (TypeScript/React, MIT)
The frontend and backend are separate programs. The REST API is the boundary.
| Role | Tool |
|---|---|
| Language | TypeScript (strict) |
| Runtime / Package manager | Bun |
| Build | Vite |
| Framework | React |
| Routing | TanStack Router |
| Server state | TanStack Query |
| Client state | Zustand |
| Video player | Vidstack |
| Styling | Tailwind CSS |
| Components | shadcn/ui + Radix UI |
| Lint / Format | Biome |
TypeType/
├── apps/
│ └── web/
│ ├── src/
│ │ ├── components/
│ │ ├── hooks/
│ │ ├── lib/
│ │ ├── routes/
│ │ └── types/
│ └── public/
├── Dockerfile
├── docker-compose.yml
└── nginx.conf
User action
|
v
Route / Hook
|
v
TanStack Query / fetch
|
v
TypeType-Server HTTP API
|
v
JSON response
|
v
UI render update
TypeType uses JWT auth from TypeType-Server.
Auth routes:
POST /auth/registerPOST /auth/loginPOST /auth/refreshGET /auth/mePOST /auth/guestPOST /auth/reset-password
Protected routes use:
Authorization: Bearer <token>
Base URL is VITE_API_URL (defaults to /api in app runtime).
Public data routes:
/streams,/streams/manifest,/streams/native-manifest/search,/suggestions,/trending/comments,/comments/replies,/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/recommendations/events,/recommendations/feedback,/recommendations/home/recommendations/home/metrics,/restore/pipepipe,/imports/youtube-takeout,/bug-reports
Protected admin routes:
/admin/users,/admin/settings,/admin/bug-reports
GET /progress/{videoUrl}can return404when no position exists; frontend treats this as position0- YouTube uses
/streams/native-manifestfirst, then fallback to/streams/manifeston422 - NicoNico can return
422on/streams/manifest; expected for non-DASH cases GET /search-historysupports backend pagination:pageandlimit, total fromX-Total-Countsettings.recommendationPersonalizationEnabled=falsedisables recommendation event/feedback personalization while keeping Home recommendations available- Shorts recommendations can emit
short_skipwith optionalwatchDurationMsfor skip-depth signals
- Frontend stores user preference through
PUT /settings(recommendationPersonalizationEnabled). - Recommendation events are posted to
/recommendations/eventswith optional fields such aswatchRatioandwatchDurationMs. - Home feed requests call
/recommendations/homewithintent(currently defaultauto). - Optional offline quality metrics are available via
/recommendations/home/metrics.
- YouTube import (
/imports/youtube-takeout) is job-based:- create upload job,
- poll status,
- fetch preview,
- commit import,
- read final report.
- PipePipe restore uses
POST /restore/pipepipe?timeMode=raw|normalizedand returns restore counts plus watchedAt range details.
TypeType-Server is GPL v3. This frontend is MIT.
No backend source code, classes, or shared modules are imported into the frontend. Integration is HTTP-only.