Launcher, proxy and Claude Code assistant overlay for the storytold craft web apps
350
A front door for the storytold craft apps (PhotoCraft, VectorCraft, LightCraft, FilmCraft, EffectCraft and the rest) with an AI assistant built in.
/<app>/ from its own container, by URL or port./model, /effort, /mode,
/clear, /compact, /help).claude mcp add command, so a Claude Code session or a claude.ai connector can drive several
tabs and apps at once.Works from any browser, an iPad included: the app runs in the tab, Claude runs on the server.
browser ──▶ craft-ai-hub ──▶ /<app>/ app containers (hayone/<app>:remote)
│ ──▶ /_relay/… craft-mcp: the tab's WebSocket and the MCP endpoints
└─ chat: Claude Code ──MCP──▶ craft-mcp ──▶ app CLI ──▶ the user's tab
:remote app images (built in hayone1/Docker_Images)
add the page API and MCP connector the overlay uses. Apps without them still open from the
launcher, without the assistant.Pick an example, copy its .env.example to .env, fill it in, and docker compose up -d:
| Example | For |
|---|---|
| basic-auth | Trying it out: everything on one machine, user names and passwords in BASIC_AUTH |
| caddy-https | Your own domain with automatic HTTPS (Caddy, Let's Encrypt) and basic auth |
| oauth2-proxy | Sign-in with your OpenID Connect provider (Google, Entra, Keycloak, Authentik, …) through oauth2-proxy |
| cloud-storage | Sign-in through craft-mcp plus personal and shared cloud folders in an S3 bucket, for Open and Save |
| external-apps | Apps that already run elsewhere (other ports or servers): just the hub and the relay |
| kubernetes | The hub, the relay and an app as Deployments, behind an Ingress |
Each one publishes only the front door; the apps and the relay stay on the private network.
Chat runs on Claude subscription tokens from Claude Code. Create one on any computer signed in to Claude Code (Pro or Max plan):
claude setup-token
CHAT_TOKENS decides whose account a chat uses:
CHAT_TOKENS | |
|---|---|
personal | Everyone adds their own token in the overlay's Account tab. The default without a shared token. |
both | Their own token if they added one, otherwise the hub's CLAUDE_CODE_OAUTH_TOKEN. The default with one. |
shared | Everyone uses CLAUDE_CODE_OAUTH_TOKEN. |
off | No in-app chat; the Connect tab still works. |
A personal token stays in that person's browser: the hub encrypts it (AES-GCM, HUB_SECRET) into
an HttpOnly cookie that only /_hub/ receives, so neither the apps' scripts nor the hub's disk
ever hold it. People set it up once per browser, from a computer, and then chat from anywhere,
an iPad included.
| Variable | Default | |
|---|---|---|
APPS | (required) | name=url pairs: photocraft=http://photocraft:8080,vectorcraft=http://localhost:8082. Order is the launcher's. |
RELAY_URL | craft-mcp's internal URL. Without it there is no assistant. | |
MCP_KEY | The same value craft-mcp has. craft-mcp's PUBLIC_HOST must be <hub origin>/_relay. | |
CHAT_TOKENS | personal, or both with a shared token | Whose Claude account chats use (see above). |
CLAUDE_CODE_OAUTH_TOKEN | The hub's shared token. | |
HUB_SECRET | derived from MCP_KEY | Encrypts personal tokens. Changing it signs every browser's token out. |
CHAT_MODEL, CHAT_EFFORT | Claude Code's | Defaults when the composer leaves them on Default and Auto. |
CHAT_MODELS | Opus, Sonnet, Haiku 5.5, Fable 5.1 | The composer's model menu, as JSON [{"value": "<model id>", "label": "<name>"}]. |
BASIC_AUTH | user:password pairs, comma separated. | |
REQUIRE_SIGN_IN | false | true signs people in through craft-mcp's own OpenID Connect client (its AUTH_* settings). |
PUBLIC_ORIGIN | from the request | https://<host>, used for the sign-in callback. |
PORT | 8080 |
Choose one:
/_relay/ through without sign-in: MCP clients and the tab's WebSocket
authenticate with their relay key, and claude.ai connectors can't sign in.BASIC_AUTH: built in. /_relay/ and /healthz stay open for the same reason.REQUIRE_SIGN_IN: if craft-mcp already signs people in for cloud storage, the hub can use
that session. Register <hub origin>/_storage/callback with the provider.Keep the hub private. Claude subscription tokens are for personal use: with a shared token, every chat on the hub uses that one plan.
| Path | |
|---|---|
/ | Launcher |
/<app>/… | The app, with the overlay injected into its pages |
/<app>/_assistant/session | Mints the tab's relay key (craft-mcp /mint) |
/<app>/_storage/…, /_storage/… | craft-mcp cloud storage and its sign-in |
/_relay/… | craft-mcp: the tab's WebSocket, /<key>/<app>/mcp |
/_hub/overlay.js, /_hub/chat, /_hub/chat/permission, /_hub/token | The overlay, its chat and permission answers, and the person's own token |
/healthz | Health check |
npm install
APPS=photocraft=http://localhost:4101 node server.mjs
Node 22. No build step: server.mjs (proxy, launcher, auth), chat.mjs (Claude Code),
public/overlay.js (the overlay).
MIT. The craft apps themselves are © their authors under their own licenses (MIT or Apache-2.0); see storytold.
Content type
Image
Digest
sha256:540770d5e…
Size
302 MB
Last updated
6 days ago
docker pull hayone/craft-ai-hub