Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .dockerignore

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/docker-build.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ Studio, Canvas, and Assets are three views over the same project, generation, an

## Runtime flow

The browser calls local `/api` routes. Server routes validate input and call the BeatAPI adapter. The adapter submits image/video tasks and checks `/v1/tasks/:id`. Generation state is stored locally, while provider result URLs are indexed as project assets.
The browser calls local `/api` routes. Server routes validate input and call the BeatAPI adapter. The adapter submits image/video generation tasks or the stable `/v1/video-analysis/tasks` workflow, then checks `/v1/tasks/:id`. Generation state and analysis text are stored locally, while provider result URLs are indexed as project assets.

Provider credentials are read from environment variables or the local `config` table. Browser components never receive the raw API key.

Expand Down
23 changes: 0 additions & 23 deletions Dockerfile

This file was deleted.

5 changes: 4 additions & 1 deletion PROVIDERS.md
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# Provider configuration

BeatAPI is the fixed built-in generation provider implemented by this repository. The upstream URL is intentionally fixed to `https://api.beatapi.io`; users only provide their own BeatAPI API key.
BeatAPI is the fixed built-in generation and analysis provider implemented by this repository. The upstream URL is intentionally fixed to `https://api.beatapi.io`; users only provide their own BeatAPI API key.

Configure it in either place:

Expand All@@ -13,13 +13,16 @@ The adapter uses:

- `POST /v1/images/tasks`
- `POST /v1/videos/tasks`
- `POST /v1/video-analysis/tasks`
- `GET /v1/tasks/:id`
- `POST /v1/files` for supported reference files

Model support is defined in `src/core/effects/effect-registry.ts`, not discovered dynamically. This keeps Canvas and Studio behavior deterministic. When adding a model, update the registry, request mapping, media capability rules, and tests together.

Kling 2.6 and Kling 3.0 Motion Control are exposed as BeatAPI models. Each run requires exactly one character image and one MP4/MOV motion video uploaded through the connected BeatAPI account. The Workspace never asks users for a KIE key; BeatAPI owns the upstream provider route, billing, polling, and output persistence.

Video Analysis is exposed as a stable BeatAPI workflow with Standard and Deep depth controls. The Workspace uploads one MP4/MOV input, submits the analysis task, polls `GET /v1/tasks/:id`, and stores the returned report text and usage in the local project history. Provider-specific Gemini routing remains private to BeatAPI.

An API with a different request or polling contract still needs its own adapter. This repository does not ship placeholder KIE, Vidu, Evolink, Gemini, Fal, Replicate, or payment-provider integrations.

## Storage
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,15 +2,15 @@

**Beat complexity. Design freely.**

The open-source, local-first AI canvas for image and video creation. BeatDesign brings Projects, a guided Studio, a node-based Canvas, shared assets, generation history, configurable storage, and an official BeatAPI connection into one focused workspace.
The open-source, local-first AI canvas for image and video creation and analysis. BeatDesign brings Projects, a guided Studio, a node-based Canvas, shared assets, generation history, configurable storage, and an official BeatAPI connection into one focused workspace.

There is no login, account system, payment flow, subscription, local credit ledger, admin panel, or API-key issuing service in this repository.

[中文说明](./README.zh-CN.md)

## What is included

- Studio for prompt-first image and video generation.
- Studio for prompt-first image and video generation, plus Standard and Deep video analysis.
- React Flow Canvas for connected, multi-step creative workflows.
- A project-scoped Assets view shared by Studio and Canvas.
- Local projects, snapshots, generation history, and asset indexing.
Expand DownExpand Up@@ -48,7 +48,7 @@ Studio / Canvas / Assets
-> local generation history and asset index
```

The API key and storage credentials remain server-side. Project state and history live in the local SQLite database. In local SQLite mode, imported image and video files are copied immediately into the project-owned `data/project-assets/<project-id>/` directory and indexed in SQLite before a card is added to the Canvas. Generated files remain at the public URLs returned by the provider and are indexed locally instead of being copied again.
The API key and storage credentials remain server-side. Project state and history live in the local SQLite database. In local SQLite mode, imported image and video files are copied immediately into the project-owned `data/project-assets/<project-id>/` directory and indexed in SQLite before a card is added to the Canvas. Video analysis uploads MP4/MOV input through BeatAPI's file endpoint and stores the resulting text in the same project generation history. Generated files remain at the public URLs returned by the provider and are indexed locally instead of being copied again.

Canvas state is saved as a complete project snapshot after changes, checked again every five seconds while dirty, and flushed when the page is hidden, refreshed, or closed. A populated snapshot cannot be replaced by an unconfirmed empty snapshot.

Expand Down
9 changes: 5 additions & 4 deletions README.zh-CN.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,13 +2,13 @@

**化繁为简,自由创作。**

开源、本地优先的 AI 图片与视频创作画布。BeatDesign 将项目、Studio、节点式 Canvas、共享素材、生成历史、可配置存储和 BeatAPI 官方连接整合在一个专注的工作台中。
开源、本地优先的 AI 图片、视频创作与分析画布。BeatDesign 将项目、Studio、节点式 Canvas、共享素材、生成历史、可配置存储和 BeatAPI 官方连接整合在一个专注的工作台中。

本仓库不包含登录、账号、支付、订阅、本地积分、后台管理、RBAC 或 API Key 发放系统。

## 包含什么

- Studio:以提示词和参数为主的快速生成体验。
- Studio:以提示词和参数为主的快速生成体验,并支持 Standard 与 Deep 视频分析
- Canvas:基于 React Flow 的多步骤节点画布。
- Assets:Studio 与 Canvas 共用的项目素材库。
- 本地项目、画布快照、生成历史和素材索引。
Expand DownExpand Up@@ -41,12 +41,12 @@ Studio / Canvas / Assets
-> 导入文件立即保存到 data/project-assets,并写入 SQLite 素材索引
-> 生成预检与 SQLite 一次性生成意图
-> 仅在确认生成后,把已持久化的本地引用上传到 Provider
-> BeatAPI 图片或视频任务接口
-> BeatAPI 图片、视频生成任务或视频分析接口
-> 轮询 Provider 状态
-> 写入本地生成历史与素材索引
```

