Skip to content
e-dream-aiPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

infinidream studio

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).

Requirements

  • Node 26 (see .nvmrc; pnpm also downloads it to run the scripts)
  • pnpm 12 (see packageManager in package.json)

Run locally

cp .env.example .env   # then fill in the values
pnpm install
pnpm dev

Studio 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/frontend on http://localhost:5173 (pnpm dev there)
  • the backend, with STUDIO_URL=http://localhost:5174 in its env, so it accepts requests from studio

Environment variables

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.

Commands

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:check

CI (.github/workflows/ci.yml) runs lint, type check, Prettier, tests and a build on every pull request and on pushes to main and stage.

Shared code

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 --latest

To 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.

Deployment

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.

License

AGPL-3.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages