Commit Graph

23 Commits

Author SHA1 Message Date
yuanzonghao d05b564110 docs(readme): add demo video and restore config guide inline
Add demo video with inline <video> playback in all three README
language variants (zh/en/ja), hosted via GitHub user-attachments.

Restore the configuration guide from docs/configuration*.md back into
the main READMEs (positioned between Deploy and Roadmap) for better
discoverability. docs/configuration*.md files preserved for Vercel
button envLink references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-29 13:15:05 +08:00
yuanzonghao 7dac77e200 docs(readme): restructure for star conversion optimization
- Restructure overview with scannable bullet lists for capabilities
- Move screenshots up (after overview), reduce from 14 to 6
- Extract configuration guide to docs/configuration{,.en,.ja}.md
- Update Vercel deploy button envLink to point to new config docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-29 12:16:03 +08:00
yuanzonghao c66ee38ddd docs(readme): mark story save & cloud sync as done in roadmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-28 23:33:49 +08:00
yuanzonghao 4603a7df71 docs(readme): update architecture, add OpenDeploy sponsor, fix LINUX DO link
- Remove deprecated Architect agent from pipeline diagrams (zh/en/ja SVGs)
  and README text — Writer now handles story architecture
- Add OpenDeploy as sponsor section and one-click deploy option
- Change LINUX DO badge link to the actual forum post
- Move Open Deploy to completed in Roadmap

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 18:53:26 +08:00
Zonghao Yuan 4abb57ec1f Merge pull request #89 from zonghaoyuan/feat/cla-mechanism
feat(repo): add CLA mechanism for external contributors
2026-06-18 11:05:26 +08:00
yuanzonghao 6ee74a0680 chore(repo): address pr-agent review on CLA workflow
Address the valid points from pr-agent on PR #89, skip the inaccurate
ones (e.g. the $contributorName placeholder it suggested does not exist
in cla-assistant-action; create-file-commit-message fires before any
signer exists).

- cla.yml: move 'token configured?' check into job env and put the whole
  step-level if inside a single ${{ }} so && / || are evaluated as a
  boolean (step-level if cannot safely reference secrets.* directly)
- cla.yml: declare minimal explicit permissions (contents/pull-requests/
  issues/statuses) — this workflow runs on pull_request_target with a token
- cla.yml: drop the overly broad '*bot' allowlist wildcard; keep explicit
  bot + maintainer accounts only
- cla.yml: clean up the stray trailing '@' in create-file-commit-message
  (used once, at signature-store creation, before any signer exists)
- README{,.en,.ja}: clarify that the CLA is signed via a PR comment, not
  before opening the PR — matches the actual CONTRIBUTING flow
2026-06-17 19:49:48 +08:00
yuanzonghao 51afeb09ac docs: sync README with recent changes (TTS, model support, Claude caching)
- Model support: text/vision now OpenAI-compatible only (Claude/Gemini
  via their OpenAI-compatible endpoints); drop stale native-protocol copy
  and the anthropic/google rows from the *_PROVIDER table
- TTS: document StepFun (step-tts-2, paid, better quality) alongside
  Xiaomi MiMo (free) across zh/en/ja; update Vercel deploy envDescription
- Claude: note that direct Anthropic endpoints lack caching, recommend
  gateway for full experience
- Cloudflare: preserve existing one-click deploy (compat work in progress)
2026-06-17 18:26:36 +08:00
yuanzonghao 2b0b9c6f8d feat(repo): add CLA mechanism for external contributors
Introduce a Contributor License Agreement (CLA) so external contributions
can be licensed under AGPL-3.0 and any other terms (incl. closed-source),
keeping the AGPL-3.0 codebase usable in closed-source projects.

- CLA.md: authoritative English CLA (ICLA + employer authorization, v1.0)
- CLA.zh.md: non-binding Chinese reference translation
- CONTRIBUTING.md: bilingual contributing guide, points to CLA
- .github/workflows/cla.yml: self-hosted cla-assistant-action that records
  signatures into cla-signatures/version-1.json; exempts maintainers & bots
  via allowlist; skips when CLA_BOT_TOKEN is unset
- .github/PULL_REQUEST_TEMPLATE.md: guides contributors to sign
- README.{md,en.md,ja.md}: add License & contributing footer
- app/terms: note CLA requirement in the IP section

