How sikkgit/cobalt-tools works
Project type and purpose
• This is a full-stack, monorepo media-downloading application (“cobalt”) comprised of:
• A Node.js-based backend API (/api) that accepts URLs, matches them to service handlers, and proxies or streams media data.
• A SvelteKit-based frontend (/web) that provides a browser UI for pasting URLs, selecting options, and downloading media.
• Two shared packages (/packages/api-client and /packages/version-info) consumed by the frontend (and potentially other clients).
• Documentation and deployment resources (Dockerfile, GitHub workflows, docs).
File structure
• Top-level:
• Configuration—.deepsource.toml, .dockerignore, Dockerfile, GitHub workflows.
• /api—the service core:
– Entrypoints: api/src/core/api.js, api/src/cobalt.js
– Processing pipeline: api/src/processing/... with per-service adapters (youtube.js, twitter.js, etc.)
– Security: JWT, API keys, Cloudflare Turnstile.
– Stores: in-memory, Redis for rate-limiting.
– Streaming module: HLS/internal streams.
• /web—the frontend:
– SvelteKit routes (web/src/routes)
– Components (web/src/components) and UI logic.
– API calls via the shared api-client package under web/src/lib/api.
– Configuration: Vite, TypeScript, i18n, static assets.
• /packages—common libraries.
• /docs—user and developer documentation.
Key insights from the README
• “Works like a fancy proxy”—API never caches, just streams.
• Fully open-source, Docker-ready, uses AGPL-3.0.
• Encourages self-hosting with rate-limiting / protection guidelines.