From e1d3f25fa3c12fc959f93f9763f13340f45ece48 Mon Sep 17 00:00:00 2001 From: eust-w Date: Wed, 28 Oct 2026 01:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Align=20development=20environmen?= =?UTF-8?q?t=20and=20record=20verified=20publications?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++- docs/README.zh-CN.md | 4 ++- docs/releases/publication-status.md | 36 ++++++++++++++++++++++ scripts/dev-env.mjs | 18 +++++++++++ scripts/dev-env.test.mjs | 48 +++++++++++++++++++++++++++++ scripts/dev.mjs | 10 ++---- 6 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 docs/releases/publication-status.md create mode 100644 scripts/dev-env.mjs create mode 100644 scripts/dev-env.test.mjs diff --git a/README.md b/README.md index a046f76..203d2c0 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,16 @@ **A local-first workbench for 3D assets and Genesis simulation exports.** +[![CI](https://github.com/eust-w/real2sim-platform/actions/workflows/ci.yml/badge.svg)](https://github.com/eust-w/real2sim-platform/actions/workflows/ci.yml) + [中文](docs/README.zh-CN.md) · [Offline example](examples/README.md) · [Roadmap](docs/ROADMAP.md) · [Contributing](CONTRIBUTING.md) · [MIT license](LICENSE) ![Real2Sim Studio workbench](docs/images/workbench.png) [Download v0.1.0 Alpha](https://github.com/eust-w/real2sim-platform/releases/tag/v0.1.0-alpha.1) · [90-second introduction](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-intro-en.mp4) · [中文视频](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-intro-zh.mp4) · [Gitea mirror](https://gitea.d-robotics.cc/longtao.wu/real2sim-platform) +[Watch on X](https://x.com/eustancewu/status/2115131684236800501) · [Watch on Douyin](https://www.douyin.com/video/7701399089530916159) · [Publication status](docs/releases/publication-status.md) + Inspect a GLB, configure a material preset and export a self-contained Genesis scene. Start with the included procedural example without an API key, or connect your own DashScope account for Tripo text/image-to-3D generation. ## Try it @@ -60,7 +64,7 @@ npm run dev Generation uses an external paid service. Provider models, generated assets and service terms are not covered by this repository's MIT license. A flexible variant is a new prompt-based generation; it is not deformation or reconstruction of the original GLB. -The local API defaults to `127.0.0.1:8789`. Set `PORT` before starting to change it; the development proxy uses the same value. This is a single-user local application, not a publicly hosted service. See [Security](SECURITY.md). +The local API defaults to `127.0.0.1:8789`. Set `PORT` in the shell or `.env.local` before starting to change it; the development proxy uses the same value. Shell values take precedence. Demo mode ignores dotenv files. This is a single-user local application, not a publicly hosted service. See [Security](SECURITY.md). ## Limits diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md index 08b3eaf..8718c6c 100644 --- a/docs/README.zh-CN.md +++ b/docs/README.zh-CN.md @@ -8,6 +8,8 @@ [下载 Alpha 发布包](https://github.com/eust-w/real2sim-platform/releases/tag/v0.1.0-alpha.1) | [90 秒介绍视频](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-intro-zh.mp4) | [45 秒竖版](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-short-zh.mp4) | [Gitea 镜像](https://gitea.d-robotics.cc/longtao.wu/real2sim-platform) +[抖音观看](https://www.douyin.com/video/7701399089530916159) | [X 观看](https://x.com/eustancewu/status/2115131684236800501) | [各平台实际状态](releases/publication-status.md) + 预览 GLB、配置材料预设,并导出包含网格、参数和 Python 脚本的 Genesis 场景包。内置自制样例不需要 API Key;可选接入自己的 DashScope 账号,通过 Tripo 生成 3D 资产。 ## 无需密钥体验 @@ -54,7 +56,7 @@ python .data/genesis-packages/example-soft-puck/genesis_scene.py --steps 800 --r 工作台代码和自制样例采用 MIT 许可。外部模型、服务及生成资产另受提供方条款约束,开源工作台不代表底层生成模型开源或生成免费。详见[第三方声明](../THIRD_PARTY_NOTICES.md)。 -连接生成服务时,复制 `.env.example` 为 `.env.local` 并设置自己的 Key,然后运行 `npm run dev`。API 只监听 `127.0.0.1:8789`,本项目不是可直接公开部署的多用户服务。不要把密钥或 `.data/` 提交到 Git。 +连接生成服务时,复制 `.env.example` 为 `.env.local` 并设置自己的 Key,然后运行 `npm run dev`。API 默认只监听 `127.0.0.1:8789`;普通模式可以通过 shell 或 `.env.local` 的 `PORT` 修改端口,前端代理同步使用该值,shell 优先。演示模式不读取 dotenv 文件。本项目不是可直接公开部署的多用户服务。不要把密钥或 `.data/` 提交到 Git。 ## 开发与反馈 diff --git a/docs/releases/publication-status.md b/docs/releases/publication-status.md new file mode 100644 index 0000000..c318a35 --- /dev/null +++ b/docs/releases/publication-status.md @@ -0,0 +1,36 @@ +# Alpha Publication Status + +Verified on 2026-10-28 (Asia/Shanghai). Uploads, drafts and review queues are not counted as publication. + +| Channel | State | Evidence | +| --- | --- | --- | +| GitHub | Public MIT repository and prerelease | [Repository](https://github.com/eust-w/real2sim-platform), [v0.1.0-alpha.1](https://github.com/eust-w/real2sim-platform/releases/tag/v0.1.0-alpha.1) | +| Gitea | Public mirror and prerelease | [Repository](https://gitea.d-robotics.cc/longtao.wu/real2sim-platform), [v0.1.0-alpha.1](https://gitea.d-robotics.cc/longtao.wu/real2sim-platform/releases/tag/v0.1.0-alpha.1) | +| X | Published; 90-second video playback verified | [Public post](https://x.com/eustancewu/status/2115131684236800501) | +| Douyin | Published; 45-second video playback verified | [Public video](https://www.douyin.com/video/7701399089530916159) | +| Bilibili | Not published; awaiting uploader agreement confirmation | Chinese introduction and upload copy prepared | +| YouTube | Not published; awaiting account verification and agreement confirmation | English-captioned introduction and upload copy prepared | +| Xiaohongshu | Not published; draft saved, account action required | Vertical video and upload copy prepared | +| WeChat Channels | Not published; publishing interface unavailable to the current tool session | Vertical video and upload copy prepared | + +Both releases contain 15 assets. GitHub asset SHA-256 metadata matches the local files; all 15 Gitea assets were downloaded without authentication and their SHA-256 hashes matched. Neither private task history nor local credentials are release assets. + +## Media + +- [90-second Chinese introduction](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-intro-zh.mp4) +- [90-second English-captioned introduction](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-intro-en.mp4), with Chinese synthetic narration +- [45-second Chinese vertical version](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/real2sim-short-zh.mp4) +- [Native Genesis solver recording](https://github.com/eust-w/real2sim-platform/releases/download/v0.1.0-alpha.1/genesis-native-simulation.mp4) +- Subtitles, covers, the runnable example, metrics, license and security notes are attached to both releases. + +The introduction uses actual UI captures and the original procedural sample. Slowed simulation replay is labeled. Synthetic narration and AI assistance are disclosed. The English-captioned version does not have an English voice track. + +## Verification Boundary + +The original release tag is `56f124f`; it has not been moved. Follow-up main-branch fixes pin the supported CI runner, add numerical-metric CI tests, and ensure the API and Vite receive the same `.env.local` port. [CI at 518917d passed](https://github.com/eust-w/real2sim-platform/actions/runs/40551404979), including browser smoke tests and numerical-metric tests. Current launcher regression checks also pass locally. + +The recorded Genesis example completed 800 CPU steps with finite output and measured shape change. It is not a physical-accuracy benchmark, GPU validation or proof of arbitrary mesh compatibility. See [release notes](v0.1.0-alpha.1.md) and [numerical results](../verification/genesis-cpu.json). + +The optional Python stack still has unresolved Pillow advisories due to an upstream MoviePy version constraint. Use only trusted sample assets in an isolated environment. A clean Node audit does not make the Python runtime safe for untrusted input; see [SECURITY.md](../../SECURITY.md). + +Platform-specific copy is kept in [the media guide](../media/platform-copy.md). Publication records do not promise reach, stars or virality. diff --git a/scripts/dev-env.mjs b/scripts/dev-env.mjs new file mode 100644 index 0000000..858b028 --- /dev/null +++ b/scripts/dev-env.mjs @@ -0,0 +1,18 @@ +import { join } from 'node:path' +import dotenv from 'dotenv' + +export function loadDevEnvironment(root, demo, inherited = process.env) { + const env = { ...inherited } + if (demo) { + env.REAL2SIM_DEMO = '1' + env.REAL2SIM_DATA_ROOT = join(root, '.data/demo') + delete env.DASHSCOPE_API_KEY + delete env.REAL2SIM_ASSET_ROOT + delete env.REAL2SIM_GENESIS_PACKAGE_ROOT + } else { + // Load once before spawning so Vite and the API share the same overrides. + dotenv.config({ path: join(root, '.env.local'), processEnv: env, quiet: true }) + dotenv.config({ path: join(root, '.env'), processEnv: env, quiet: true }) + } + return env +} diff --git a/scripts/dev-env.test.mjs b/scripts/dev-env.test.mjs new file mode 100644 index 0000000..87b0517 --- /dev/null +++ b/scripts/dev-env.test.mjs @@ -0,0 +1,48 @@ +import { mkdtemp, rm, writeFile } from 'node:fs/promises' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { afterEach, expect, test } from 'vitest' +import { loadDevEnvironment } from './dev-env.mjs' + +const roots = [] +afterEach(async () => { + for (const root of roots.splice(0)) await rm(root, { recursive: true, force: true }) +}) + +async function fixture() { + const root = await mkdtemp(join(tmpdir(), 'real2sim-dev-env-')) + roots.push(root) + await writeFile(join(root, '.env'), 'PORT=9981\nREAL2SIM_DATA_ROOT=/example/default\n') + await writeFile(join(root, '.env.local'), 'PORT=9982\nDASHSCOPE_API_KEY=fixture-only\n') + return root +} + +test('loads the same dotenv port for the API and Vite children', async () => { + const root = await fixture() + const env = loadDevEnvironment(root, false, {}) + expect(env.PORT).toBe('9982') + expect(env.REAL2SIM_DATA_ROOT).toBe('/example/default') +}) + +test('preserves explicit shell overrides without mutating them', async () => { + const root = await fixture() + const inherited = { PORT: '9983' } + expect(loadDevEnvironment(root, false, inherited).PORT).toBe('9983') + expect(inherited).toEqual({ PORT: '9983' }) +}) + +test('keeps demo data and credentials separate from dotenv and inherited settings', async () => { + const root = await fixture() + const env = loadDevEnvironment(root, true, { + DASHSCOPE_API_KEY: 'fixture-only', + REAL2SIM_DATA_ROOT: '/example/private', + REAL2SIM_ASSET_ROOT: '/example/private/assets', + REAL2SIM_GENESIS_PACKAGE_ROOT: '/example/private/packages', + }) + expect(env.REAL2SIM_DEMO).toBe('1') + expect(env.REAL2SIM_DATA_ROOT).toBe(join(root, '.data/demo')) + expect(env.DASHSCOPE_API_KEY).toBeUndefined() + expect(env.REAL2SIM_ASSET_ROOT).toBeUndefined() + expect(env.REAL2SIM_GENESIS_PACKAGE_ROOT).toBeUndefined() + expect(env.PORT).toBeUndefined() +}) diff --git a/scripts/dev.mjs b/scripts/dev.mjs index e21b1f4..21988d8 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -1,16 +1,10 @@ import { spawn } from 'node:child_process' import { fileURLToPath } from 'node:url' +import { loadDevEnvironment } from './dev-env.mjs' const root = fileURLToPath(new URL('../', import.meta.url)) const demo = process.argv.includes('--demo') -const env = { ...process.env } -if (demo) { - env.REAL2SIM_DEMO = '1' - env.REAL2SIM_DATA_ROOT = `${root}.data/demo` - delete env.DASHSCOPE_API_KEY - delete env.REAL2SIM_ASSET_ROOT - delete env.REAL2SIM_GENESIS_PACKAGE_ROOT -} +const env = loadDevEnvironment(root, demo) const children = [ spawn(process.execPath, ['--import', 'tsx', 'server/index.ts'], { cwd: root, env, stdio: 'inherit' }), spawn(process.execPath, ['node_modules/vite/bin/vite.js', '--host', '127.0.0.1'], { cwd: root, env, stdio: 'inherit' }),