An AI agent
  • TypeScript 38.2%
  • Go 38.1%
  • Vue 19.9%
  • Nix 3.4%
  • HTML 0.4%
Find a file
Eli Ribble 516cab34bd
Some checks failed
Bundle / build (push) Failing after 6s
Update UI to load session history.
2026-06-05 19:53:35 +00:00
.forgejo/workflows Add nix path to workflow step 2026-06-01 21:56:08 +00:00
doc Add session's historical messages to session API 2026-06-05 19:28:30 +00:00
internal Add session's historical messages to session API 2026-06-05 19:28:30 +00:00
src Update UI to load session history. 2026-06-05 19:53:35 +00:00
.gitignore Add daemono golang build output to .gitignore 2026-06-04 16:28:05 +00:00
flake.lock Push the build to nix-cache 2026-05-20 13:39:56 +00:00
flake.nix fixup: Go backend + flake tweaks 2026-06-04 15:52:51 +00:00
go.mod Create initial implementation of streaming API 2026-06-04 18:49:33 +00:00
go.sum Create initial implementation of streaming API 2026-06-04 18:49:33 +00:00
index.html Initial "Hello World" for this project 2026-05-19 22:42:45 +00:00
main.go Modify SSE to be single connection by client, not by session 2026-06-04 21:04:37 +00:00
package-lock.json Initial integration between UI and API 2026-06-04 19:59:11 +00:00
package.json Initial integration between UI and API 2026-06-04 19:59:11 +00:00
README.md Add API design. 2026-06-04 17:28:41 +00:00
tsconfig.json Initial "Hello World" for this project 2026-05-19 22:42:45 +00:00
vite.config.ts Create initial application layout. 2026-06-04 16:26:09 +00:00

Daemono

A web frontend for pi-like agents. It has sparkles. And unicorns.

API

See doc/api.md for the backend API design.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (comes with Node.js)

Setup

npm install

Development

Start both the Go backend and the Vite dev server. Vite proxies /api requests to the backend so you get hot-reload for the frontend and live API responses:

# Terminal 1 — Go backend
go run main.go               # listens on :8081

# Terminal 2 — Vite dev server (proxies /api → :8081)
npm run dev                  # listens on :5173

Production Build

Compile into a static bundle ready for a web server:

npm run build

This runs TypeScript type-checking (vue-tsc) followed by vite build. The output lands in the dist/ directory:

dist/
├── index.html
├── assets/
│   ├── index-<hash>.js
│   └── index-<hash>.css

Serving the Bundle

Point any static web server at the dist/ directory.

Quick local test

npm run preview          # Vite's built-in preview server

Python

python3 -m http.server 8081 -d dist

nginx

server {
    listen 80;
    server_name example.com;
    root /path/to/daemono/dist;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

Caddy

example.com {
    root * /path/to/daemono/dist
    file_server
}

Apache

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /path/to/daemono/dist
    <Directory /path/to/daemono/dist>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.html [L]
    </Directory>
</VirtualHost>

The try_files / rewrite rules above ensure client-side routing works by falling back to index.html for any unmatched paths.

Nix Build

A flake.nix is provided that packages the bundle as a Nix derivation.

First build — lock the dependency hash

The placeholder hash in flake.nix needs to be replaced with the real one:

nix build 2>&1 | grep 'got:' | awk '{print $2}'

Take the sha256-... value that Nix reports and replace npmDepsHash in flake.nix with it. Then nix build will succeed.

Subsequent builds

nix build           # outputs ./result -> /nix/store/...-daemono-0.1.0/
ls result/          # index.html  assets/

The bundle is the derivation output — ready to be served by any web server.

Development shell

nix develop         # drops into a shell with Node.js 22
npm run dev

CI (Forgejo Actions)

The workflow at .forgejo/workflows/bundle.yaml runs on every push and pull request to main:

  1. Checks out the repository
  2. Installs Nix via cachix/install-nix-action
  3. Runs nix build
  4. Uploads the result/ directory as a job artifact (daemono-bundle)