64 lines
2.1 KiB
Markdown

# Local video-canvas test environment
This environment uses an isolated PGlite database and a fixed local test
account/project. It must never point `POSTGRES_URL` at a non-loopback host.
## Start the local database
```bash
pnpm db:local:video-canvas
```
The database listens on `127.0.0.1:15432`. Keep the process running while the
application and synchronization commands are in use.
## Synchronize server configuration
Create an SSH tunnel from local port `15433` to the server PostgreSQL port,
then run the initial exact copy:
```bash
pnpm db:sync:video-canvas
```
This copies AI providers, AI models, the video-canvas-related system settings,
tool configuration, storage configuration, and site settings. It also creates
the fixed local administrator account and an empty video-canvas project. The
script refuses a non-loopback destination and verifies every copied table by a
canonical SHA-256 digest.
After local competitor-matching settings have been saved, use the preservation
mode for later server model/configuration refreshes:
```bash
pnpm db:sync:video-canvas -- --preserve-video-canvas-config
```
This still refreshes providers, models, storage, site settings, and the other
selected server settings, but preserves the local
`video_canvas_function_config` row. The test user is updated in place so
administrator audit references do not break repeated synchronization.
## Fixed test records
- User ID: `00000000-0000-4000-8000-000000000101`
- Project ID: `00000000-0000-4000-8000-000000000201`
- Project URL: `/canvas/00000000-0000-4000-8000-000000000201`
Do not add server credentials, storage keys, or test-account passwords to this
document.
## Verification snapshot
On 2026-07-16, preservation-mode synchronization verified:
- 35 AI providers
- 30 AI models
- 4 storage configurations
- 20 selected system settings
- 1 site-settings row
- an authenticated administrator session and HTTP 200 video-canvas config
The local `video_canvas_function_config` digest was unchanged before and after
the refresh, and the fixed project was recreated with zero nodes and edges.