English ยท ็ฎไฝไธญๆ
Download watermark-free videos and images from Xiaohongshu (RED) and X / Twitter.
Paste a Xiaohongshu or X share link/text to extract original images and videos (watermark-free), with multi-resolution selection, download history, and shareable parse results.
- Multi-platform support โ Parses Xiaohongshu notes (video + images) and X/Twitter tweets (video + images)
- Watermark-free downloads โ The server fetches original media directly, with no watermark added
- Multi-resolution selection โ Shows all available video resolutions (1080p / 720p / 480p, etc.) with file sizes
- Smart URL extraction โ Paste share text containing a link; the URL is detected and extracted automatically
- Share parse results โ Generates an 8-character share code (stored in KV for 7 days) that others can open directly
- Download history โ Keeps the last 10 records locally, with one-click re-parsing
- Real-time download progress โ Streaming progress bar based on
ReadableStream - PWA support โ Works offline, installable to desktop, with automatic update prompts
- Dark mode โ Follows the system theme, adapting to light and dark styles
- Responsive design โ Built on the Geist design language, fully adapted for mobile and desktop
| Layer | Technology | Notes |
|---|---|---|
| Frontend | React 19 + TypeScript + Vite 8 | Modern SPA framework |
| Build | Vite + LightningCSS + pnpm | Fast builds and CSS processing |
| PWA | vite-plugin-pwa + Workbox | Offline caching and auto updates |
| Styling | Geist design system + CSS Variables | Light/dark themes, responsive layout |
| Backend | Cloudflare Workers | Serverless edge computing |
| Storage | Cloudflare KV | Caching and share-code storage |
| Deployment | Cloudflare Workers (single deployment) | Frontend assets + API in one Worker, global edge |
Requires Node.js โฅ 20 and pnpm โฅ 9.
pnpm install
pnpm dev # frontend :5173 + backend :8787, /api/* proxied automatically
pnpm build # typecheck + production bundle into dist/
pnpm test # all main tests (pre-commit runs it automatically)
pnpm release # build + deploy assets + API as one WorkerAdditional test commands: test:full (incl. fallback tests), test:worker, test:frontend, test:fallback, test:watch.
Pre-commit hook (
.githooks/pre-commit) runs lint โ build โ test on every commit. Skip withgit commit --no-verify.
Worker tests run in the Miniflare (workerd) runtime with real Cloudflare Workers APIs such as HTMLRewriter and KVNamespace. Frontend tests use a jsdom environment.
ming-media-downloader/
โโโ frontend/
โ โโโ src/ # React SPA (entry main.tsx, hooks, components)
โ โโโ public/ # Static assets (icons, etc.)
โ โโโ tests/ # jsdom tests
โ โโโ index.html # SPA entry
โ โโโ vite.config.ts # Build config (dev proxy /api โ :8787; outDir ../dist)
โ โโโ tsconfig.*.json # Frontend typecheck
โโโ backend/
โ โโโ src/
โ โ โโโ index.ts # Entry point + routing (/api/*; other paths โ SPA assets)
โ โ โโโ parse.ts # Parse orchestration
โ โ โโโ rednote.ts # Xiaohongshu parser
โ โ โโโ twitter.ts # X/Twitter parser
โ โ โโโ handlers.ts # Image / download proxies
โ โ โโโ cache.ts # KV cache
โ โ โโโ utils.ts # CORS / JSON helpers
โ โโโ tests/ # workerd tests
โ โโโ cloudflare.config.ts # cf deploy/dev config (KV MMD_CACHE + ASSETS binding)
โ โโโ wrangler.toml # Kept in sync for vitest-pool-workers
โโโ dist/ # Frontend build output (deployed as Worker assets)
โโโ vitest.*.config.ts # Test configs (root, per runtime)
โโโ tsconfig.json / tsconfig.test.json
โโโ scripts/ # PWA icon generation
โโโ package.json # pnpm dev / release / test
Deploy with pnpm release (or cd backend && cf deploy): it builds the frontend and ships assets + API as one Worker.
Cloudflare resources required:
- KV Namespace
MMD_CACHEโ Caches parse results and share codes (expires after 7 days by default) - Browser Rendering (optional) โ Puppeteer rendering for Xiaohongshu SSR fallback
Bind the following resources to the Worker in the Cloudflare Dashboard:
| Binding | Type | Notes |
|---|---|---|
MMD_CACHE |
KV Namespace | Cache and share storage (required) |
BROWSER_RENDERING |
Browser Rendering | SSR fallback rendering (optional) |
User browser (React SPA + PWA)
โ
โ /api/parse, /api/download, /api/image-proxy, /api/share
โผ
Cloudflare Worker (static assets + API)
โ
โโโ parse.ts โ rednote.ts (SSR HTML parsing)
โ โ twitter.ts (fxtwitter API)
โโโ cache.ts โ KV (MMD_CACHE)
โโโ handlers.ts โ image proxy / download proxy
โโโ utils.ts โ URL parsing / CORS
| Method | Path | Description |
|---|---|---|
GET |
/api/parse?url=... |
Parse a media link |
GET |
/api/image-proxy?url=... |
Image proxy (Xiaohongshu Referer) |
GET |
/api/download?url=...&name=... |
Media proxy download |
POST |
/api/share |
Create a share link |
GET |
/api/share?id=... |
Fetch a shared result |
- fxtwitter โ X/Twitter media parsing API
- Geist โ Vercel design system font
- Cloudflare Workers โ Edge computing platform