Core Deep Frontend & Backend Blueprint
How to build your own perfect online video downloader for free.
The exact production frontend and multi-stage backend architecture powering every inspection, preview, crop, and download on Clipper.

Two-layer system design: Frontend workspace ↔ Backend engine
Clipper keeps rendering, 3D geometry visualization, and framing math in the browser while isolating network inspection, FFmpeg transcoding, and raw asset streaming inside hardened Node.js server routes.
01. Presentation & Interactive Workspace Layer (Frontend)
Next.js 15 App Router · React 19 · Tailwind CSS v4 · Motion · Three.js WebGL2
- Zero-pill editorial white workspace using Playfair Display, Plus Jakarta Sans, and IBM Plex Mono with tabular numerals across every metric table.
- Dedicated interactive tools linked seamlessly via ?url= query handoffs: Video Downloader, Audio Extractor, Stream Microscope, Deep Web & Source Inspector, Multi-Link Batch Inspector, 3D Asset Studio, and Aspect Ratio Lab.
- GPU-composited route transitions (PageTransitionShell) and scroll reveals honoring prefers-reduced-motion, plus Three.js PBR scenes with RoomEnvironment lighting, software-WebGL frame pacing, and collapsible bottom docks.
- Client-side persistence built cleanly with useSyncExternalStore for EN/ES/FR language switching and private browser-only Recent Downloads history.
02. Extraction, Media Processing & Source Mining Layer (Backend)
Node.js Runtime · TypeScript · yt-dlp · FFmpeg / FFprobe · Streaming Fetch
- Honest Quality Matrix: Maps real discovered streams by Math.min(width, height) (handling portrait 9:16 video accurately) against 4K, 1440p, 1080p, 720p, 480p, and 360p—never rendering fake buttons.
- Frame-Accurate FFmpeg Math: Even-pixel centered aspect cropping via trunc(ih*ratio/2)*2, post-input -ss / -t trimming, and studio audio resampling with bitrate and stereo/mono controls.
- Deep Code Discovery: Unescapes JSON/Unicode URLs inside inline scripts and linked JS/CSS bundles, auto-converts GitHub blob URLs to raw endpoints, and extracts both raw downloadable files and referenced public API routes.
- Strict Server Hygiene: Every external subprocess runs via argument arrays with shell disabled; every outbound HTTP request validates public DNS resolution across every redirect hop, enforces payload caps, and deletes temp workspaces immediately.
The seven backend API routes powering Clipper
Splitting inspection, previews, FFmpeg transcoding, deep webpage mining, raw asset streaming, and source code retrieval into focused routes keeps transfers memory-flat and cleanly bounded.
POST /api/inspect
6-Stage Multi-Platform Media Discovery
Normalizes platform links (Vimeo, TikTok, Dailymotion, X, Wikimedia, HLS playlists, direct files), verifies public DNS safety, and cascades through FFprobe, HLS master playlists, native Vimeo Player Config, watermark-free TikTok HD, X media API, yt-dlp, and HTML5/OpenGraph discovery.
GET /api/preview
Range-Seeking HTML5 Video Preview Proxy
Resolves the best browser-playable progressive stream and forwards HTTP Range byte headers so users can play, scrub, set exact clip trim timestamps, and capture native-resolution PNG frames via same-origin <canvas> without CORS errors.
GET /api/thumbnail
Validated Cover Image Proxy
Streams source poster artwork through the server with strict content-type and byte-size checks so previews and one-click cover downloads work cleanly across origins.
GET /api/download
Pass-Through Streaming, FFmpeg Assembly, Trimming & Audio Studio
Streams unmodified single files straight through with zero disk usage. When merging split HD video+audio, assembling HLS segments, applying frame-accurate -ss/-t clip trims, cropping aspect ratios (16:9, 9:16, 4:3, 1:1, 21:9), or exporting studio audio (MP3, M4A, WAV, FLAC, OGG, Opus at 44.1/48/96 kHz), runs FFmpeg inside an isolated temp folder deleted immediately after transfer.
POST /api/web-inspector
Deep Website Source, Hydration & Raw Asset Miner
Parses raw HTML, recursively walks embedded JSON hydration payloads (__NEXT_DATA__, __NUXT_DATA__, JSON-LD), decodes escaped script URLs, scans DOM data-* attributes, CSS url(...) rules, and up to 4 first-party JS/CSS bundles to uncover downloadable 3D models, stock video, audio, archives, and public API routes.
GET /api/web-inspector/asset
Safe Raw File Probe, Direct Download & 3D Model Streamer
Supports 4 strict modes: probe (real HEAD / Range byte-size check), download (streaming attachment up to 150 MB), preview (verified .glb/.gltf/.obj/.stl/.ply geometry stream for Three.js), and resource (companion .bin/texture loader for multi-file .gltf scenes) with desktop header fallback and X-Content-Type-Options: nosniff.
GET /api/web-inspector/source
Public Frontend Source Code Reader
Fetches any public HTML document, JavaScript bundle, CSS stylesheet, JSON manifest, robots.txt, or sitemap XML up to a bounded 500 KB UTF-8 ceiling so developers can inspect, search, copy, and save live frontend source code safely.
End-to-end request lifecycle & engineering guarantees
Every request—from a 4K video download to a Three.js GLB preview or live webpage source code audit—follows these five non-negotiable engineering rules.
01. URL Normalization & Public Network Guard
Every user URL is canonicalized (handling short links, embeds, and GitHub raw file paths), restricted strictly to http/https, and resolved via DNS to block loopback, RFC1918 private networks, IPv6 local addresses, and cloud metadata endpoints across every redirect hop.
02. Multi-Stage Discovery Cascade
Rather than relying on one fragile parser, Clipper layers direct FFprobe inspection, HLS playlist parsing, native Vimeo/TikTok/X extractors, yt-dlp, and deep HTML/JSON/bundle scanning so each link hits the cleanest, fastest extraction path.
03. Real Preview & Client-Side Verification
Video streams play via byte-range proxying (enabling same-origin native PNG frame snapshots and live trim selection), while 3D assets stream directly into Three.js GLTFLoader, OBJLoader, STLLoader, and PLYLoader with measured mesh, triangle, and vertex counts.
04. Transparent Frontend vs. Backend Code Boundary
In the Deep Website Inspector, Clipper fetches all publicly delivered frontend source files (HTML, JS bundles, CSS, hydration JSON, manifests, robots.txt) and derives observable backend signals (server headers, CDN, caching, public API paths) while respecting private server boundaries.
05. Zero-Storage Streaming & Instant Cleanup
Pass-through media and raw asset downloads stream directly from upstream to browser memory-flat via ReadableStream caps. Any temporary file written for FFmpeg merging, trimming, or cropping is removed in a guaranteed finally block the moment transfer finishes.
Test the full Clipper architecture live
Inspect a video stream, mine frontend source code, or orbit a real 3D GLB file right now.