Enforcement requires repo-level setup (PAT secret + branch protection)
documented in cla.yml; not covered by this commit.
2026-06-17 12:23:46 +08:00
yuanzonghao f8c1d4a8f5 docs: use inline code formatting for .infiplot extension
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-14 17:55:49 +08:00
yuanzonghao 989f2a7872 docs: update Roadmap with completed milestones and new directions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-14 17:45:27 +08:00
Zonghao Yuan 88808b93b6 docs: 简化 Docker 部署流程,用 curl 下载替代仓库克隆 (#53)
* docs: simplify Docker deploy — download two files instead of cloning repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docs): use mkdir -p and guard against .env.local overwrite

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-07 22:39:01 +08:00
yuanzonghao c82f887a02 feat(deploy): add Docker Compose self-hosted deployment option
Add multi-platform Docker image build (amd64 + arm64) with GitHub Actions
CI that pushes to GHCR on every merge to main. Users can self-host with
a single `docker compose up -d` command.

- Dockerfile: multi-stage build with Next.js standalone output (~150-200MB)
- docker-compose.yml: one-command self-hosted deployment
- .github/workflows/docker.yml: CI workflow with QEMU cross-compilation
- next.config.ts: conditional `output: "standalone"` via BUILD_STANDALONE env
- README (zh/en/ja): restructure deploy section to include Docker option

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-06 21:57:57 +08:00
yuanzonghao b0b2e922d3 feat(web): optional bring-your-own Xiaomi MiMo TTS key (browser-side synthesis)
Public users share one server TTS key, so Xiaomi's per-key RPM/TPM limits
cause silent playback under concurrency. This adds an OPTIONAL path: a user
can store their own Xiaomi MiMo key in the browser and synthesize voice
client-side against Xiaomi's CORS-open endpoints. The key lives only in
localStorage and is never sent to or logged by our server; the shared server
key still serves everyone who does not opt in.

- components/TtsKeyModal.tsx: shared key modal (key-family + region picker),
  reused by both the home and play pages
- app/play/page.tsx: silence nudge moved beside the mute toggle; modal opens
  in place instead of redirecting to the home page
- app/page.tsx: home page consumes the shared modal + readStoredTtsConfig
- lib/clientTtsConfig.ts, lib/ttsPresets.ts: browser config + region presets
- app/api/{start,scene,insert-beat}: thread per-request voice; lib/types update
- docs/xiaomi-tts-key.md + README note

Verified with tsc --noEmit (exit 0).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 16:58:55 +08:00
yuanzonghao 4347e5bfdf fix(play): make scene-image proxy opt-in — default deployers connect direct
b805b1d routed every scene <img> through fetch → Blob → createObjectURL to
kill QUIC progressive-paint, but in doing so added an *unconditional*
dependency on a CORS-adding proxy. That breaks the default deployment:
im.runware.ai sends no Access-Control-Allow-Origin, so a direct
fetch().blob() throws and the scene image silently fails to load for anyone
who hasn't stood up the Cloudflare Worker.

Restore the pre-b805b1d behavior as the *default* and make the proxy
strictly opt-in:

  - Direct path (no env set): preloadImage() warms the HTTP cache + decodes,
    then <img> uses the original https://im.runware.ai URL — as before
    b805b1d. No fetch().blob(), no CORS dependency: a fresh clone just works.
  - Proxy path (NEXT_PUBLIC_IMAGE_PROXY_URL set): fetch the proxied URL →
    Blob → createObjectURL, exactly as b805b1d, gaining the QUIC-immune
    HTTP/2 edge + atomic paint.

shouldProxy(url) gates the two paths: proxy only when a base is configured
AND the host is in NEXT_PUBLIC_IMAGE_PROXY_ALLOWED_HOSTS (default
im.runware.ai). data: / non-http / unknown-host URLs always take the direct
path. blobUrlCache + revoke logic is unchanged and safe for both paths
(revoke is a no-op on non-blob: URLs).

The Cloudflare Worker moves out of this repo into a standalone, one-click-
deployable project (infiplot-image-proxy) so the optional infra isn't
carried by every clone; .env.example and the READMEs link to it.

restore: preloadImage() helper deleted by b805b1d
add:     NEXT_PUBLIC_IMAGE_PROXY_ALLOWED_HOSTS (default im.runware.ai)
remove:  worker/ (moved to standalone repo)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 09:57:29 +08:00
DESKTOP-I1T6TF3\Q 4d46bd0664 docs: replace README screenshots with 14-image 2-column gallery
Drop the old 9-image 3x3 grid (4/5/a4/c3/c5/c7/d2/f2/f5.webp) and bring
in 14 new stills as 1.webp..14.webp, laid out as 7 rows of 2 columns at
width=420. Source PNGs (1920x1080 for 1-8, 1200x680 for 9-14) are
resized to fit inside 1200x680 and saved as q=85 WebP — 70-150KB each.

