The studio web app: the projects page and the four editors (flow, action, enhance and deforum). It runs on its own host, next to the main app (e-dream-ai/frontend), and uses the same backend and login.
The code it has in common with the main app comes from @infinidream/shared on npm (e-dream-ai/shared).
- Node 26 (see
.nvmrc; pnpm also downloads it to run the scripts) - pnpm 12 (see
packageManagerinpackage.json)
cp .env.example .env # then fill in the values
pnpm install
pnpm devStudio runs on http://localhost:5174.
Studio has no sign-in page of its own. It sends a logged-out visitor to the main app, so to log in locally you also need:
- the main app from
e-dream-ai/frontendonhttp://localhost:5173(pnpm devthere) - the backend, with
STUDIO_URL=http://localhost:5174in its env, so it accepts requests from studio
| Variable | Purpose |
|---|---|
VITE_BACKEND_URL |
API base URL, for example http://localhost:8080/api/v1 |
VITE_SOCKET_URL |
WebSocket URL, for example ws://localhost:8080 |
VITE_FRONTEND_URL |
Origin of the main app. Studio uses it for sign-in and links to main pages |
VITE_BUGSNAG_API_KEY |
Bugsnag error tracking |
VITE_GA_MEASUREMENT_ID |
Google Analytics |
VITE_GTM_ID |
Google Tag Manager |
A build fails when VITE_FRONTEND_URL is missing or is not an http(s) URL. The dev and preview servers fall back to http://localhost:5173.
pnpm dev # dev server on :5174
pnpm build # production build (tsc + vite build --mode prod) into dist
pnpm build:stage # staging build (vite build --mode stage)
pnpm serve # preview the build on :4174
pnpm test # vitest, single run
pnpm test:watch
pnpm type-check
pnpm lint
pnpm prettier:checkCI (.github/workflows/ci.yml) runs lint, type check, Prettier, tests and a build on every pull request and on pushes to main and stage.
Anything studio and the main app both need lives in @infinidream/shared. Change it in the shared repo; every merge to its main publishes a new patch version. Then take it here:
pnpm up @infinidream/shared --latestTo try a change before it is published, run pnpm build in a local clone of shared and link it with pnpm link ../shared. Undo the link with pnpm install before committing.
Cloudflare Pages builds this repo: build command pnpm build, output directory dist. The environment variables above are set per Pages project in the Cloudflare dashboard.