From 754413ddb2fba18653d6da2972bd04d28beb7eac Mon Sep 17 00:00:00 2001 From: NarratorAI Studio Date: Mon, 6 Jul 2026 09:42:27 +0800 Subject: [PATCH 1/2] docs(readme): expand public project introduction --- README.md | 12 +++++++++++- README_CN.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc9c209..278c8d6 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,18 @@ [中文](./README_CN.md) -`narrator-ai-web` is a self-hostable Next.js frontend for template-driven commentary-video task creation. It provides the user interface and a thin BFF (Backend-for-Frontend) layer for uploading material, selecting templates, creating tasks, and viewing task progress. +`narrator-ai-web` is a self-hostable Next.js frontend for NarratorAI, a template-driven workflow that helps users turn movies, short dramas, raw clips, and other long-form video material into commentary videos. + +Users upload source videos or import video URLs, choose a commentary template, review the task price, and submit the job. The connected backend can generate commentary scripts, editing instructions, and a condensed commentary video suitable for publishing on short-video platforms. + +Each commentary template can carry its own price. Before a task is submitted, the frontend asks the backend for a quote so the user can confirm the charge first. + +This project is useful for movie commentary, short-drama commentary, plot recaps, content-studio batch production, and teams that want to package commentary templates as sellable products. The repository does not include model inference, video generation, wallet, or orchestration services. Those capabilities are expected to run in a compatible backend service that exposes the APIs configured through environment variables. +Companion backend repository: [NarratorAI-Studio/narrator-ai-web-backend](https://github.com/NarratorAI-Studio/narrator-ai-web-backend). + ## Demo A public demo is available at . @@ -109,6 +117,8 @@ The app listens on by default. This frontend expects backend endpoints for account, wallet, pricing, metadata, and task orchestration. In local development, run the compatible backend first and point `NARRATOR_PRICING_API_URL` at it. The companion backend repository listens on `8080` by default: +- Backend source: [NarratorAI-Studio/narrator-ai-web-backend](https://github.com/NarratorAI-Studio/narrator-ai-web-backend) + ```bash NARRATOR_PRICING_API_URL=http://localhost:8080 ``` diff --git a/README_CN.md b/README_CN.md index f605a61..452dba3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -2,10 +2,18 @@ [英文](./README.md) -`narrator-ai-web` 是一个可自托管的 Next.js 前端,用于模板化解说视频任务创建。它提供用户界面和一层轻量 BFF(Backend-for-Frontend,前端专用后端)能力,支持上传素材、选择模板、创建任务和查看任务进度。 +`narrator-ai-web` 是 NarratorAI 的可自托管 Next.js 前端,用于模板化视频解说制作。它可以帮助用户自动完成电影、短剧等视频的解说制作。 + +用户上传原始视频、影视片段、短剧素材或其他长视频素材后,选择一个解说模板,系统会通过连接的后端根据模板生成解说文案、剪辑脚本,并合成一条适合短视频平台发布的精简版解说视频。 + +每个模板都可以配置自己的价格。用户在提交任务前可以看到本次任务价格,确认后再提交生成。 + +这个项目适合用于电影解说、短剧解说、剧情混剪、内容工作室批量交付,以及想把解说模板做成可售卖商品的团队。 本仓库不包含模型推理、视频生成、钱包或任务编排服务。这些能力需要由兼容后端服务提供,并通过环境变量接入。 +配套后端仓库:[NarratorAI-Studio/narrator-ai-web-backend](https://github.com/NarratorAI-Studio/narrator-ai-web-backend)。 + ## 在线演示 公开演示站:。 @@ -109,6 +117,8 @@ pnpm dev 本前端依赖后端提供 account、wallet、pricing、metadata 和 task orchestration 等接口。本地开发时,请先启动兼容后端服务,并将 `NARRATOR_PRICING_API_URL` 指向它。配套后端仓库默认监听 `8080`: +- 后端源码:[NarratorAI-Studio/narrator-ai-web-backend](https://github.com/NarratorAI-Studio/narrator-ai-web-backend) + ```bash NARRATOR_PRICING_API_URL=http://localhost:8080 ``` From aa59d847f1e0eebd990c398101945fd12c6f7049 Mon Sep 17 00:00:00 2001 From: NarratorAI Studio Date: Mon, 6 Jul 2026 10:31:41 +0800 Subject: [PATCH 2/2] ci(oss): add public-safe PR checks --- .github/workflows/commitlint.yml | 24 ++++++++++ .github/workflows/security.yml | 77 ++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 .github/workflows/commitlint.yml create mode 100644 .github/workflows/security.yml diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..0cf1e60 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,24 @@ +name: Commitlint + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +permissions: + contents: read + +jobs: + check-title: + runs-on: ubuntu-24.04 + steps: + - name: Check PR title format + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + set -euo pipefail + if printf '%s\n' "$PR_TITLE" | grep -Eq '^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\([^)]+\))?!?: .+'; then + echo "PR title follows Conventional Commits." + else + echo "::error::PR title must match: (): " + exit 1 + fi diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..0fbce75 --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,77 @@ +name: Security + +on: + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: + contents: read + +jobs: + public-safety-scan: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Resolve scan range + env: + BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} + HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + set -euo pipefail + base="${BASE_SHA:-HEAD~1}" + head="${HEAD_SHA:-HEAD}" + git cat-file -e "${base}^{commit}" 2>/dev/null || git fetch --no-tags --depth=50 origin "${base}" || true + git cat-file -e "${head}^{commit}" 2>/dev/null || git fetch --no-tags --depth=50 origin "${head}" || true + if ! git cat-file -e "${base}^{commit}" 2>/dev/null; then + base="HEAD~1" + fi + echo "SCAN_BASE=$base" >> "$GITHUB_ENV" + echo "SCAN_HEAD=$head" >> "$GITHUB_ENV" + + - name: Scan changed files for private markers + run: | + set -euo pipefail + files="$(git diff --name-only "$SCAN_BASE..$SCAN_HEAD" -- . ':!*.png' ':!*.jpg' ':!*.jpeg' ':!*.gif' ':!*.ico' || true)" + if [ -z "$files" ]; then + echo "No text files changed." + exit 0 + fi + + blocked='(BEGIN (RSA|OPENSSH|PRIVATE) KEY|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9_]+|xox[baprs]-)' + failed=0 + while IFS= read -r file; do + [ -f "$file" ] || continue + if grep -nEI "$blocked" "$file" >/tmp/public-safety-match.txt; then + echo "::error file=$file::Potential secret pattern found." + sed -E 's/:.*$/: [redacted]/' /tmp/public-safety-match.txt + failed=1 + fi + if grep -nE 'https://github\.com/[^ )]+' "$file" | grep -vE 'https://github\.com/NarratorAI-Studio/' >/tmp/public-safety-match.txt; then + echo "::error file=$file::Disallowed external GitHub repository URL found." + sed -E 's/:.*$/: [redacted]/' /tmp/public-safety-match.txt + failed=1 + fi + done <<< "$files" + exit "$failed" + + - name: Check commit metadata for public-safe emails + run: | + set -euo pipefail + failed=0 + while read -r email; do + [ -n "$email" ] || continue + local_part="${email%@*}" + domain="${email#*@}" + case "$local_part:$domain" in + security:*|opensource:noreply.github.com|*:users.noreply.github.com) ;; + *) + echo "::error::Commit metadata contains a non-public-safe email." + failed=1 + ;; + esac + done < <(git log --format='%ae%n%ce' "$SCAN_BASE..$SCAN_HEAD" | sort -u) + exit "$failed"