All three README locales (zh/en/ja) share the same paths so a single
asset swap refreshes every edition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 06:53:46 +08:00
Zonghao Yuan 639201cd38 docs: replace How it works mermaid with localized SVG diagrams (#14)
The auto-laid-out Mermaid flowchart looked rough. Replace it with a
hand-built Anthropic-style diagram: color-coded role cards, a dashed
scene-generation group, and the speculative pre-generation loop.

Each SVG bakes in a dark background so it renders consistently whether
the viewer's GitHub theme is light or dark (theme is per-viewer, not
per-repo). Ship one localized SVG per README (zh/en/ja) to preserve the
existing per-language diagrams, and strip claude.ai artifact residue
(onclick / var() / context-stroke).

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 01:08:08 +08:00
Zonghao Yuan dc5ecd60f6 refactor: flatten monorepo to single web package (#12)
Flatten the pnpm monorepo (apps/web + packages/*) into a single web package at the repo root.

- Move app/lib/components/scripts/public to root; drop apps/web and packages/* wrappers
- Rewrite tsconfig paths (@infiplot/*) to ./lib/*; turbopack.root = __dirname
- Update Vercel (no root-directory) and Cloudflare (pnpm build:cf at root) deploy paths
- Regenerate pnpm-lock.yaml to drop stale workspace importers
- Bump engines.node to >=22 to match wrangler

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 00:55:45 +08:00
yuanzonghao 9543c3dba1 docs: note Cloudflare deploy needs Workers Paid Plan
The scene pipeline needs more CPU time than the Workers Free 10ms cap
allows, so Cloudflare deploys require Workers Paid. The old "pick
whichever you prefer" implied false cost parity with Vercel (free
Hobby works), so recommend the one-click Vercel deploy for personal
use. Applied to all three READMEs (zh/en/ja).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 00:39:17 +08:00
yuanzonghao cd9e9012bf docs: point 简体中文 switcher to repo homepage
The relative `README.md` link resolved to GitHub's blob file view instead
of the repo landing page. Use the absolute repo URL so the switcher returns
to the homepage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:29:35 +08:00
yuanzonghao 6038216751 docs: reorder README sections, simplify Live Demo badge, add JP screenshots
- Move "How it works" above "Team & Vision" so the technical deep-dive
  follows the screenshots while reader interest is highest
- Simplify the Live Demo badge to a single segment (drop the domain; the
  badge still links to infiplot.com)
- Add the missing Screenshots section to the Japanese README (i18n gap:
  it was added to zh/en but never backported to ja)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:29:35 +08:00
yuanzonghao 72331bb865 feat: add Cloudflare Workers deployment alongside Vercel
InfiPlot now deploys to either Vercel or Cloudflare Workers — both
targets are first-class. The project is fully stateless (sessions live
on the client), so the Cloudflare side needs only Workers + Workers
Assets and zero D1/KV/R2.

- apps/web/wrangler.jsonc — nodejs_compat, Assets binding, 60s CPU
  limit (Workers Paid required; matches vercel.json maxDuration). I/O
  wait does not count against this budget — fits the LLM-bound
  workload that's most of the runtime.
- apps/web/open-next.config.ts — minimal defineCloudflareConfig (no
  cache needed since the engine is stateless).
- apps/web/package.json — added build:cf / preview:cf / deploy:cf via
  @opennextjs/cloudflare + wrangler (both devDeps); sharp moved from
  dependencies to devDependencies (only used by the manual
  optimize-home-images.mjs / localize-firstact-images.mjs scripts now).
- .gitignore — .open-next, .wrangler, .dev.vars.
- READMEs (3 langs) — Deploy to Cloudflare button next to Vercel,
  plus a Cloudflare section in the env-var setup (wrangler secret put
  + Cloudflare Access for staging access control).

Verified: pnpm typecheck + pnpm build (Vercel path) + pnpm build:cf
(OpenNext bundle: worker 4 KB, server 24 MB, assets 32 MB / 186
files — all within Workers limits) + pnpm preview:cf with the full
play loop (start → scene → background click → CORS-clean Canvas
annotation via Runware CDN → vision LLM → insert-beat) all green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:47:03 +08:00
yuanzonghao dd8b60c06b docs: move one-click deploy section directly below Live Demo
Surfaces the deploy entry point higher on the page so it isn't buried
near the bottom. The section keeps its inline link to the Configuration
guide, so the deploy flow is unaffected by the reorder.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 20:55:23 +08:00
yuanzonghao 236f5494c1 docs: add hero header to READMEs and make Chinese the default
- Add centered hero block: SVG wordmark banner, short tagline, and
  project-stat badges (stars/watchers/forks/issues + Live Demo, License,
  LINUX DO forum backlink)
- Swap default README to Chinese (targeting CN developers); English
  moves to README.en.md, Japanese stays README.ja.md
- Add SVG wordmark banner at docs/banner.svg
- Cross-link language switchers and fix per-language deploy envLink anchors

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 20:55:23 +08:00