docs: v1.0.0 — changelog, README, contacts, hosting guide, CLAUDE.md; bump to 1.0.0
- CHANGELOG: the v1.0.0 entry (moving house, new interface, data fixes, backup & restore, faster entry, catalogs, desktop hardening, CI). - README: the web app at ytgenerator.stream, what moved from GitHub Pages, current features, privacy as it is now (Cloudflare delivery, Turnstile, cookieless analytics on the web only), contacts by purpose; the dead Discord invite and the old email are gone. - docs/HOSTING.md (new): Worker routing, cookies, headers, secrets, one-time dashboard settings, local dev, previews and rollback. - CLAUDE.md rewritten for the real stack, layout, commands and rules. - CONTRIBUTING / PR template / issue templates: main-only branching, the required checks, 8 locales, Android and current versions; issue links to security advisories, the wiki, Discord and poli0981.dev/links. - DISCLAIMER (+ Vietnamese), NOTICE: current model disclosure and the copyright / DMCA contacts. PRIVACY: backup locations and the moving notice on the old address. - Version 1.0.0 in package.json, package-lock.json, tauri.conf.json, Cargo.toml and Cargo.lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e071b65db
commit
bca589e169
17 files changed
+434
-343
No files matched your search
@@ -12,8 +12,8 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: App version
|
||||
description: From the About page or the title bar. Example `v0.13.0`.
|
||||
placeholder: v0.13.0
|
||||
description: From the About page. Example `v1.0.0`.
|
||||
placeholder: v1.0.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -33,14 +33,14 @@ body:
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating system
|
||||
description: e.g. Windows 11 25H2, macOS 14.6, Ubuntu 24.04
|
||||
description: e.g. Windows 11 25H2, macOS 26, Ubuntu 24.04, Android 15
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: browser
|
||||
attributes:
|
||||
label: Browser (web only)
|
||||
description: e.g. Chrome 131, Brave 1.70, Safari 17. Leave blank for desktop.
|
||||
description: e.g. Chrome 141, Firefox 144, Safari 26. Leave blank for the desktop and Android apps.
|
||||
- type: dropdown
|
||||
id: language
|
||||
attributes:
|
||||
@@ -51,7 +51,9 @@ body:
|
||||
- 日本語 (ja)
|
||||
- Español (es)
|
||||
- 한국어 (ko)
|
||||
- 中文 (zh)
|
||||
- 简体中文 (zh)
|
||||
- Português (BR) (pt-BR)
|
||||
- Bahasa Indonesia (id)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
@@ -82,7 +84,7 @@ body:
|
||||
id: console
|
||||
attributes:
|
||||
label: Console / log output
|
||||
description: Open DevTools (web) or the log panel (desktop) and paste any errors. Rendered as code.
|
||||
description: Paste errors from the app's Logs page (all platforms) or the browser's DevTools console (web). Rendered as code.
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord — General chat
|
||||
url: https://discord.gg/2aNR3aVt
|
||||
- name: Report a security vulnerability
|
||||
url: https://github.com/poli0981/youtube-generator/security/advisories/new
|
||||
about: Privately, please — never in a public issue. See SECURITY.md.
|
||||
- name: User guide (wiki)
|
||||
url: https://github.com/poli0981/youtube-generator/wiki
|
||||
about: How-tos, backup & restore, troubleshooting and the FAQ.
|
||||
- name: Discord
|
||||
url: https://discord.gg/kDM9GMu5vm
|
||||
about: For casual questions, gameplay chat, or quick help. Use a bug report or feature request for anything actionable.
|
||||
- name: All channels and contacts
|
||||
url: https://poli0981.dev/links/
|
||||
about: Email addresses by purpose and every other way to reach the maintainer.
|
||||
- name: GitHub Discussions
|
||||
url: https://github.com/poli0981/youtube-generator/discussions
|
||||
about: Ideas, Q&A, and release announcements live here.
|
||||
@@ -17,10 +17,12 @@
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `npm run typecheck` passes
|
||||
- [ ] `npm run lint` passes
|
||||
- [ ] `npm run validate:locales` passes (required if you touched `src/i18n/locales/` or `_schema.json`)
|
||||
- [ ] `npm run test:run` passes
|
||||
- [ ] `npm run typecheck` and `npm run typecheck:all` pass
|
||||
- [ ] `npm run lint` and `npm run format:check` pass
|
||||
- [ ] `npm run validate:locales` passes — new strings are in all 8 locales (en, vi, ja, es, ko, zh, pt-BR, id)
|
||||
- [ ] `npm run test:run` passes, with tests for the change
|
||||
- [ ] `npm run build && npm run check:bundle` stay within budget
|
||||
- [ ] Touched `src-tauri/`: `cargo fmt --check`, `cargo clippy -- -D warnings`, `cargo test`
|
||||
- [ ] No secrets, credentials, or PII committed
|
||||
- [ ] No new runtime dependencies without prior discussion in an issue
|
||||
- [ ] Commit messages follow `type(scope): message`
|
||||
@@ -32,12 +34,14 @@ If this PR touches the UI, attach screenshots or short recordings at:
|
||||
- Desktop (≥1024px)
|
||||
- Tablet (768px)
|
||||
- Mobile (390px)
|
||||
- Dark and light theme
|
||||
- The desktop / Android app, if the change is platform-specific
|
||||
Otherwise delete this section.
|
||||
-->
|
||||
|
||||
## AI-Assisted Contribution
|
||||
|
||||
- [ ] Yes — AI tool used: <!-- e.g. Claude Code 4.7 Opus, Cursor, GitHub Copilot -->
|
||||
- [ ] Yes — AI tool used: <!-- e.g. Claude Code (Claude Opus 5.5), Cursor, GitHub Copilot -->
|
||||
- [ ] No
|
||||
|
||||
If yes: did you review every line of generated code/text yourself before submitting? <!-- yes/no -->
|
||||
|
||||
@@ -2,6 +2,75 @@
|
||||
|
||||
All notable changes to YTDescGen ship as tagged releases on `main`.
|
||||
|
||||
## v1.0.0 — 2026-09-30
|
||||
|
||||
**YTDescGen moves to [ytgenerator.stream](https://ytgenerator.stream)**, gets a new interface, and the data it writes is right: hardware names, YouTube's own tag count, chapters, history. Backups you can preview and undo, a quick start for the next video, and a hardened desktop app. Web, desktop and Android all ship as 1.0.0.
|
||||
|
||||
### Moving house
|
||||
|
||||
- **The web app lives at [ytgenerator.stream](https://ytgenerator.stream)**, served by a Cloudflare Worker that Cloudflare builds and deploys from `main` (`wrangler.jsonc` is the only Cloudflare file). GitHub Pages is retired: until **2026-11-29** the old address shows a moving notice that **downloads the data your browser saved there as a backup file** — restore it on the new site in Settings › Backup & restore. See [Moving from GitHub Pages](https://github.com/poli0981/youtube-generator/wiki/Moving-from-GitHub-Pages).
|
||||
- **A Cloudflare Turnstile check** (usually invisible) runs once a day before the web app loads. The token is verified server-side; a signed, `HttpOnly` `__Host-` cookie remembers the pass for 24 hours. Agreeing to the terms on that page counts, so web visitors see one screen, not two.
|
||||
- **Legal pages in the site**: Terms, Privacy, Disclaimer (+ Vietnamese), Security, License, Notice, Code of Conduct and third-party notices are rendered at build time — public and crawlable at `/legal/*`, and offline in the app's Legal Center. The Privacy Policy was rewritten for Cloudflare hosting, Turnstile and Web Analytics, so everyone accepts the terms once more (**terms version 2**).
|
||||
- **Cloudflare Web Analytics** (cookieless) in the web build only; the desktop and Android apps have no analytics.
|
||||
- Security headers on everything (CSP per page type, COOP/CORP, frame and referrer policies), `/.well-known/security.txt`, HSTS preload at the edge, clean URLs on the web (old `/#/…` links still work).
|
||||
- **New contacts** by purpose: contact@, security@, privacy@, legal@, dmca@, copyright@, code@ and sponsor@ poli0981.dev, plus [poli0981.dev](https://poli0981.dev/) and [poli0981.dev/links](https://poli0981.dev/links/). The dead Discord invite is gone.
|
||||
- **Brand**: one logo drives the favicon, PWA icons, link-preview card and every desktop/Android icon — the apps used to ship a plain purple square.
|
||||
|
||||
### New interface
|
||||
|
||||
- **Design system** on Radix primitives, Motion and sonner: consistent dark and light themes, self-hosted Inter/JetBrains Mono (with Vietnamese), compact controls (larger on touch screens), animated icons that respect _reduce motion_, real focus handling in dialogs, labelled controls.
|
||||
- **App shell**: collapsible sidebar, a top bar with the output and interface languages, a **bottom bar on phones**, and a **⌘/Ctrl + K command palette** (navigate, copy, apply profile/preset/template, theme, languages, help).
|
||||
- **Editor**: a **sticky live preview** beside the form (a sheet on phones), sections in the order a video is filled in, a searchable genre picker, collapsed sections that show a summary.
|
||||
- **Output**: a **YouTube preview** — the title where search results cut it and the description above "…more".
|
||||
- Every page restyled; hard-coded English translated; flag emoji (which Windows shows as letters) replaced by language names.
|
||||
- Desktop window resizable (1280×820 by default).
|
||||
|
||||
### Data that is right
|
||||
|
||||
- **Hardware names**: _NVIDIA GeForce RTX 5080_ (was "NVIDIA RTX 5080"), _AMD Radeon RX 9070 XT_, _Apple M4 Pro_, laptop GPUs named as such. One **searchable GPU picker** replaces Brand › Series › Model; cards that never shipped are gone; laptop, integrated, handheld and Apple M5 chips added. RAM gains 24/48/192 GB, LPDDR and speeds ("32 GB DDR5-6000"); OS lists SteamOS, Bazzite, CachyOS and current Fedora/macOS; pasted Windows CPU names are tidied. Old saved values are migrated. The rig block is labelled in the output language, in a fixed order.
|
||||
- **Tags counted the way YouTube counts them** (quotes around multi-word tags, commas between them): 15 of 51 real tag sets were over 500 while showing as under. Trimming keeps trying shorter tags; platform names read "Steam", "itch.io".
|
||||
- **Chapters**: "Final Fantasy VII" no longer turns into "Ending Fantasy VII"; `[0:00]` and frame-accurate times are read; a live check shows whether YouTube will show chapters (0:00 first, at least 3, ≥ 10 s apart) and **Tidy up** rewrites pasted lists.
|
||||
- **History** keeps one entry per video (every Output visit used to add one).
|
||||
- **Copy** is blocked only for the field that is over its limit; Ctrl/⌘+Shift+C follows the same rules as the Output page.
|
||||
- Warnings for `<` and `>` (YouTube rejects them); validation accepts real variants (Steam `/sub/` and `s.team`, regional Nintendo sites, `m.`/`www.` links, playlist links from phones) and rejects email domains without a TLD.
|
||||
- **An empty channel name** no longer leaves "…of Hades on ." — the phrase is dropped in all eight languages.
|
||||
|
||||
### Backup & restore
|
||||
|
||||
- **Settings › Backup & restore**: back up everything (or chosen parts) to one file, restore from a file or by dropping it. Files from every earlier version are read — v0.15–v0.38 exports, pre-v0.15 arrays, the old desktop data file — and run through the same migrations the app uses, then a strict whitelist.
|
||||
- **Preview before anything changes**: new / already here / different, per item; **Merge** (keep the newer one, or both) or **Replace**; one step, with **Undo**. Settings never carry your consent or panel state.
|
||||
- **Automatic backups on desktop**: the newest ten, written after your library changes (and before every restore); restore them from Settings.
|
||||
- History exports as **CSV** or JSON; exports carry the date in their names.
|
||||
- Templates save **every** editor field; presets save store link types and all per-game fields; profiles save donate and community links. Edit forms can update from the current editor and save on Enter.
|
||||
|
||||
### Faster data entry
|
||||
|
||||
- **Quick start** at the top of the editor: pick the **channel profile** and the **game preset** (remembered); replacing filled-in fields asks first; "Update profile/preset" appears when the editor drifts from them.
|
||||
- **Next part** and **New video, same game** clear what belonged to the last video; applying a preset for another game does too. **Start over** keeps your channel; a new draft starts in your **Default Output Language** (it always started in English).
|
||||
- **Paste a store link anywhere** — it lands in the right store field, sets the platform and names the game ("Final Fantasy VII Remake", "Baldur's Gate 3"). Game-name suggestions from presets and history.
|
||||
- **Title shapes**: the alternatives dialog can apply one; new **Title order** setting (game first / video first).
|
||||
- **Copy All can include the tags**; **Batch** chooses Part or Demo part and continues from your part number; **Ctrl/⌘+S** saves the output to History.
|
||||
|
||||
### Catalogs
|
||||
|
||||
- Stores: EA app, Ubisoft, Battle.net, Google Play, App Store, Meta Quest.
|
||||
- Social links: YouTube, Threads, Kick, Reddit, Bilibili; "X (Twitter)" with the X mark.
|
||||
- Cross-posting: **YouTube Shorts, X** (counted the way X counts), **Threads, Bluesky**.
|
||||
- Vietnamese banks: MBV, VCBNeo, Vikki Bank (formerly OceanBank, CBBank, DongA Bank — saved old names get a one-click switch), Cake by VPBank, Timo.
|
||||
|
||||
### Desktop
|
||||
|
||||
- **The webview can no longer name a path.** The five commands that read, wrote, listed and deleted any path it sent are replaced by name-only commands under the app's data folder and by Save/Open dialogs run from Rust (text formats only, size-capped). The fs and shell plugins are removed.
|
||||
- **The settings "mirror" file never worked**: it was written next to the data folder and never read back. It is gone; on first start the old file becomes a restorable backup (never applied on its own) and stray log files are moved into place.
|
||||
- One tray icon, with the app icon.
|
||||
|
||||
### Under the hood
|
||||
|
||||
- CI: dependency review, actionlint + zizmor, OpenSSF Scorecard, REUSE, Conventional-Commit titles, rustfmt/clippy/cargo test/cargo-deny, coverage thresholds, a measured bundle budget (initial load ≤ 280 KB gzip), licence allow-list and generated third-party notices, `wrangler deploy --dry-run`; every action pinned by SHA; release builds verify first.
|
||||
- Dependencies current (React 19.3, Vite 8.3, Tauri 2.12); `npm audit` clean; Tauri 2.12 dropped the `rand` advisory; cargo-deny caught and fixed two `quick-xml` advisories.
|
||||
- New strings in all eight locales (Japanese, Spanish, Korean, Chinese, Portuguese and Indonesian are AI-translated — see the Disclaimer).
|
||||
- 930+ tests (was 698).
|
||||
|
||||
## v0.38.0 — 2026-08-17
|
||||
|
||||
Two new languages: **Portuguese (Brazil)** and **Indonesian**. Brazil is a
|
||||
|
||||
@@ -1,300 +1,163 @@
|
||||
# CLAUDE.md — YouTube Description Generator (YTDescGen)
|
||||
# CLAUDE.md — YTDescGen
|
||||
|
||||
## Project Overview
|
||||
|
||||
**YTDescGen** is a desktop-capable web application that generates YouTube video titles, descriptions, and tags for Gameplay No Commentary channels. It supports multiple languages, game genres, and video types with a profile/preset system to eliminate repetitive data entry.
|
||||
**YTDescGen** generates YouTube titles, descriptions and tags for Gameplay No Commentary channels, in eight languages, with profiles (channel), presets (game) and templates (whole form) to skip repeated data entry.
|
||||
|
||||
- **Repository**: `github.com/poli0981/youtube-generator`
|
||||
- **License**: Apache-2.0 (see `LICENSE` + `NOTICE`)
|
||||
- **Primary Language**: TypeScript
|
||||
- **Stack**: React 18 + Vite 8 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
|
||||
- **Target Platforms**: Web (GitHub Pages), Desktop (Windows/macOS/Linux via Tauri)
|
||||
- **Web app**: <https://ytgenerator.stream> — a Cloudflare Worker (Turnstile gate + static build), deployed by Cloudflare Workers Builds on every push to `main`. See [docs/HOSTING.md](docs/HOSTING.md).
|
||||
- **Desktop** (Windows / macOS / Linux) and **Android** apps: Tauri 2, released from signed tags.
|
||||
- **Repository**: `github.com/poli0981/youtube-generator` · **License**: Apache-2.0 (`LICENSE`, `NOTICE`, REUSE-compliant).
|
||||
- **Maintainer**: poli0981 (SkullMute). Contacts by purpose: see `src/config/about.ts` and README.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology | Why |
|
||||
|-------|-----------|-----|
|
||||
| Framework | React 18 | Familiar from F2P tracker dashboard |
|
||||
| Build | Vite 8 | Fast HMR, Rolldown bundler |
|
||||
| Language | TypeScript (strict) | Type safety for template engine |
|
||||
| Styling | Tailwind CSS 3 | Utility-first, fast iteration |
|
||||
| State | Zustand + persist middleware | Simple, localStorage/file persistence |
|
||||
| Router | React Router 6 (HashRouter) | GitHub Pages compatible |
|
||||
| i18n | i18next + react-i18next | Industry standard, lazy-load locales |
|
||||
| Desktop | Tauri 2 | Lightweight Rust-based, ~5MB binary |
|
||||
| Testing | Vitest + React Testing Library | Vite-native, fast |
|
||||
| Lint | ESLint + Prettier | Consistent code style |
|
||||
| CI/CD | GitHub Actions | Familiar workflow |
|
||||
| Layer | Technology |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| UI | React 19, TypeScript (strict), Radix primitives (`radix-ui`), Motion (LazyMotion), cmdk, sonner, lucide-react + simple-icons |
|
||||
| Build | Vite 8 (Rolldown); config imports need `.ts` extensions |
|
||||
| Styling | Tailwind CSS 4, CSS-first `@theme` tokens in `src/styles/globals.css` |
|
||||
| State | Zustand 5 + `persist` (localStorage) — the only store on every platform |
|
||||
| Routing | React Router 7 — `BrowserRouter` on the web, `HashRouter` in Tauri |
|
||||
| i18n | i18next + react-i18next, 8 locales (en, vi, ja, es, ko, zh, pt-BR, id); `en` bundled, others lazy |
|
||||
| Desktop / Android | Tauri 2 (Rust) — see `src-tauri/` |
|
||||
| Web hosting | Cloudflare Workers (`worker/`, `wrangler.jsonc`), Turnstile, Web Analytics |
|
||||
| Tests | Vitest (node environment; Worker tests included) |
|
||||
| Quality | ESLint, Prettier, knip, coverage thresholds, bundle budget, licence allow-list, REUSE, actionlint/zizmor, cargo fmt/clippy/deny |
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
yt-desc-gen/
|
||||
├── CLAUDE.md # ← You are here
|
||||
├── README.md
|
||||
├── LICENSE
|
||||
├── package.json
|
||||
├── tsconfig.json
|
||||
├── vite.config.ts
|
||||
├── tailwind.config.ts
|
||||
├── index.html
|
||||
│
|
||||
├── docs/ # Project documentation
|
||||
│ ├── DEVELOPMENT.md # Toolchain / IDE / build commands (EN)
|
||||
│ ├── ARCHITECTURE.md # Technical architecture
|
||||
│ ├── FEATURES.md # Complete feature list
|
||||
│ ├── ROADMAP.md # Development phases
|
||||
│ ├── TECH-SPEC.md # Technical specifications
|
||||
│ ├── I18N.md # Internationalization guide
|
||||
│ ├── PACKAGING.md # Desktop packaging guide
|
||||
│ └── i18n/vi/ # Vietnamese mirrors (DEVELOPMENT, DISCLAIMER)
|
||||
│
|
||||
├── src/
|
||||
│ ├── main.tsx # Entry point
|
||||
│ ├── App.tsx # Root component + router
|
||||
│ ├── vite-env.d.ts
|
||||
│ │
|
||||
│ ├── config/ # Static data & constants
|
||||
│ │ ├── video-types.ts # VIDEO_TYPES array
|
||||
│ │ ├── genres.ts # GENRES array (extensible)
|
||||
│ │ ├── platforms.ts # Store platforms (Steam, Epic, etc.)
|
||||
│ │ ├── rig-fields.ts # Hardware field definitions
|
||||
│ │ ├── social-fields.ts # Social/donate link definitions
|
||||
│ │ └── defaults.ts # Default state values
|
||||
│ │
|
||||
│ ├── i18n/ # Internationalization
|
||||
│ │ ├── index.ts # i18next setup
|
||||
│ │ └── locales/
|
||||
│ │ ├── en/
|
||||
│ │ │ ├── ui.json # UI strings (buttons, labels)
|
||||
│ │ │ └── templates.json # Description templates
|
||||
│ │ ├── vi/
|
||||
│ │ ├── ja/
|
||||
│ │ ├── es/ # Spanish (example extension)
|
||||
│ │ ├── ko/ # Korean (future)
|
||||
│ │ ├── zh/ # Chinese (future)
|
||||
│ │ └── _schema.json # JSON schema for locale validation
|
||||
│ │
|
||||
│ ├── engine/ # Core template engine (pure functions, no React)
|
||||
│ │ ├── title-builder.ts # Title generation + quality-badge helper
|
||||
│ │ ├── title-variants.ts # A/B variant title generator (v0.5)
|
||||
│ │ ├── description-builder.ts # Description generation logic
|
||||
│ │ ├── tag-generator.ts # Tag generation + dedup + char limit
|
||||
│ │ ├── template-renderer.ts # Orchestrator: combines title + desc + tags
|
||||
│ │ └── types.ts # Shared types for engine
|
||||
│ │
|
||||
│ ├── store/ # State management (Zustand)
|
||||
│ │ ├── editor-store.ts # Current editor form state
|
||||
│ │ ├── profile-store.ts # Saved profiles (social, rig, channel)
|
||||
│ │ ├── preset-store.ts # Game presets (name + store links)
|
||||
│ │ ├── template-store.ts # Full-form snapshots (v0.5)
|
||||
│ │ ├── history-store.ts # Generated output history
|
||||
│ │ └── settings-store.ts # App settings (theme, default language, description toggles)
|
||||
│ │
|
||||
│ ├── hooks/ # Custom React hooks
|
||||
│ │ ├── use-generated-output.ts # Memoized template rendering
|
||||
│ │ ├── use-clipboard.ts # Copy-to-clipboard with feedback
|
||||
│ │ ├── use-char-count.ts # Character count with limit warning
|
||||
│ │ └── use-debounce.ts # Input debouncing
|
||||
│ │
|
||||
│ ├── components/ # Reusable UI components
|
||||
│ │ ├── ui/ # Primitives
|
||||
│ │ │ ├── Button.tsx
|
||||
│ │ │ ├── Input.tsx
|
||||
│ │ │ ├── Textarea.tsx
|
||||
│ │ │ ├── Toggle.tsx
|
||||
│ │ │ ├── ChipGroup.tsx
|
||||
│ │ │ ├── Select.tsx
|
||||
│ │ │ ├── Badge.tsx
|
||||
│ │ │ ├── Tooltip.tsx
|
||||
│ │ │ ├── Modal.tsx
|
||||
│ │ │ └── Toast.tsx
|
||||
│ │ │
|
||||
│ │ ├── editor/ # Editor-specific components
|
||||
│ │ │ ├── VideoTypeSelector.tsx
|
||||
│ │ │ ├── LanguageSelector.tsx
|
||||
│ │ │ ├── GenreSelector.tsx
|
||||
│ │ │ ├── GameInfoForm.tsx
|
||||
│ │ │ ├── VideoSettingsForm.tsx
|
||||
│ │ │ ├── TimestampEditor.tsx
|
||||
│ │ │ ├── StoreLinkEditor.tsx
|
||||
│ │ │ ├── RigEditor.tsx
|
||||
│ │ │ ├── SocialEditor.tsx
|
||||
│ │ │ ├── WarningToggles.tsx
|
||||
│ │ │ └── QuickPreview.tsx
|
||||
│ │ │
|
||||
│ │ ├── output/ # Output display components
|
||||
│ │ │ ├── OutputPreview.tsx
|
||||
│ │ │ ├── TitleOutput.tsx
|
||||
│ │ │ ├── DescriptionOutput.tsx
|
||||
│ │ │ ├── TagOutput.tsx
|
||||
│ │ │ ├── CharCounter.tsx
|
||||
│ │ │ ├── CopyButton.tsx
|
||||
│ │ │ └── CopyAllBar.tsx
|
||||
│ │ │
|
||||
│ │ ├── profiles/ # Profile management
|
||||
│ │ │ ├── ProfileList.tsx
|
||||
│ │ │ ├── ProfileCard.tsx
|
||||
│ │ │ ├── ProfileSaveForm.tsx
|
||||
│ │ │ └── GamePresetManager.tsx
|
||||
│ │ │
|
||||
│ │ └── layout/ # App shell
|
||||
│ │ ├── AppShell.tsx
|
||||
│ │ ├── Sidebar.tsx
|
||||
│ │ ├── Header.tsx
|
||||
│ │ └── TabBar.tsx
|
||||
│ │
|
||||
│ ├── pages/ # Route pages
|
||||
│ │ ├── EditorPage.tsx
|
||||
│ │ ├── OutputPage.tsx
|
||||
│ │ ├── ProfilesPage.tsx
|
||||
│ │ ├── HistoryPage.tsx
|
||||
│ │ ├── SettingsPage.tsx
|
||||
│ │ └── BatchPage.tsx
|
||||
│ │
|
||||
│ ├── utils/ # Shared utilities
|
||||
│ │ ├── clipboard.ts
|
||||
│ │ ├── char-count.ts
|
||||
│ │ ├── sanitize.ts
|
||||
│ │ ├── export.ts # JSON/CSV export
|
||||
│ │ └── import.ts # JSON import
|
||||
│ │
|
||||
│ └── styles/
|
||||
│ └── globals.css # Tailwind directives + custom vars
|
||||
│
|
||||
├── src-tauri/ # Tauri desktop shell (Phase 4)
|
||||
│ ├── Cargo.toml
|
||||
│ ├── tauri.conf.json
|
||||
│ ├── src/
|
||||
│ │ └── main.rs
|
||||
│ └── icons/
|
||||
│
|
||||
├── tests/
|
||||
│ ├── engine/ # Unit tests for template engine
|
||||
│ │ ├── title-builder.test.ts
|
||||
│ │ ├── description-builder.test.ts
|
||||
│ │ └── tag-generator.test.ts
|
||||
│ ├── store/ # Store tests
|
||||
│ └── components/ # Component tests
|
||||
│
|
||||
├── scripts/ # Build/dev scripts
|
||||
│ ├── validate-locales.ts # Validate all locale files have same keys
|
||||
│ └── generate-locale-template.ts # Generate empty locale from schema
|
||||
│
|
||||
└── .github/
|
||||
└── workflows/
|
||||
├── ci.yml # Lint + test + build
|
||||
├── deploy-web.yml # Deploy to GitHub Pages
|
||||
└── release-desktop.yml # Build Tauri binaries
|
||||
src/
|
||||
App.tsx, main.tsx # router, providers, start-up effects
|
||||
engine/ # pure template engine — no React, no DOM
|
||||
template-renderer.ts # renderAll(): title + description + tags
|
||||
title-builder.ts # titles (badge position, separator, case, order)
|
||||
title-variants.ts # alternative title shapes
|
||||
description-builder.ts # the description, block by block
|
||||
tag-generator.ts # tag pools, YouTube's tag length count, trimming
|
||||
timeline-parser.ts # timestamps → chapters, YouTube's chapter rules
|
||||
channel-phrase.ts # drops "on {{channel}}" when there is no channel name
|
||||
rig-block.ts, limits.ts, social-post-builder.ts, pinned-comment-builder.ts, playlist-builder.ts, types.ts
|
||||
config/ # static data: video types, genres, platforms (stores),
|
||||
# social fields/platforms, GPU catalog, rig fields,
|
||||
# library-fields (profile/preset/per-video field lists),
|
||||
# legal, about, field limits, Vietnamese banks, …
|
||||
store/ # Zustand stores; each exports its version + migrate fn
|
||||
editor-store.ts # the draft (EditorData, migrateEditorState, editorDataOf)
|
||||
profile-store.ts, preset-store.ts, template-store.ts, history-store.ts
|
||||
settings-store.ts + settings-heal.ts # settings; healed on every load
|
||||
log-store.ts
|
||||
utils/
|
||||
backup/ # backup format v2, detect, sanitize, restore (+undo),
|
||||
# collect, desktop auto-backups, start-up recovery
|
||||
library-apply.ts # apply profile/preset/template, next part, start over
|
||||
store-paste.ts # store links pasted anywhere
|
||||
native.ts # typed bridge to the Tauri commands
|
||||
file-ops.ts # save/open text files on every platform
|
||||
validation.ts, url-extractors.ts, log-storage.ts, …
|
||||
hooks/, components/, pages/, i18n/, styles/
|
||||
worker/ # Cloudflare Worker: gate, cookies, headers, routing
|
||||
build-plugins/ # legal pages at build time; web-only extras
|
||||
src-tauri/src/ # lib.rs (plugins, tray), storage.rs (name-only file
|
||||
# commands), file_dialog.rs (native Save/Open)
|
||||
migration-page/ # moving notice for the old GitHub Pages address (until 2026-11-29)
|
||||
tests/ # engine, store, utils, worker, build, i18n, config
|
||||
scripts/ # locale validation, version sync, bundle budget,
|
||||
# licences/third-party notices, brand assets
|
||||
docs/ # DEVELOPMENT, HOSTING, ARCHITECTURE, FEATURES, ROADMAP,
|
||||
# TECH-SPEC, I18N, PACKAGING, CONTENT-INVENTORY (+ vi/)
|
||||
```
|
||||
|
||||
## Coding Conventions
|
||||
|
||||
### TypeScript
|
||||
- Strict mode enabled (`strict: true` in tsconfig)
|
||||
- Prefer `interface` over `type` for object shapes
|
||||
- Use `const` assertions for static config arrays
|
||||
- No `any` — use `unknown` + type guards
|
||||
- Barrel exports via `index.ts` per directory
|
||||
|
||||
- Strict mode; no `any` — use `unknown` + type guards.
|
||||
- Prefer `interface` for object shapes; `as const` for static config arrays.
|
||||
|
||||
### React
|
||||
- Functional components only, no class components
|
||||
- Custom hooks for shared logic — prefix with `use`
|
||||
- Memoize expensive computations with `useMemo`
|
||||
- Use `React.lazy()` for page-level code splitting
|
||||
- No prop drilling beyond 2 levels — use Zustand store
|
||||
|
||||
- Function components only; shared logic in `use*` hooks.
|
||||
- Pages are lazy-loaded; keep the Editor (landing page) light — the **initial load budget is 280 KB gzip** (`npm run check:bundle`), no chunk over 500 KB raw.
|
||||
- Read store slices with selectors; avoid prop drilling beyond two levels.
|
||||
|
||||
### Naming
|
||||
- Files: `kebab-case.ts` / `PascalCase.tsx` for components
|
||||
- Variables/functions: `camelCase`
|
||||
- Types/interfaces: `PascalCase`
|
||||
- Constants: `UPPER_SNAKE_CASE`
|
||||
- Store slices: `use[Name]Store`
|
||||
|
||||
- Files: `kebab-case.ts`, components `PascalCase.tsx`; stores `use[Name]Store`; constants `UPPER_SNAKE_CASE`.
|
||||
|
||||
### Styling
|
||||
- Tailwind utility classes — no inline styles, no CSS modules
|
||||
- Custom colors defined in `tailwind.config.ts`
|
||||
- Dark theme by default, optional light theme via class toggle
|
||||
- Responsive: mobile-first, breakpoints at `sm`, `md`, `lg`
|
||||
|
||||
- Tailwind utilities and the design tokens (`bg-surface-1`, `text-text-muted`, `accent`, …) — no hard-coded colours, no inline styles.
|
||||
- Dark by default, light via class; touch targets grow on coarse pointers.
|
||||
- Watch Tailwind 4 specificity: a base `inline-flex` beats a plain `hidden` — wrap responsive visibility in an element.
|
||||
|
||||
### i18n
|
||||
- All user-facing strings go through `t()` function
|
||||
- Template strings (description/title) use dedicated locale file
|
||||
- UI strings and template strings are separate namespace files
|
||||
- Never hardcode user-visible text in components
|
||||
|
||||
### State Management
|
||||
- Zustand stores with `persist` middleware for localStorage
|
||||
- Separate stores by domain (editor, profiles, presets, settings)
|
||||
- Keep stores flat — no deep nesting
|
||||
- Actions defined inside the store, not externally
|
||||
- Every user-visible string goes through `t()`; UI strings in `ui.json`, generated text in `templates.json`.
|
||||
- New keys go into **all 8 locales** and `_schema.json`; `npm run validate:locales` must pass.
|
||||
- No plural suffixes (`_one`/`_other`) — the key sets must match across locales; write count-neutral text.
|
||||
|
||||
### Engine (template logic)
|
||||
- Pure functions only — no React dependencies
|
||||
- 100% unit test coverage for engine/
|
||||
- Each function takes typed input, returns string
|
||||
- No side effects — no clipboard, no storage, no DOM
|
||||
### State
|
||||
|
||||
- Stores are persisted with Zustand `persist`; a shape change bumps the store's exported version and adds a step to its exported migrate function (backups replay the same steps). Steps must be idempotent.
|
||||
- Settings are healed on every load (`healSettings`); consent and UI-state fields are device-local and never exported.
|
||||
|
||||
### Engine
|
||||
|
||||
- Pure functions only: typed input → string. No React, clipboard, storage or DOM; the year and other environment values come from the caller.
|
||||
|
||||
## Key Design Decisions
|
||||
|
||||
1. **Engine is framework-agnostic**: `src/engine/` has zero React imports. This allows reuse if migrating to another framework, CLI tool, or VS Code extension.
|
||||
|
||||
2. **i18n covers both UI and templates**: UI labels (`ui.json`) and generated content (`templates.json`) are separate. Adding a language means adding 2 JSON files + registering in config.
|
||||
|
||||
3. **Profiles vs Presets**: Profile = user identity (channel, social, rig — rarely changes). Preset = game identity (name, store links — reused across parts). These are separate stores.
|
||||
|
||||
4. **Tags are generated, not hand-written**: Tag engine combines genre pool + core pool + platform + quality + multilingual + trending. User can edit the final output but doesn't build tags manually.
|
||||
|
||||
5. **Tauri for desktop**: Chosen over Electron for ~5MB binary vs ~150MB. Familiar Rust toolchain. Web version works independently without Tauri.
|
||||
1. **The engine is framework-agnostic** (`src/engine/` has no React imports).
|
||||
2. **i18n covers the UI and the generated text**, as separate namespaces.
|
||||
3. **Profiles vs presets vs templates**: profile = channel (rarely changes), preset = game (reused across parts), template = the whole form. The field lists live in `src/config/library-fields.ts`.
|
||||
4. **Tags are generated**, then trimmed to YouTube's own length count.
|
||||
5. **Your data stays on your device.** localStorage is the only store; backups are files the user controls (plus automatic backups in the desktop app's data folder).
|
||||
6. **The desktop webview never names a path**: Rust commands take file names under the app data folder or open the native dialog themselves.
|
||||
7. **The web app is gated** by Turnstile, verified server-side in the Worker; the gate fails open if its secret is missing.
|
||||
|
||||
## Development Commands
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Development server
|
||||
npm run dev
|
||||
|
||||
# Build for web
|
||||
npm run build
|
||||
|
||||
# Preview production build
|
||||
npm run preview
|
||||
|
||||
# Run tests
|
||||
npm run test
|
||||
|
||||
# Lint
|
||||
npm run lint
|
||||
|
||||
# Type check
|
||||
npm run typecheck
|
||||
|
||||
# Validate locale files
|
||||
npm run dev # Vite dev server (http://localhost:5173)
|
||||
npm run build # typecheck + production build
|
||||
npm run test:run # all tests (npm test = watch mode)
|
||||
npm run test:coverage # with coverage thresholds
|
||||
npm run typecheck # src
|
||||
npm run typecheck:all # src + tests + scripts + worker + build plugins
|
||||
npm run lint && npm run format:check
|
||||
npm run knip # unused files/exports/dependencies
|
||||
npm run validate:locales
|
||||
|
||||
# Desktop dev (requires Tauri CLI)
|
||||
npm run tauri dev
|
||||
|
||||
# Desktop build
|
||||
npm run tauri build
|
||||
npm run check:bundle # after build: initial load / chunk budget
|
||||
npm run check:licenses # licence allow-list + THIRD_PARTY_NOTICES in sync
|
||||
npm run check:version # the six version fields agree
|
||||
npm run check:tauri # @tauri-apps/* and tauri crates on the same major.minor
|
||||
npm run cf:dev # wrangler dev (copy .dev.vars.example to .dev.vars — test keys only)
|
||||
npm run cf:check # wrangler deploy --dry-run
|
||||
npm run tauri:dev # desktop app against the dev server
|
||||
npm run tauri:build # desktop installers
|
||||
# src-tauri/: cargo fmt --check · cargo clippy --all-targets -- -D warnings · cargo test
|
||||
```
|
||||
|
||||
## Git Workflow
|
||||
|
||||
- `main` — stable releases
|
||||
- `dev` — integration branch
|
||||
- Feature branches: `feat/feature-name`
|
||||
- Commit format: `type(scope): message`
|
||||
- Types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`
|
||||
- Example: `feat(engine): add Spanish template support`
|
||||
- `main` only: feature branches (`feat/…`, `fix/…`, `docs/…`, `chore/…`) → PR → `main`. Every merge to `main` deploys the web app.
|
||||
- Commit and PR-title format: `type(scope): message` (`feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`) — CI checks PR titles.
|
||||
- Commits and release tags are GPG-signed; never bypass signing or hooks.
|
||||
- Required checks: `check`, `dependency-review`, `workflow-lint`, `reuse`, `pr-title`.
|
||||
|
||||
## Releases
|
||||
|
||||
- Bump the version in all six places: `package.json`, `package-lock.json` (×2), `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock` (`npm run check:version`), and add a `CHANGELOG.md` entry.
|
||||
- Push a signed tag `vX.Y.Z` → the release workflows verify, build the desktop and Android artifacts and create a **draft** release. The maintainer publishes it.
|
||||
|
||||
## Important Notes for Claude Code
|
||||
|
||||
- Always run `npm run typecheck` before committing
|
||||
- When adding a new language: follow docs/I18N.md checklist
|
||||
- When adding a new genre: add to `src/config/genres.ts` + tag pool in `src/engine/tag-generator.ts`
|
||||
- When adding a new video type: add to `src/config/video-types.ts` + update all template files in `src/i18n/locales/*/templates.json`
|
||||
- Engine tests must pass before any PR merge
|
||||
- Keep bundle size under 500KB (excluding Tauri)
|
||||
- Run the gates before committing: `typecheck`, `typecheck:all`, `lint`, `format:check`, `test:run`, `knip`, `validate:locales`, `build` + `check:bundle`; `cargo fmt/clippy/test` when `src-tauri/` changes.
|
||||
- New language: follow `docs/I18N.md` (register it, both namespaces, tag pools, `channel-phrase.ts` patterns, browser detection).
|
||||
- New genre: `src/config/genres.ts` + its tag pool in `src/engine/tag-generator.ts` (a test keeps them in sync).
|
||||
- New video type: `src/config/video-types.ts` + every `templates.json` (titles, intros, pinned-comment greetings).
|
||||
- New store platform: `src/config/platforms.ts` (URL pattern, `tagName`), optionally a name extractor in `src/utils/url-extractors.ts`.
|
||||
- Never commit `note.txt`, `warning.txt` or `__pycache__/`; never put real secrets in files (`.dev.vars` holds Cloudflare's public Turnstile test keys only).
|
||||
- The Cloudflare dashboard, publishing releases and repository settings are the maintainer's; ask before touching them.
|
||||
+16
-8
@@ -11,13 +11,16 @@ Participation is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By con
|
||||
1. Read the [Development Guide](./docs/DEVELOPMENT.md) — also available in [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).
|
||||
2. Install dependencies: `npm install`.
|
||||
3. Start the dev server: `npm run dev`.
|
||||
4. Before opening a PR run all gates:
|
||||
4. Before opening a PR, run the same gates CI runs (the required `check` job):
|
||||
```bash
|
||||
npm run typecheck
|
||||
npm run lint
|
||||
npm run typecheck && npm run typecheck:all
|
||||
npm run lint && npm run format:check
|
||||
npm run validate:locales
|
||||
npm run test:run
|
||||
npm run knip
|
||||
npm run build && npm run check:bundle
|
||||
```
|
||||
Touched `src-tauri/`? Also `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test` in `src-tauri/`. Touched `worker/` or `wrangler.jsonc`? `npm run cf:check` dry-runs the Cloudflare deploy.
|
||||
|
||||
## How to Contribute
|
||||
|
||||
@@ -30,8 +33,9 @@ Use the templates in `.github/ISSUE_TEMPLATE/`:
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Branch from `dev`, not `main`.
|
||||
- Commit format: `type(scope): message` — e.g. `feat(engine): add Spanish template support`. Types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`.
|
||||
- Branch from `main` (`feat/…`, `fix/…`, `docs/…`) and open the PR against `main`. Every merge to `main` deploys the web app, so `main` stays releasable.
|
||||
- Commit format and **PR title**: `type(scope): message` — e.g. `feat(engine): add Spanish template support`. Types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`. CI checks the PR title.
|
||||
- Required checks: `check`, `dependency-review`, `workflow-lint`, `reuse`, `pr-title` (plus `lint-and-test` and `cargo-deny` when `src-tauri/` changes). Commits on `main` are signed.
|
||||
- One logical change per PR. Don't bundle unrelated refactors.
|
||||
- All locale files must stay in lock-step — see the i18n section below.
|
||||
- AI-assisted contributions are welcome but **must be disclosed** in the PR description.
|
||||
@@ -44,7 +48,7 @@ If your change adds or removes any user-facing string:
|
||||
2. Add the key to **all 8 locales** (`en` / `vi` / `ja` / `es` / `ko` / `zh` / `pt-BR` / `id`).
|
||||
3. `npm run validate:locales` must pass.
|
||||
|
||||
Native-speaker corrections to AI-translated locales (JA / ES / KO / ZH) are especially welcome — see [DISCLAIMER.md](./DISCLAIMER.md) for the current translation-quality status.
|
||||
Native-speaker corrections to AI-translated locales (JA / ES / KO / ZH / PT-BR / ID) are especially welcome — see [DISCLAIMER.md](./DISCLAIMER.md) for the current translation-quality status.
|
||||
|
||||
## Auto-ignored Contributions
|
||||
|
||||
@@ -53,7 +57,7 @@ The following are closed without review and may result in a contributor ban —
|
||||
- **Suspected malicious code.** If a PR contains code we suspect may be a supply-chain attack, obfuscation, credential harvesting, cryptominer, or any form of malware — even if CodeQL and Dependabot don't flag it, the maintainer may investigate manually. **Detection equals ban.**
|
||||
- **Unverified or suspicious links** in issues, PRs, or comments (pastebin scrapers, redirect chains, unfamiliar shortlinks, link-shortener URLs without context).
|
||||
- **Behavior or language violating** [GitHub's Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies).
|
||||
- **Off-topic / rambling reports** that don't get to the point. Example of what gets ignored: *"Good morning, today is a beautiful day, I was just wondering if maybe…"* — get straight to the problem.
|
||||
- **Off-topic / rambling reports** that don't get to the point. Example of what gets ignored: _"Good morning, today is a beautiful day, I was just wondering if maybe…"_ — get straight to the problem.
|
||||
- **PRs that touch hundreds of files for a one-line fix** (typical sign of an auto-formatter run on unrelated files).
|
||||
- **Tests deleted, or `--no-verify` used to bypass pre-commit hooks.**
|
||||
- **"AI rewrote my entire codebase in a different style" PRs.** AI-assisted edits are welcome (disclosed); whole-repo rewrites are not.
|
||||
@@ -63,7 +67,7 @@ The following are closed without review and may result in a contributor ban —
|
||||
|
||||
- Bug fixes with a reproduction case and a regression test.
|
||||
- Locale corrections from native speakers.
|
||||
- New content-warning IDs with all 6 translations and a clear rationale (especially horror-genre vocabulary).
|
||||
- New content-warning IDs with all 8 translations and a clear rationale (especially horror-genre vocabulary).
|
||||
- New video types or genres that fit the gameplay no-commentary use case.
|
||||
- Accessibility and mobile-responsive improvements.
|
||||
- Performance fixes with a `before/after` measurement.
|
||||
@@ -75,6 +79,10 @@ The following are closed without review and may result in a contributor ban —
|
||||
- Renaming files without coordinating with open PRs.
|
||||
- Changes to the LICENSE or NOTICE files (these are governance, not contributions).
|
||||
|
||||
## Contact
|
||||
|
||||
Questions about contributing or conduct: `code@poli0981.dev`. Security issues go through [SECURITY.md](./SECURITY.md), never a public issue.
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree your contribution will be licensed under the [Apache License 2.0](./LICENSE), the same license as the project, and that you have the right to grant that license.
|
||||
+7
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
YTDescGen is a personal project built by a single maintainer (`@poli0981`) for use with the [`@SkullMute`](https://www.youtube.com/@SkullMute) YouTube channel and shared publicly as open source. It is **not a commercial product** and there is no support obligation.
|
||||
|
||||
Code, documentation, locale translations, and design decisions in this repository were **co-authored with the assistance of Anthropic's Claude Code (model 4.7 Opus, 1M-context variant)**. All commits, releases, and architectural decisions are reviewed and approved by the maintainer before merging.
|
||||
Code, documentation, locale translations, and design decisions in this repository were **co-authored with the assistance of Anthropic's Claude Code (Claude Opus models; v1.0.0 with Claude Opus 5.5)**. All commits, releases, and architectural decisions are reviewed and approved by the maintainer before merging.
|
||||
|
||||
This disclosure applies to:
|
||||
|
||||
@@ -12,6 +12,7 @@ This disclosure applies to:
|
||||
- Documentation in `docs/` and all root markdown files.
|
||||
- Locale files in `src/i18n/locales/`.
|
||||
- CI/CD workflows in `.github/workflows/`.
|
||||
- The Cloudflare Worker in `worker/` and the build plugins in `build-plugins/`.
|
||||
|
||||
See also: [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure".
|
||||
|
||||
@@ -20,7 +21,7 @@ See also: [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) § "AI-Assisted D
|
||||
The application UI ships in eight languages. Authoring quality varies:
|
||||
|
||||
| Locale | Authoring | Notes |
|
||||
| --- | --- | --- |
|
||||
| ---------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
||||
| English (`en`) | Maintainer + AI | Primary working locale. Strings reviewed before commit. |
|
||||
| Vietnamese (`vi`) | Maintainer (native) + AI | Reviewed by the maintainer, who is a native Vietnamese speaker. |
|
||||
| Japanese (`ja`) | AI-translated | Not native-reviewed. Grammar and tone may be imperfect. |
|
||||
@@ -53,3 +54,7 @@ Use of Claude Code during development does **not** make this an Anthropic produc
|
||||
## Not legal or financial advice
|
||||
|
||||
Any mention of GDPR, CCPA, copyright law, YouTube's monetization policies, or similar topics in this repository's documentation is provided for orientation only and is **not legal advice**. Consult a qualified lawyer in your jurisdiction if you need an authoritative answer.
|
||||
|
||||
## Contact
|
||||
|
||||
Copyright or DMCA notices: **dmca@poli0981.dev** (see [TERMS.md](./TERMS.md)). Licensing and attribution: **copyright@poli0981.dev**. Anything else: **contact@poli0981.dev** · [poli0981.dev/links](https://poli0981.dev/links/).
|
||||
@@ -8,8 +8,10 @@ see LICENSE for the full terms, or visit:
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
This product was co-developed with the assistance of Anthropic's
|
||||
Claude Code 4.7 Opus (1M context). See DISCLAIMER.md and
|
||||
THIRD_PARTY_NOTICES.md for details.
|
||||
Claude Code (Claude Opus models; most recently Claude Opus 5.5).
|
||||
See DISCLAIMER.md and THIRD_PARTY_NOTICES.md for details.
|
||||
|
||||
Licensing and attribution questions: copyright@poli0981.dev
|
||||
|
||||
Third-party dependencies retain their respective licenses; see
|
||||
THIRD_PARTY_NOTICES.md for the complete attribution list.
|
||||
+8
-4
@@ -18,7 +18,7 @@ This policy covers YTDescGen — the web app at **https://ytgenerator.stream** a
|
||||
Your work is saved in your browser's **`localStorage`** for `ytgenerator.stream`:
|
||||
|
||||
| Key | Contents |
|
||||
| --- | --- |
|
||||
| ------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `ytdescgen-settings` | Theme, languages, editor preferences, the version of these terms you accepted and when |
|
||||
| `ytdescgen-profiles` | Saved channel profiles (channel name, social links, contact emails, PC rig) |
|
||||
| `ytdescgen-presets` | Saved game presets (game name, genres, store links) |
|
||||
@@ -38,7 +38,11 @@ The apps keep the same data in the app's own WebView storage and application-dat
|
||||
- **Linux:** `~/.local/share/com.skullmute.ytdescgen`
|
||||
- **Android:** the app's private storage (removed when you uninstall the app or clear its data)
|
||||
|
||||
Uninstalling the app or deleting those folders removes everything. The apps make no network requests of their own; links you choose to open (store pages, donation pages, this policy on the web) open in your browser.
|
||||
The desktop app keeps its automatic backups (the newest ten, plus one made before each restore) in the `backups` folder inside the application-data folder, and its event log in `logs`. Uninstalling the app or deleting those folders removes everything. The apps make no network requests of their own; links you choose to open (store pages, donation pages, this policy on the web) open in your browser.
|
||||
|
||||
### The old address
|
||||
|
||||
Until 29 November 2026, `poli0981.github.io/youtube-generator` — where the web app used to live — shows a moving notice hosted by **GitHub Pages**. Browser storage belongs to a site, so data saved there can't move on its own: the notice reads what your browser saved on that address and lets you download it as a file. Nothing is uploaded; GitHub, as the host, receives the usual request data (see the [GitHub Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement)).
|
||||
|
||||
## 2. What the web app's hosting provider processes
|
||||
|
||||
@@ -55,7 +59,7 @@ Cloudflare operates a global network, so this data may be processed outside your
|
||||
The web app sets exactly two cookies, both first-party and both needed for the bot check:
|
||||
|
||||
| Cookie | Purpose | Lifetime |
|
||||
| --- | --- | --- |
|
||||
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
|
||||
| `__Host-ytg_gate` | Remembers that this browser passed the Turnstile check. Contains only an expiry time, a shortened one-way hash of your browser's user-agent string and a signature — no identifier. `HttpOnly`, `Secure`. | 24 hours |
|
||||
| `ytg_terms` | Records which version of these Terms and this Privacy Policy you agreed to on the check page, so the app does not ask twice. | 1 year |
|
||||
|
||||
@@ -75,7 +79,7 @@ There are no advertising, tracking or third-party analytics cookies. Cloudflare'
|
||||
|
||||
## 6. Your rights
|
||||
|
||||
- **Access and portability:** your content is already on your device; use the export buttons in **Settings** and **Profiles** to save it as a file.
|
||||
- **Access and portability:** your content is already on your device; **Settings › Backup & restore** saves all of it (or the parts you choose) as one file, and the library and History pages export their own lists.
|
||||
- **Erasure:** clear site data (web) or uninstall the app / delete its folders (desktop, Android).
|
||||
- **Data processed by Cloudflare:** write to **privacy@poli0981.dev**. Because YTDescGen has no accounts, it holds no data that can be looked up by your name or email; requests about Cloudflare's own processing can also go to Cloudflare directly.
|
||||
- You may also complain to your local data-protection authority.
|
||||
|
||||
@@ -1,48 +1,54 @@
|
||||
# 🎮 YTDescGen
|
||||
|
||||
**YouTube Gameplay Description Generator** — an offline-first template engine for Gameplay No Commentary YouTube channels.
|
||||
**YouTube Gameplay Description Generator** — a template engine for Gameplay No Commentary YouTube channels.
|
||||
|
||||
Generate YouTube titles, descriptions, and tags in eight languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages), as a small native desktop app (Windows / macOS / Linux — the installers are 2-5 MB), or as an installable Android APK — all from one Tauri 2 codebase.
|
||||
**Use it at [ytgenerator.stream](https://ytgenerator.stream)**, or install the desktop app (Windows / macOS / Linux, 2–5 MB installers) or the Android app from [Releases](https://github.com/poli0981/youtube-generator/releases). One codebase: React + Tauri 2.
|
||||
|
||||
Generate YouTube titles, descriptions and tags in eight languages. Save your channel as a profile and each game as a preset, and every new video is a few clicks.
|
||||
|
||||
[](./LICENSE)
|
||||
[](./docs/DEVELOPMENT.md)
|
||||
[](https://github.com/poli0981/youtube-generator/releases)
|
||||
[](https://github.com/poli0981/youtube-generator/commits)
|
||||
|
||||
> **Moved from GitHub Pages?** Data saved at the old `poli0981.github.io/youtube-generator` address stays in that browser. Open the old address once — it offers your data as a backup file — then restore it in **Settings › Backup & restore**. Details: [Moving from GitHub Pages](https://github.com/poli0981/youtube-generator/wiki/Moving-from-GitHub-Pages).
|
||||
|
||||
---
|
||||
|
||||
## What is YTDescGen
|
||||
|
||||
YTDescGen is a single-purpose template engine. It does **one** job: turn a small set of structured fields (video type, game name, genres, rig, social links, content warnings, …) into a publish-ready YouTube title + description + tag set.
|
||||
YTDescGen does **one** job: turn a small set of structured fields (video type, game, genres, rig, social links, content warnings, …) into a publish-ready YouTube title, description and tag set.
|
||||
|
||||
It doesn't talk to the YouTube API. It doesn't upload anything. It doesn't track you. There is no server. State lives in your browser's `localStorage` (web) or your OS application-data directory (desktop) — and nowhere else.
|
||||
It doesn't talk to the YouTube API and has no account. Your work — profiles, presets, templates, history, drafts — stays on your device. See [Privacy](#privacy).
|
||||
|
||||
Built for the gameplay no-commentary niche — especially horror / scary games — by someone running the [@SkullMute](https://www.youtube.com/@SkullMute) channel who got tired of pasting the same boilerplate into every video. Released under Apache 2.0 in case it's useful to anyone else.
|
||||
|
||||
## Features
|
||||
|
||||
- **20 video types** — Full Gameplay, Part, Boss Fight, Boss No-Hit, Ending, Speedrun, 100%, DLC, NG+, Challenge, Side Quest, Secret, Comparison, Guide, Mods, Collectibles, Livestream, Gacha Quest, Demo, Demo Part.
|
||||
- **8 UI languages** — English, Vietnamese, Japanese, Spanish, Korean, Chinese, Portuguese (Brazil), Indonesian. *(VI authored by a native speaker; JA / ES / KO / ZH / PT-BR / ID AI-translated — see [DISCLAIMER.md](./DISCLAIMER.md).)*
|
||||
- **40+ game genres** — across action, RPG, FPS, horror, soulslike, indie, simulation, fighting, and more.
|
||||
- **248 content-warning IDs** across 12 groups — spoilers, photosensitive/VFX, audio, dialogue/language, phobias (incl. color phobias), mental health, social phenomena, internet/digital life, sensitive themes (incl. method-specific death/violence and suggestive imagery), horror-specific, playstyle, and gameplay disclosure (mods / cheats / glitches / guide-assisted / educational purpose). Sets viewer expectations before they hit play.
|
||||
- **Profile system** — save channel / social / rig info once, reuse across every video.
|
||||
- **Game presets** — save game name + store links once, reuse across the entire part series.
|
||||
- **Snapshot templates** — save full-form configurations and recall in one click.
|
||||
- **Smart tag generation** — combines genre pool, platform, quality tier, multilingual hooks, and trending terms; auto-dedup and 500-char-limit aware.
|
||||
- **Character counters** — real-time limits for title (100), description (5000), tags (500). If **any one** is over, no field can be copied — partial copying is how a half-finished description gets published.
|
||||
- **Guardrails** — hard length caps on every input field, a three-address cap per email field, and an opt-in **Strict Mode** that blocks Generate / Copy / Export while any field holds an error.
|
||||
- **Batch mode** — generate metadata for all parts of a series in one pass.
|
||||
- **Cross-post captions** — a dedicated **Social** tab re-packages the same YouTube source into short-form captions for **TikTok** (4,000-char), **Instagram Reels**, and **Facebook Reels** — title, rig, content warnings, copyright, thanks, and hashtags (game + genre + curated per-platform popular tags). Single + bulk modes, per-platform character limits with smart overflow trimming, and JSON import/export.
|
||||
- **Desktop app** — Windows, macOS & Linux native binaries via Tauri. The Windows, macOS and deb/rpm installers are 2-5 MB; the self-contained Linux AppImage is larger.
|
||||
- **Android app** — installable, sideloadable `.apk` built from the same Tauri 2 codebase. **Requires Android 11+** (tested 11–16; real-device test on Android 12). Grab it from [Releases](https://github.com/poli0981/youtube-generator/releases) and enable "Install unknown apps" to sideload.
|
||||
- **Mobile-responsive web** — drawer navigation, touch-sized controls, iOS-safe text-input behavior. Tested down to 360 × 640.
|
||||
- **100% offline** — no server, no telemetry, no account. See [PRIVACY.md](./PRIVACY.md).
|
||||
- **8 languages** — English, Vietnamese, Japanese, Spanish, Korean, Chinese, Portuguese (Brazil), Indonesian — for the interface and the generated text. _(Vietnamese is native-reviewed; the others are AI-translated — see [DISCLAIMER.md](./DISCLAIMER.md).)_
|
||||
- **40+ genres** and **248 content warnings** in 12 groups, so viewers know what to expect before they press play.
|
||||
- **Quick start** — pick your channel profile and the game's preset at the top of the editor; **Next part**, **New video, same game** and **Start over** clear exactly what belonged to the last video.
|
||||
- **Paste a store link anywhere** — it lands in the right store field and names the game (Steam, Epic, GOG, PlayStation, Xbox, Nintendo, itch.io, Humble, EA app, Ubisoft, Battle.net, Google Play, App Store, Meta Quest, Amazon Luna).
|
||||
- **Live preview** beside the form and a **YouTube preview** (where search results cut the title, what shows above "…more").
|
||||
- **Tags counted the way YouTube counts them**, **chapter check** for timestamps, and per-field character limits (title 100, description 5000, tags 500) — only the field that is over can't be copied.
|
||||
- **Correct hardware names** — "NVIDIA GeForce RTX 5080", "AMD Radeon RX 9070 XT", "Apple M4 Pro" — from a searchable GPU picker.
|
||||
- **Backup & restore** — one file with everything, a preview of what's new or different before anything changes, merge or replace, and Undo. The desktop app also keeps automatic backups.
|
||||
- **Batch mode** — every part of a series in one pass, in several languages.
|
||||
- **Cross-post captions** — TikTok, YouTube Shorts, Instagram Reels, Facebook Reels, X, Threads and Bluesky, each within its own limit.
|
||||
- **Command palette** (Ctrl/⌘ + K) and keyboard shortcuts.
|
||||
- **Guardrails** — length caps on every field and an opt-in **Strict Mode** that blocks copy and export while a field has an error.
|
||||
- **Desktop app** — Windows, macOS & Linux via Tauri; **Android app** — Android 11+, sideloaded from [Releases](https://github.com/poli0981/youtube-generator/releases).
|
||||
|
||||
## Quick Start
|
||||
|
||||
Use the web app: **<https://ytgenerator.stream>** — a quick bot check runs on your first visit each day.
|
||||
|
||||
Build it yourself:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/poli0981/youtube-generator.git
|
||||
cd yt-desc-gen
|
||||
cd youtube-generator
|
||||
npm install
|
||||
npm run dev # web dev server at http://localhost:5173
|
||||
```
|
||||
@@ -51,7 +57,7 @@ Desktop build (Windows / macOS / Linux):
|
||||
|
||||
```bash
|
||||
npm run tauri:build
|
||||
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
|
||||
# Output: src-tauri/target/release/bundle/{msi,nsis,deb,rpm,appimage,dmg,app}
|
||||
```
|
||||
|
||||
Android build (`.apk`) — requires the Android SDK + NDK + a JDK:
|
||||
@@ -62,46 +68,49 @@ cargo tauri android build --apk
|
||||
# Output: src-tauri/gen/android/app/build/outputs/apk/universal/release/
|
||||
```
|
||||
|
||||
See [`docs/PACKAGING.md`](./docs/PACKAGING.md#android-apk-packaging) for the SDK/NDK setup and signing steps.
|
||||
|
||||
Full development setup, IDE config, and troubleshooting: see [`docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md). Vietnamese version: [`docs/i18n/vi/DEVELOPMENT.md`](./docs/i18n/vi/DEVELOPMENT.md).
|
||||
See [`docs/PACKAGING.md`](./docs/PACKAGING.md#android-apk-packaging) for the SDK/NDK setup and signing, [`docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md) for the full toolchain (Vietnamese: [`docs/i18n/vi/DEVELOPMENT.md`](./docs/i18n/vi/DEVELOPMENT.md)), and [`docs/HOSTING.md`](./docs/HOSTING.md) for how the web app is hosted.
|
||||
|
||||
## Use Cases
|
||||
|
||||
- **Gameplay no-commentary channels** — the primary target. Default templates assume no voice-over and lean on visual hooks, music attribution, and timestamps.
|
||||
- **Horror / scary-game channels** — the content-warning system is especially deep here (analog horror, liminal spaces, pursuit / chase, entity / SCP-style, body horror, etc.).
|
||||
- **Gameplay no-commentary channels** — the primary target. Default templates assume no voice-over and lean on visual hooks, music attribution and timestamps.
|
||||
- **Horror / scary-game channels** — the content-warning system is especially deep here (analog horror, liminal spaces, pursuit / chase, entity / SCP-style, body horror, …).
|
||||
- **Demo / Early Access playthroughs** — dedicated video types and language-patch / game-version disclosure fields.
|
||||
- **Speedrunners and 100% completionists** — playstyle disclosures, run-type metadata, and difficulty fields.
|
||||
- **Solo creators tired of copy-paste** — profiles and presets exist specifically to eliminate repetitive data entry.
|
||||
- **Speedrunners and 100% completionists** — playstyle disclosures, run-type metadata and difficulty fields.
|
||||
- **Solo creators tired of copy-paste** — profiles, presets and templates exist to eliminate repetitive data entry.
|
||||
|
||||
## Privacy & Offline-First
|
||||
## Privacy
|
||||
|
||||
Nothing leaves your device. No analytics, no telemetry, no tracking. The web version stores your work in `localStorage`; the desktop version stores it in the OS application-data directory. Clearing site data (web) or uninstalling the app (desktop) wipes everything. Full details in [PRIVACY.md](./PRIVACY.md).
|
||||
- **Your work stays on your device**: the browser's storage for `ytgenerator.stream`, or the app's own folders on desktop and Android. No account, no YouTube access, nothing sold or shared.
|
||||
- **The web app** is delivered by **Cloudflare**, which runs a **Turnstile** bot check once a day and provides **cookieless** visit statistics (Web Analytics). Two first-party cookies remember the check and the terms you accepted.
|
||||
- **The desktop and Android apps** have no analytics, no bot check and no telemetry.
|
||||
|
||||
Full details: [PRIVACY.md](./PRIVACY.md), also at [ytgenerator.stream/legal/privacy](https://ytgenerator.stream/legal/privacy).
|
||||
|
||||
## Tech Stack
|
||||
|
||||
React 19 · TypeScript (strict) · Vite 8 · Tailwind CSS 4 · Zustand 5 · i18next 26 · Tauri 2 (Rust stable).
|
||||
React 19 · TypeScript (strict) · Vite 8 · Tailwind CSS 4 · Radix · Motion · Zustand 5 · i18next · Tauri 2 (Rust) · Cloudflare Workers.
|
||||
|
||||
Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
|
||||
|
||||
## Documentation
|
||||
|
||||
| Document | What's in it |
|
||||
| --- | --- |
|
||||
| **[Wiki](https://github.com/poli0981/youtube-generator/wiki)** | **User documentation** — quick start, glossary, every field and its limit, guardrails, troubleshooting, FAQ. Start here if you're using the app rather than building it. |
|
||||
| [Development Guide](./docs/DEVELOPMENT.md) | Toolchain, IDE setup, build commands, troubleshooting. *(Also: [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).)* |
|
||||
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **[Wiki](https://github.com/poli0981/youtube-generator/wiki)** | **User documentation** — quick start, backup & restore, every field and its limit, shortcuts, troubleshooting, FAQ. Start here if you're using the app rather than building it. |
|
||||
| [Development Guide](./docs/DEVELOPMENT.md) | Toolchain, IDE setup, build commands, troubleshooting. _(Also: [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).)_ |
|
||||
| [Hosting](./docs/HOSTING.md) | How ytgenerator.stream is built, deployed and protected. |
|
||||
| [Architecture](./docs/ARCHITECTURE.md) | Layer model, data flow, engine design. |
|
||||
| [Features](./docs/FEATURES.md) | Full feature matrix. |
|
||||
| [Content Inventory](./docs/CONTENT-INVENTORY.md) | Every video type, genre, and content warning the editor surfaces. *(Also: [Vietnamese](./docs/i18n/vi/CONTENT-INVENTORY.md).)* |
|
||||
| [Roadmap](./docs/ROADMAP.md) | Development phases. |
|
||||
| [Content Inventory](./docs/CONTENT-INVENTORY.md) | Every video type, genre and content warning the editor surfaces. _(Also: [Vietnamese](./docs/i18n/vi/CONTENT-INVENTORY.md).)_ |
|
||||
| [Roadmap](./docs/ROADMAP.md) | What shipped and what's next. |
|
||||
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details and configs. |
|
||||
| [i18n Guide](./docs/I18N.md) | Adding new locales. |
|
||||
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
|
||||
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, auto-ignore rules. |
|
||||
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, required checks. |
|
||||
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
|
||||
| [Privacy](./PRIVACY.md) | Data handling (TL;DR: none). |
|
||||
| [Disclaimer](./DISCLAIMER.md) | AI-assistance and translation-quality disclosure. *(Also: [Vietnamese](./docs/i18n/vi/DISCLAIMER.md).)* |
|
||||
| [Terms of Use](./TERMS.md) | Acceptable use and license compliance. |
|
||||
| [Privacy](./PRIVACY.md) | What is stored where, and what Cloudflare processes. |
|
||||
| [Terms of Use](./TERMS.md) | Acceptable use, license compliance, DMCA. |
|
||||
| [Disclaimer](./DISCLAIMER.md) | AI-assistance and translation-quality disclosure. _(Also: [Vietnamese](./docs/i18n/vi/DISCLAIMER.md).)_ |
|
||||
| [Code of Conduct](./CODE_OF_CONDUCT.md) | Contributor Covenant v2.1. |
|
||||
| [Maintainers](./MAINTAINERS.md) | Who runs this. |
|
||||
| [Third-Party Notices](./THIRD_PARTY_NOTICES.md) | Dependency attribution. |
|
||||
@@ -109,7 +118,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Native-speaker corrections to AI-translated locales (JA / ES / KO / ZH) are especially appreciated.
|
||||
PRs welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Native-speaker corrections to the AI-translated locales (JA / ES / KO / ZH / PT-BR / ID) are especially appreciated.
|
||||
|
||||
## License
|
||||
|
||||
@@ -117,19 +126,30 @@ Licensed under the **[Apache License 2.0](./LICENSE)**. See [`NOTICE`](./NOTICE)
|
||||
|
||||
## AI Disclosure
|
||||
|
||||
This project was co-authored with **Anthropic's Claude Code** (Opus-class models; most recently Opus 5). Source code, locale translations, documentation, and CI workflows were generated or edited with AI assistance, then reviewed by the human maintainer (`@poli0981`) before being committed. See [DISCLAIMER.md](./DISCLAIMER.md) for the full disclosure.
|
||||
This project was co-authored with **Anthropic's Claude Code** (Claude Opus models; most recently Claude Opus 5.5). Source code, locale translations, documentation and CI workflows were generated or edited with AI assistance, then reviewed by the human maintainer (`@poli0981`) before being merged. See [DISCLAIMER.md](./DISCLAIMER.md) for the full disclosure.
|
||||
|
||||
## Contact
|
||||
|
||||
| For | Where |
|
||||
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Anything general | `contact@poli0981.dev` |
|
||||
| Security vulnerabilities | [GitHub advisory](https://github.com/poli0981/youtube-generator/security/advisories/new) or `security@poli0981.dev` — see [SECURITY.md](./SECURITY.md) |
|
||||
| Privacy and data requests | `privacy@poli0981.dev` |
|
||||
| Terms, legal | `legal@poli0981.dev` |
|
||||
| Copyright / DMCA notices | `dmca@poli0981.dev` |
|
||||
| Licensing and attribution | `copyright@poli0981.dev` |
|
||||
| Code, contributions, conduct | `code@poli0981.dev` |
|
||||
| Sponsorship | `sponsor@poli0981.dev` |
|
||||
|
||||
Maintainer: [poli0981.dev](https://poli0981.dev/) · every channel at [poli0981.dev/links](https://poli0981.dev/links/).
|
||||
|
||||
## Channel & Socials
|
||||
|
||||
Reference channel and maintainer links:
|
||||
|
||||
- **YouTube**: [@SkullMute](https://www.youtube.com/@SkullMute)
|
||||
- **X / Twitter**: [@SkullMute0011](https://x.com/SkullMute0011)
|
||||
- **X**: [@SkullMute0011](https://x.com/SkullMute0011)
|
||||
- **Bluesky**: [skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social)
|
||||
- **Mastodon**: [@skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122)
|
||||
- **Discord** (project / repo): [join](https://discord.gg/2aNR3aVt)
|
||||
- **Discord** (gaming): [join](https://discord.gg/kDM9GMu5vm)
|
||||
- **Discord**: [join](https://discord.gg/kDM9GMu5vm)
|
||||
- **Steam**: [profile](https://steamcommunity.com/profiles/76561199544666292/)
|
||||
- **Patreon / Ko-fi**: `skullmute`
|
||||
- **Telegram**: `@SkullMute0011` (bot: `@my_skull_bot`)
|
||||
- **Email** (security & private contact): `lopop05905@proton.me`
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
# Hosting — ytgenerator.stream
|
||||
|
||||
How the web app is built, deployed and protected. The desktop and Android apps don't use any of this.
|
||||
|
||||
## Overview
|
||||
|
||||
| Piece | Where |
|
||||
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Domain | `ytgenerator.stream`, on Cloudflare (DNS, TLS, HSTS preload at the zone edge) |
|
||||
| Hosting | Cloudflare Worker **`youtube-generator`** with static assets from `dist/` |
|
||||
| Build & deploy | **Workers Builds**, connected to this repository in the Cloudflare dashboard. Every push to `main` builds and deploys to production; other branches get preview versions. There is **no GitHub Actions deploy workflow** |
|
||||
| Configuration | [`wrangler.jsonc`](../wrangler.jsonc) — the only Cloudflare file in the repo |
|
||||
| Worker code | [`worker/`](../worker) — the Turnstile gate, the legal pages route, security headers |
|
||||
| Build-time web extras | [`build-plugins/web-only.ts`](../build-plugins/web-only.ts) (Web Analytics beacon, `security.txt`) and [`build-plugins/legal-docs.ts`](../build-plugins/legal-docs.ts) (legal pages) |
|
||||
|
||||
GitHub Pages (`poli0981.github.io/youtube-generator`) is retired. Until 2026-11-29 it serves only a moving notice from [`migration-page/`](../migration-page), published by hand with the `pages-migration.yml` workflow; issue #177 tracks removing it.
|
||||
|
||||
## Request flow
|
||||
|
||||
`wrangler.jsonc` sends every request **through the Worker first**, except content-hashed build output (`/assets/*`) and the public files that browsers, crawlers and the manifest fetch without cookies (icons, `favicon`, `robots.txt`, `sitemap.xml`, `manifest.webmanifest`, `/.well-known/*`, `/licenses/*`, `theme-init.js`, `404.html`). Those are served straight from the assets with the headers in [`public/_headers`](../public/_headers).
|
||||
|
||||
The Worker ([`worker/router.ts`](../worker/router.ts)):
|
||||
|
||||
| Path | Response |
|
||||
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `POST /__gate/verify` | Verifies a Turnstile token server-side with `TURNSTILE_SECRET` (success, hostname, `action === "enter"`, age ≤ 300 s), then sets the gate cookie and the terms cookie |
|
||||
| `GET /__gate/status` | `204` when the gate cookie is valid — lets the gate page detect a browser that refuses cookies instead of looping |
|
||||
| `/legal`, `/legal/<doc>` | The prerendered legal pages — always public, so the Terms and Privacy Policy can be read before agreeing (`?lang=vi` for the Vietnamese pages that exist) |
|
||||
| anything else | Gate cookie valid → the file, or the app shell for routes (fetched as `/`, so deep links survive); otherwise → the gate page for documents and `403` for other requests |
|
||||
|
||||
`not_found_handling` is `404-page`, **not** the SPA fallback: with the SPA fallback, any path excluded from the Worker would be answered with `index.html` without passing the gate.
|
||||
|
||||
### Cookies
|
||||
|
||||
| Cookie | Set by | Purpose |
|
||||
| ----------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `__Host-ytg_gate` | `/__gate/verify` | `v1.<expiry>.<UA hash>.<HMAC>` — HttpOnly, Secure, SameSite=Lax, 24 h (`GATE_TTL_SECONDS`). The HMAC key is derived from `TURNSTILE_SECRET`, so there is no second secret |
|
||||
| `ytg_terms` | `/__gate/verify` | The terms version the visitor agreed to on the gate page; the app reads it so a web visitor sees one blocking screen, not two |
|
||||
|
||||
If `TURNSTILE_SECRET` is missing the gate **fails open** (the site stays up and the Worker logs an error) rather than locking everyone out.
|
||||
|
||||
### Headers
|
||||
|
||||
`_headers` does not apply to responses the Worker creates, so [`worker/headers.ts`](../worker/headers.ts) sets them itself: a CSP per page type (the app shell allows the Web Analytics beacon; the gate page uses a nonce + `strict-dynamic`; legal pages allow no script at all), `nosniff`, `Referrer-Policy`, `Permissions-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Resource-Policy` and `X-Frame-Options`. A test keeps the Worker baseline and `_headers` identical. **HSTS is not repeated** — the zone edge already sends `max-age=31536000; includeSubDomains; preload`.
|
||||
|
||||
### Web-only build extras
|
||||
|
||||
- **Cloudflare Web Analytics**: the beacon snippet is injected into `index.html` only for the web build — never in `npm run dev` or the Tauri builds.
|
||||
- **`/.well-known/security.txt`** (RFC 9116) is regenerated on every build, so `Expires` is always about six months ahead.
|
||||
- **Legal pages** are rendered from the repository's Markdown at build time, to static `/legal/*.html` and to a lazy chunk for the in-app Legal Center.
|
||||
|
||||
## Configuration and secrets
|
||||
|
||||
| Name | Kind | Where |
|
||||
| -------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `TURNSTILE_SITE_KEY` | public var | `wrangler.jsonc` |
|
||||
| `GATE_TTL_SECONDS` | public var | `wrangler.jsonc` |
|
||||
| `TURNSTILE_SECRET` | **Secret** | Cloudflare dashboard (Worker › Settings › Variables and Secrets) or `npx wrangler secret put TURNSTILE_SECRET`. Never committed |
|
||||
|
||||
It must be a **Secret**, not a plain-text variable: `wrangler deploy` removes plain-text variables that `wrangler.jsonc` doesn't declare, and keeps secrets.
|
||||
|
||||
The custom domain is declared in `routes` because `wrangler deploy` detaches any custom domain that isn't listed.
|
||||
|
||||
## Dashboard settings (one-time)
|
||||
|
||||
These live in Cloudflare, not in the repository:
|
||||
|
||||
1. **Workers Builds** — build command empty (`wrangler.jsonc` runs `npm run build`), deploy command `npx wrangler deploy`, non-production deploy command `npx wrangler versions upload`. Root directory `/`; Node comes from `.node-version`.
|
||||
2. **Turnstile widget** — hostname `ytgenerator.stream` (add the `workers.dev` subdomain if preview URLs should pass the gate).
|
||||
3. **Web Analytics** — the manual beacon is used; turn off _automatic setup_ for the hostname so visits aren't counted twice.
|
||||
4. **Redirect rule** — `www.ytgenerator.stream/*` → `concat("https://ytgenerator.stream", http.request.uri.path)`, 301, preserving the query string.
|
||||
5. **HSTS** — enabled at the zone with `includeSubDomains` and `preload`.
|
||||
|
||||
## Local development
|
||||
|
||||
```bash
|
||||
cp .dev.vars.example .dev.vars # Cloudflare's public Turnstile TEST keys only
|
||||
npm run build
|
||||
npm run cf:dev # wrangler dev: the Worker + dist/ on http://localhost:8787
|
||||
npm run cf:check # wrangler deploy --dry-run: validates config and bundles the Worker
|
||||
```
|
||||
|
||||
The test keys always pass. Never put the real secret in a file. Worker tests run with the rest (`npm run test:run`, `tests/worker/`).
|
||||
|
||||
## Releases, previews and rollback
|
||||
|
||||
- A merge to `main` is a production deploy. CI's required `check` job already ran `npm run build` and `npm run cf:check` on the pull request.
|
||||
- Branch builds upload a **preview version** (`preview_urls: true`); preview URLs pass the gate only if their hostname is allowed in the Turnstile widget.
|
||||
- **Rollback**: Cloudflare dashboard › the Worker › Deployments › pick an earlier version, or `npx wrangler rollback`. Rolling back the Worker also rolls back its assets.
|
||||
- Each deploy posts a **Workers Builds** check run on the merge commit in GitHub; open its details link for the build log.
|
||||
|
||||
## Checking production
|
||||
|
||||
```bash
|
||||
curl -sI https://ytgenerator.stream/ # gate page (no cookie) with the gate CSP
|
||||
curl -sI https://ytgenerator.stream/assets/<hash>.js # immutable caching
|
||||
curl -s https://ytgenerator.stream/.well-known/security.txt
|
||||
curl -sI https://ytgenerator.stream/legal/privacy # public, script-free CSP
|
||||
curl -sI https://www.ytgenerator.stream/x?y=1 # 301 to https://ytgenerator.stream/x?y=1
|
||||
```
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
YTDescGen là dự án cá nhân do một người duy trì (`@poli0981`) để dùng cho kênh YouTube [`@SkullMute`](https://www.youtube.com/@SkullMute), và chia sẻ công khai dưới dạng mã nguồn mở. Đây **không phải sản phẩm thương mại** và không có nghĩa vụ hỗ trợ.
|
||||
|
||||
Mã nguồn, tài liệu, bản dịch locale, và các quyết định thiết kế trong repo này được **đồng tác giả với sự hỗ trợ của Anthropic's Claude Code (model 4.7 Opus, cửa sổ context 1M)**. Tất cả commit, release, và quyết định kiến trúc được người duy trì xem xét và phê duyệt trước khi merge.
|
||||
Mã nguồn, tài liệu, bản dịch locale, và các quyết định thiết kế trong repo này được **đồng tác giả với sự hỗ trợ của Anthropic's Claude Code (các model Claude Opus; bản v1.0.0 dùng Claude Opus 5.5)**. Tất cả commit, release, và quyết định kiến trúc được người duy trì xem xét và phê duyệt trước khi merge.
|
||||
|
||||
Tuyên bố này áp dụng cho:
|
||||
|
||||
@@ -14,6 +14,7 @@ Tuyên bố này áp dụng cho:
|
||||
- Tài liệu trong `docs/` và các file markdown ở root.
|
||||
- File locale trong `src/i18n/locales/`.
|
||||
- Workflow CI/CD trong `.github/workflows/`.
|
||||
- Cloudflare Worker trong `worker/` và các build plugin trong `build-plugins/`.
|
||||
|
||||
Xem thêm: [`THIRD_PARTY_NOTICES.md`](../../../THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure".
|
||||
|
||||
@@ -22,7 +23,7 @@ Xem thêm: [`THIRD_PARTY_NOTICES.md`](../../../THIRD_PARTY_NOTICES.md) § "AI-As
|
||||
UI ứng dụng hỗ trợ sáu ngôn ngữ. Chất lượng tác giả khác nhau:
|
||||
|
||||
| Locale | Tác giả | Ghi chú |
|
||||
| --- | --- | --- |
|
||||
| ------------------------ | ---------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Tiếng Anh (`en`) | Người duy trì + AI | Locale làm việc chính. Chuỗi được review trước khi commit. |
|
||||
| Tiếng Việt (`vi`) | Người duy trì (bản ngữ) + AI | Review bởi người duy trì là người bản ngữ tiếng Việt. |
|
||||
| Tiếng Nhật (`ja`) | AI dịch | Không có review bản ngữ. Ngữ pháp và văn phong có thể chưa chuẩn. |
|
||||
@@ -53,3 +54,7 @@ Việc dùng Claude Code trong quá trình phát triển **không** biến đây
|
||||
## Không phải tư vấn pháp lý hay tài chính
|
||||
|
||||
Bất kỳ đề cập nào đến GDPR, CCPA, luật bản quyền, chính sách monetization của YouTube, hay các chủ đề tương tự trong tài liệu repo này chỉ để định hướng — **không phải tư vấn pháp lý**. Tham vấn luật sư có chuyên môn ở khu vực của bạn nếu cần câu trả lời chính thống.
|
||||
|
||||
## Liên hệ
|
||||
|
||||
Thông báo bản quyền / DMCA: **dmca@poli0981.dev** (xem [TERMS.md](../../../TERMS.md)). Giấy phép và ghi công: **copyright@poli0981.dev**. Việc khác: **contact@poli0981.dev** · [poli0981.dev/links](https://poli0981.dev/links/).
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.38.0",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.38.0",
|
||||
"version": "1.0.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.3.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.38.0",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
|
||||
Generated
+1
-1
@@ -5024,7 +5024,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.38.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"tauri",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.38.0"
|
||||
version = "1.0.0"
|
||||
description = "YouTube Gameplay Description Generator"
|
||||
authors = ["poli0981"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
|
||||
"productName": "YTDescGen",
|
||||
"version": "0.38.0",
|
||||
"version": "1.0.0",
|
||||
"identifier": "com.skullmute.ytdescgen",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
|
||||
Reference in new issue
Block a user