Native Go download backend for TypeType
  • Go 97.6%
  • Shell 2%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-19 10:18:51 +02:00
.github ci: route workflows to CI stack 2026-09-19 10:18:51 +02:00
cmd/server fix: wait for downloader workers before closing persistence 2026-09-09 09:43:04 +02:00
internal test: avoid flaky storage reservation boundary 2026-09-10 22:41:57 +02:00
migrations chore: configure Go module and runtime 2026-05-11 18:57:38 +02:00
scripts Revert "ci: deploy downloader beta service" 2026-07-10 22:21:59 +02:00
.dockerignore chore: configure Go module and runtime 2026-05-11 18:57:38 +02:00
.env.example chore: configure Go module and runtime 2026-05-11 18:57:38 +02:00
.gitignore chore: configure Go module and runtime 2026-05-11 18:57:38 +02:00
CONTRIBUTING.md docs: document project programming preferences 2026-07-15 19:22:46 +02:00
docker-compose.yml chore: update Garage to 2.4.1 2026-09-09 09:19:06 +02:00
Dockerfile chore: update downloader Go toolchain 2026-09-09 10:43:39 +02:00
Dockerfile.wolfi chore: prepare downloader 1.7.0 2026-08-28 16:41:14 +02:00
garage.toml ops: add container runtime and local stack definition 2026-04-08 14:39:08 +02:00
go.mod chore: update downloader Go toolchain 2026-09-09 10:43:39 +02:00
go.sum chore: update PostgreSQL and S3 client dependencies 2026-09-09 09:05:18 +02:00
LICENSE docs: document Go downloader licensing 2026-05-11 18:57:48 +02:00
README.md docs: move AI transparency notice 2026-09-18 10:57:03 +02:00
THIRD_PARTY_NOTICES.md docs: document Go downloader licensing 2026-05-11 18:57:48 +02:00
VERSION chore: bump downloader version to 1.8.1 2026-09-08 11:40:28 +02:00

TypeType

TypeType Downloader

The native download and muxing service for TypeType.

You want to know the current position of TypeType about AI ? Go check this.

TypeType-Downloader receives jobs from TypeType-Server, downloads the selected media streams, muxes audio and video without re-encoding, and publishes the finished artifact through local or S3-compatible storage.

Extraction stays in TypeType-Server. If you want to install or update a complete instance, use the central TypeType stack.

Responsibilities

  • Persistent asynchronous download jobs
  • Concurrent HTTP Range downloads and progress aggregation
  • TypeType SABR segment downloads
  • Audio and video stream-copy muxing through libavformat
  • SSE job updates with polling-compatible state
  • Cancellation, cleanup, and storage-capacity safeguards
  • Local filesystem and S3/Garage artifact storage

Job API

Method Path Purpose
GET /health Basic service health
GET /health/deep Dependency and storage health
POST /jobs Create a download job
GET /jobs/{id} Read job state and progress
GET /jobs/{id}/events Stream job updates through SSE
GET /jobs/{id}/artifact Serve or redirect to the artifact
POST /jobs/{id}/cancel Cancel a queued or running job
DELETE /jobs/{id} Delete a non-running job and its artifact

Jobs use queued, running, done, and failed as their stable lifecycle states. TypeType-Server exposes the authenticated user-facing gateway for this API.

Stack

Role Technology
Language Go 1.26
HTTP API Go standard library
Muxing libavformat through cgo
Persistence PostgreSQL
Cache Dragonfly through the Redis protocol
Storage Local filesystem or S3-compatible Garage

Development

Requirements:

  • Go 1.26
  • A C toolchain
  • libavformat, libavcodec, and libavutil development libraries
  • Docker Engine and Docker Compose v2 for the local service stack
gofmt -w cmd internal
go test ./...
go build ./...

Run the local Compose stack with development credentials:

DB_PASSWORD=change-me \
S3_ACCESS_KEY=change-me \
S3_SECRET_KEY=change-me \
docker compose up -d --build

Project structure

Path Responsibility
cmd Service entry points
internal/api and internal/server HTTP routes and server lifecycle
internal/downloader and internal/sabr Direct and SABR media transfer
internal/selector and internal/pipeline Stream selection and job execution
internal/mux and internal/ffmpeg libavformat integration
internal/storage and internal/artifact Artifact persistence and delivery
internal/db, internal/job, and migrations Job persistence

Read CONTRIBUTING.md before opening a pull request. Bug reports and feature requests belong in the central issue tracker.

License

TypeType-Downloader is licensed under GPL-3.0-or-later. Runtime notices are listed in THIRD_PARTY_NOTICES.md.