Daemion docs

How do I build an app?

~10 minutes
Prerequisites: Running gateway, Node.js 22+

Apps in Daemion are Vite projects — not raw HTML files. Daemion scaffolds a full Vite project, registers it as an extension, and manages the dev server lifecycle for you.

Apps are created through chat. Daemion scaffolds the project, registers the extension, and starts the dev server. You open it in a browser.

Build an app by chatting

Describe what you want — Daemion creates the project:

text

You: Build me a project dashboard that shows open tasks, recent activity, and team status

Daemion: I’ll scaffold a Vite + React project dashboard. Give me a moment…

✓ Created app: project-dashboard (fullstack) ✓ Registered as extension ext_09def789 ✓ Dev server available at /apps/project-dashboard/dev/

Start it with: POST /apps/project-dashboard/start

The app is scaffolded as a Vite project under workspace/apps/project-dashboard/ and registered in the extensions table with type: app and subtype: fullstack.

App subtypes

The AppDefinitionSchema supports five subtypes:

SubtypeDescription
fullstackVite + React project with a dev server
interactiveVite project, interactive only (no backend)
htmlStatic HTML rendered in the artifact panel
chartData visualization rendered inline
markdownRendered markdown document

Only fullstack and interactive subtypes run a dev server. The others render directly in the chat interface.

Start the dev server

POST /apps/:name/start Auth required

Start the Vite dev server for this app. Allocates a port in the 5173-5273 range, waits for startup, and returns the port and PID.

Parameter Type Description
name REQUIRED string (path) The app extension name.
bash

curl -X POST http://localhost:3001/apps/project-dashboard/start
-H “Authorization: Bearer $DAEMION_TOKEN”

Response:

{“port”: 5173, “pid”: 84291, “status”: “running”}

The gateway proxies the app at /apps/project-dashboard/dev/ — open that path in your browser, whether locally or over Tailscale.

Check status and stop

bash

Status

curl http://localhost:3001/apps/project-dashboard/status
-H “Authorization: Bearer $DAEMION_TOKEN”

Stop

curl -X POST http://localhost:3001/apps/project-dashboard/stop
-H “Authorization: Bearer $DAEMION_TOKEN”

Status values: running, stopped, starting, crashed.

Iterate in chat

Once the app is running, keep chatting to refine it. Daemion edits the Vite project files directly and the dev server hot-reloads:

text

You: Add a dark mode toggle and make the task list sortable by due date

Daemion: Updated project-dashboard — added a theme toggle in the header and sortable columns on the task list. Hot reload should have picked it up.


Common questions

Q Where are app files stored?
Under workspace/apps/<name>/ relative to the project root. Each app is a standard Vite project — package.json, src/, vite.config.ts.
Q Can I access the app remotely?
Yes. The gateway proxies all app traffic through /apps/:name/dev/, so it's reachable over Tailscale at your machine's Tailscale hostname. See remote access.
Q What port does the dev server use?
The runtime allocates the first available port between 5173 and 5273, skipping any already claimed by other running apps.
Q What if the dev server crashes?
Status becomes crashed. Call POST /apps/:name/restart to restart, or ask Daemion to check the logs and fix the error.
Q Can I ship the app beyond my dev machine?
Apps are local Vite projects — run npm run build inside the app directory and deploy the dist/ folder anywhere. Daemion manages the dev lifecycle, not production deploys.

What can go wrong

App startup errors

404 &#123;"error": "app not found", "name": "..."&#125; — No extension with that name and type: app is registered. Check GET /extensions?type=app for the correct name.

500 dev server crashed during startup — The Vite project likely has a dependency error. Ask Daemion to check the app directory and run npm install inside it.

Port conflict — If all 100 ports in the 5173-5273 range are claimed, start returns an error. Stop unused apps first with POST /apps/:name/stop.


What’s next?