No description
  • Python 67.9%
  • TypeScript 25.5%
  • JavaScript 3.5%
  • Dockerfile 1.5%
  • CSS 1.4%
  • Other 0.2%
Find a file
2026-08-19 01:16:58 +02:00
backend first commit 2026-08-19 01:16:58 +02:00
docs/design first commit 2026-08-19 01:16:58 +02:00
frontend first commit 2026-08-19 01:16:58 +02:00
infra first commit 2026-08-19 01:16:58 +02:00
runner first commit 2026-08-19 01:16:58 +02:00
.env.example first commit 2026-08-19 01:16:58 +02:00
.gitignore first commit 2026-08-19 01:16:58 +02:00
AGENTS.md first commit 2026-08-19 01:16:58 +02:00
compose.yaml first commit 2026-08-19 01:16:58 +02:00
README.md first commit 2026-08-19 01:16:40 +02:00

Adaptive Workspace

A private, invite-only generative workspace. Gemini produces complete interactive HTML/CSS/JS applications while a trusted FastAPI and React control plane protects authentication, encrypted user API keys, assets, revision history, exports, and browser capabilities.

Current capabilities

  • Invite-only accounts and encrypted per-user Gemini API keys.
  • Full-document generation plus safe file and named-region patches.
  • Signed, cross-origin workspace launches with a versioned host bridge.
  • Interactive overlays, file assets, mediated web/video search, downloads, and prompt callbacks.
  • Pinned Plotly, D3, Three.js, Leaflet, Monaco, and browser OpenSCAD runtimes.
  • Immutable revisions, rollback, idempotent runs, Python data processing, and ZIP export.
  • Six semantic 16-color themes: Graphite Ice, Nord, Gruvbox Dark, Solarized Dark, Dracula, and Tokyo Night.

Generated code is intentionally powerful. It runs in a separate workspace origin in production, but approved third-party code can still read and transmit workspace content. Do not use sensitive datasets or secrets.

Local development

cd backend
uv sync
export BOOTSTRAP_INVITE=change-this-invite
export WORKSPACE_ORIGIN=http://workspace.localhost:5173
.venv/bin/uvicorn app.main:app --reload
cd frontend
npm install
npm test
npm run dev

The host opens at http://localhost:5173; generated workspaces launch at http://workspace.localhost:5173. Modern browsers resolve *.localhost automatically. Choose Have an invite? Create account, use BOOTSTRAP_INVITE, then store a Gemini key in Settings. The selected 16-color theme is persisted in browser storage and applied to both host and generated content.

The backend creates .credential-master-key once and reuses it. Do not delete or replace it while encrypted credentials exist; if decryption fails, save the Gemini key again. Production requires a stable CREDENTIAL_MASTER_KEY. OpenSCAD's first browser load is relatively large because its pinned WASM runtime is served locally.

Generated revisions from the earlier single-file renderer remain exportable but are not executed in runtime v2. Create a new prompt to migrate a workspace to the required index.html, styles.css, and script.js bundle.

Docker deployment

cp .env.example .env
openssl rand -base64 32
docker compose --profile build build
docker compose up -d

Put the generated master key in .env, change all example passwords, configure TLS/domain names in infra/Caddyfile, and create a first invite before exposing the service. The application is available at http://localhost:8080 with the example configuration.

Verification

cd backend && .venv/bin/pytest && .venv/bin/ruff check app tests
cd frontend && npm test && npm run build
docker compose config -q