API Key 与存储密钥只保留在服务端。项目和历史数据保存在本地 SQLite。在本地 SQLite 模式下,导入的图片和视频会先复制到项目自己的 `data/project-assets/<project-id>/` 目录,并写入 SQLite 素材索引,然后才加入 Canvas。Provider 返回的公开结果地址会直接进入本地素材索引,不强制重复复制。
API Key 与存储密钥只保留在服务端。项目和历史数据保存在本地 SQLite。在本地 SQLite 模式下,导入的图片和视频会先复制到项目自己的 `data/project-assets/<project-id>/` 目录,并写入 SQLite 素材索引,然后才加入 Canvas。视频分析会把 MP4/MOV 输入上传到 BeatAPI Files,并把返回的分析文本写入同一份项目生成历史。Provider 返回的公开结果地址会直接进入本地素材索引,不强制重复复制。

Canvas 内容变化后会保存一份完整项目快照;存在未保存变化时,每 5 秒再检查一次,并在页面切到后台、刷新或关闭时强制落盘。已有内容的快照不会被未经确认的空快照覆盖。

Expand All@@ -67,6 +67,7 @@ Canvas 内容变化后会保存一份完整项目快照;存在未保存变化
| `pnpm test` | 单元与契约测试 |
| `pnpm i18n:check` | 检查中英文文案 |
| `pnpm build` | 生产构建 |
| `pnpm cf:build` | 构建 Cloudflare Workers 产物 |
| `pnpm db:push` | 本地同步数据库结构 |
| `pnpm db:generate` | 生成可审阅的 SQLite/D1 迁移 |

Expand Down
2 changes: 1 addition & 1 deletion RELEASE_SCOPE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@

This repository contains BeatDesign only. The separate BeatAPI SaaS Template is not part of this codebase.

Included: homepage, projects, Studio, Canvas, provider configuration, supported model registry, generation lifecycle, uploads, assets, local history, i18n, SQLite/D1 persistence, tests, and deployment examples.
Included: homepage, projects, Studio, Canvas, provider configuration, supported model and video-analysis registry, generation/analysis lifecycle, uploads, assets, local history, i18n, SQLite/D1 persistence, tests, and deployment examples.

Excluded: authentication, login, accounts, payments, subscriptions, credits, API-key issuing, invitations, RBAC, admin, support tickets, CMS, email delivery, and unrelated AI-provider adapters.

Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE_MODES.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,11 +2,11 @@

Each project can be opened in three modes:

- **Studio** is a guided, form-first surface for producing a result quickly.
- **Canvas** is a node-based surface for connected referencesand multi-step workflows.
- **Studio** is a guided, form-first surface for image/video generation and Standard or Deep video analysis.
- **Canvas** is a node-based surface for connected references, generation, and durable video-analysis reports.
- **Assets** is the project-scoped library shared by Studio and Canvas.

All three modes share the same project ID, assets, model catalog, provider connection, generation history, and persistence layer. The last opened mode is stored on the project so the project list can resume in place.
All three modes share the same project ID, assets, model catalog, provider connection, generation and analysis history, and persistence layer. The last opened mode is stored on the project so the project list can resume in place.

Routes:

Expand Down
23 changes: 23 additions & 0 deletions messages/en.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -324,6 +324,8 @@
"missingVideoUrl": "Missing video URL.",
"readVideoDurationFailed": "Unable to read video duration.",
"videoMetadataLoadFailed": "Unable to load video metadata.",
"analysisVideoRequired": "Attach exactly one MP4 or MOV video to analyze.",
"analysisCompletedWithoutText": "Analysis completed without text output.",
"addTextNoteSuccess": "Text note added to the canvas."
},
"dock": {
Expand DownExpand Up@@ -434,6 +436,18 @@
"freeGenerate": "Free generation",
"uploadStart": "Upload image"
},
"analysis": {
"modeLabel": "Analyze",
"modelLabel": "Analysis model",
"standardModel": "Video Analysis Standard",
"proModel": "Video Analysis Pro",
"promptPlaceholder": "Ask what to inspect in the video, including timestamps, actions, scenes, or issues...",
"uploadVideo": "Add an MP4 or MOV video",
"removeVideo": "Remove selected video",
"analyze": "Analyze",
"analyzing": "Analyzing...",
"referenceUploadSoon": "Reference upload is not available in this mode yet"
},
"feed": {
"history": "History",
"result": "Generation",
Expand All@@ -449,6 +463,8 @@
"params": "Parameters",
"image": "Image",
"video": "Video",
"analysis": "Analysis",
"analysisResult": "Analysis result",
"references": "References"
},
"textNote": {
Expand DownExpand Up@@ -544,6 +560,13 @@
"projects": "Projects",
"projectsLabel": "Open projects",
"githubRepository": "Open BeatDesign on GitHub",
"workspaceView": "Workspace view",
"create": "Create",
"studio": "Studio",
"studioDescription": "Focused generation and analysis",
"canvas": "Canvas",
"canvasDescription": "Visual multi-step workflow",
"assets": "Assets",
"projectAssets": {
"triggerLabel": "Project assets",
"title": "Project assets",
Expand Down
23 changes: 23 additions & 0 deletions messages/zh.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -325,6 +325,8 @@
"missingVideoUrl": "缺少视频地址。",
"readVideoDurationFailed": "无法读取视频时长。",
"videoMetadataLoadFailed": "无法加载视频元数据。",
"analysisVideoRequired": "请添加且仅添加一个 MP4 或 MOV 视频进行分析。",
"analysisCompletedWithoutText": "分析已完成,但没有返回文本结果。",
"addTextNoteSuccess": "文本备注已加入画布。"
},
"dock": {
Expand DownExpand Up@@ -435,6 +437,18 @@
"freeGenerate": "自由生成",
"uploadStart": "上传图片"
},
"analysis": {
"modeLabel": "分析",
"modelLabel": "分析模型",
"standardModel": "视频分析 Standard",
"proModel": "视频分析 Pro",
"promptPlaceholder": "说明你想检查视频中的什么,可要求时间戳、动作、场景或问题定位……",
"uploadVideo": "添加 MP4 或 MOV 视频",
"removeVideo": "移除已选视频",
"analyze": "开始分析",
"analyzing": "分析中……",
"referenceUploadSoon": "该模式的参考素材上传暂未开放"
},
"feed": {
"history": "历史",
"result": "生成结果",
Expand All@@ -450,6 +464,8 @@
"params": "参数",
"image": "图片",
"video": "视频",
"analysis": "分析",
"analysisResult": "分析结果",
"references": "参考图"
},
"textNote": {
Expand DownExpand Up@@ -545,6 +561,13 @@
"projects": "项目",
"projectsLabel": "打开项目列表",
"githubRepository": "在 GitHub 打开 BeatDesign",
"workspaceView": "工作区视图",
"create": "创作",
"studio": "Studio",
"studioDescription": "专注生成与分析",
"canvas": "Canvas",
"canvasDescription": "可视化多步骤工作流",
"assets": "素材",
"projectAssets": {
"triggerLabel": "项目素材",
"title": "项目素材",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@
"name": "beatdesign",
"version": "0.1.0",
"private": true,
"description": "The open-source, local-first AI canvas for image and video creation",
"description": "The open-source, local-first AI canvas for image and video creation and analysis",
"license": "Apache-2.0",
"homepage": "https://github.com/BeatAPI/BeatDesign#readme",
"repository": {
Expand Down
11 changes: 11 additions & 0 deletions src/components/app/product-page-shell-title.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,3 +14,14 @@ test('project title field uses the available header width instead of a short cha
assert.match(source, /className="min-w-0 flex-1"/);
assert.match(source, /className="h-9 w-full/);
});

test('editing a title is not reset by an unstable translation function identity', () => {
const source = readFileSync(
new URL('./product-page-shell.tsx', import.meta.url),
'utf8'
);

assert.match(source, /const untitledWorkspaceName = t\('header\.untitledCanvas'\)/);
assert.match(source, /\[untitledWorkspaceName\]/);
assert.doesNotMatch(source, /\[t\]\s*\n\s*\)/);
});
Loading
Loading