dldeez Svelte Themes

Dldeez

A simple media downloader running on Cloudflare Workers platform. (WIP)

DLDeez

Introduction

DLDeez is a serverless media downloader built on the Cloudflare Workers platform. It leverages Cloudflare's edge infrastructure to provide a fast, scalable, and globally distributed download service. The application uses yt-dlp and FFmpeg under the hood to support a wide range of media platforms.

Features

  • Multi-Platform Support: Download from YouTube, SoundCloud, Niconico, Bilibili, and more
  • Format Discovery: Automatically detects all available video and audio formats
  • Flexible Output: Support for multiple file types (MP4, WebM, MKV, AVI, MP3, M4A, OGG, Opus, FLAC, WAV)
  • Serverless Architecture: Runs entirely on Cloudflare's edge network
  • Async Processing: Uses Cloudflare Workflows for reliable background job execution
  • Container-based Extraction: Leverages Cloudflare Containers running Deno + yt-dlp for media processing
  • Modern UI: Clean and responsive interface built with SvelteKit and Tailwind CSS

Architecture

graph TB
    subgraph "User"
        U[Browser]
    end

    subgraph "Cloudflare Edge"
        subgraph "Web App (SvelteKit Worker)"
            WEB[dldeez-web]
            ROUTE1[POST /discover]
            ROUTE2[GET /discoveries/:id]
        end

        subgraph "Discoverer Service"
            DW[Discoverer Worker]
            DWF[Discoverer Workflow]
            DC[Discoverer Container]
        end

        subgraph "Downloader Service"
            DLW[Downloader Worker]
            DLWF[Downloader Workflow]
            DLC[Downloader Container]
        end

        HYPERDRIVE[Hyperdrive]
        R2[R2 Bucket]
    end

    subgraph "External"
        NEON[(Neon PostgreSQL)]
        YTDL[yt-dlp]
    end

    U -->|1. Paste Link| WEB
    WEB -->|2. Create Discovery| HYPERDRIVE
    WEB -->|3. Run Workflow| DW
    DW -->|4. Create| DWF
    DWF -->|5. Fetch Container| DC
    DC -->|6. Execute| YTDL
    YTDL -->|7. Return Formats| DC
    DC -->|8. JSON Response| DWF
    DWF -->|9. Save Results| HYPERDRIVE
    HYPERDRIVE -->|10. Persist| NEON

    U -->|11. Select Format| WEB
    WEB -->|12. Create Download| HYPERDRIVE
    WEB -->|13. Run Workflow| DLW
    DLW -->|14. Create| DLWF
    DLWF -->|15. Fetch Container| DLC
    DLC -->|16. Execute| YTDL
    YTDL -->|17. Stream Media| DLC
    DLC -->|18. Upload| R2
    DLWF -->|19. Update Status| HYPERDRIVE

    U -->|20. Download File| R2

    style WEB fill:#ff6b35,stroke:#333,color:#fff
    style DW fill:#4ecdc4,stroke:#333,color:#fff
    style DLW fill:#4ecdc4,stroke:#333,color:#fff
    style DC fill:#95e1d3,stroke:#333,color:#000
    style DLC fill:#95e1d3,stroke:#333,color:#000
    style HYPERDRIVE fill:#f38181,stroke:#333,color:#fff
    style R2 fill:#aa96da,stroke:#333,color:#fff
    style NEON fill:#fcbad3,stroke:#333,color:#000

Project Structure

dldeez/
├── apps/
│   ├── web/              # SvelteKit frontend
│   ├── discoverer/       # Media format discovery service
│   │   ├── src/          # Worker + Workflow logic
│   │   └── container/    # Deno container running yt-dlp
│   └── downloader/       # Media download service
│       ├── src/          # Worker + Workflow logic
│       └── container/    # Deno container running yt-dlp + ffmpeg
├── packages/
│   ├── contracts/        # Shared TypeScript service interfaces
│   └── db/               # ZenStack database client + schema
└── package.json          # Monorepo root

Tech Stack

Layer Technology
Frontend SvelteKit 5, Tailwind CSS 4
Workers Cloudflare Workers, Workflows
Containers Cloudflare Containers, Deno, Hono
Database PostgreSQL (Neon), ZenStack ORM
Storage Cloudflare R2
Connection Cloudflare Hyperdrive
Media Engine yt-dlp, FFmpeg

Prerequisites

  • Node.js 20+
  • npm
  • Docker
  • Wrangler CLI
  • Cloudflare account with Workers, R2, Hyperdrive, and Containers enabled
  • PostgreSQL database (e.g., Neon)

Setup

  1. Clone the repository:
git clone https://github.com/h4ckedneko/dldeez.git && cd dldeez
  1. Install dependencies:
npm install
  1. Copy the example configuration files and fill in your values:
cp apps/web/wrangler.toml.example apps/web/wrangler.toml
cp apps/discoverer/wrangler.toml.example apps/discoverer/wrangler.toml
cp apps/downloader/wrangler.toml.example apps/downloader/wrangler.toml
cp packages/db/.env.example packages/db/.env
  1. Generate TypeScript definitions:
npm run generate

Development

Start all services in development mode:

# Web frontend
npm run web:dev

# Discoverer service
npm run discoverer:dev

# Downloader service
npm run downloader:dev

Deployment

Deploy each service to Cloudflare:

# Web frontend
npm run web:deploy

# Discoverer service
npm run discoverer:deploy

# Downloader service
npm run downloader:deploy

Scripts

Command Description
npm run web:dev Start web app in development
npm run web:build Build web app
npm run web:preview Preview web app locally
npm run web:deploy Deploy web app
npm run web:generate Generate web app types
npm run web:check Type-check web app
npm run discoverer:dev Start discoverer in development
npm run discoverer:build Build discoverer
npm run discoverer:preview Preview discoverer locally
npm run discoverer:deploy Deploy discoverer
npm run discoverer:generate Generate discoverer types
npm run downloader:dev Start downloader in development
npm run downloader:build Build downloader
npm run downloader:preview Preview downloader locally
npm run downloader:deploy Deploy downloader
npm run downloader:generate Generate downloader types
npm run db:push Push database schema
npm run db:migrate Run database migrations
npm run db:deploy Deploy database migrations
npm run db:status Check database migration status
npm run db:generate Generate database client
npm run db:check Check database schema
npm run db:format Format database schema
npm run generate Generate types for all packages
npm run check Type-check all packages
npm run format Format code with dprint

Ethics

DLDeez is designed to simplify downloading publicly available content. We assume no liability for how the tool is used. Users bear full responsibility for their downloads, including how they choose to use or share the content. This is not a piracy tool and should not be treated as one. It only works with free, publicly accessible media that could otherwise be saved using a browser's built-in developer tools.

Acknowledgements

Inspirations and Alternatives

Top categories

Loading Svelte Themes