From f4e13dd932b4252d5fec449cd9632d5742fa036b Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Fri, 30 Jan 2026 11:36:04 -0800 Subject: [PATCH] update claude --- CLAUDE.md | 52 +++++++++++++++++++++++++++++++++++++++++++--------- README.md | 2 +- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 104643b..0e3af9b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,9 @@ ## What It Is -Personal web server framework that auto-discovers and runs multiple web apps on your home network. "Set it up, turn it on, forget about the cloud." +Personal web appliance that auto-discovers and runs multiple web apps on your home network. + +"Plug it in, turn it on, and forget about the cloud." ## How It Works @@ -13,17 +15,38 @@ Personal web server framework that auto-discovers and runs multiple web apps on ## Key Files -- `src/server/apps.ts` - **The heart**: app discovery, process management, lifecycle -- `src/server/index.tsx` - Entry point (minimal, just initializes Hype) -- `src/pages/index.tsx` - Dashboard UI +### Server (`src/server/`) +- `apps.ts` - **The heart**: app discovery, process management, health checks, auto-restart +- `api/apps.ts` - REST API for app lifecycle (start/stop/restart, logs, icons, rename) +- `api/sync.ts` - File sync protocol (manifest, push/pull, watch) +- `index.tsx` - Entry point (minimal, initializes Hype) +- `shell.tsx` - HTML shell for web UI + +### Client (`src/client/`) +- `components/` - Dashboard, Sidebar, AppDetail, Nav +- `modals/` - NewApp, RenameApp, DeleteApp dialogs +- `styles/` - Forge CSS-in-JS (themes, buttons, forms, layout) +- `state.ts` - Client state management +- `api.ts` - API client + +### CLI (`src/cli/`) +- `commands/manage.ts` - list, start, stop, restart, info, new, rename, delete, open +- `commands/sync.ts` - push, pull, sync +- `commands/logs.ts` - log viewing with tail support + +### Shared (`src/shared/`) +- `types.ts` - App, AppState, Manifest interfaces + +### Other - `apps/*/package.json` - Must have `"toes": "bun run --watch index.tsx"` script -- `TODO.md` - User-maintained task list (read this!) +- `TODO.txt` - Task list ## Tech Stack - **Bun** runtime (not Node) - **Hype** (custom HTTP framework wrapping Hono) from git+https://git.nose.space/defunkt/hype - **Forge** (typed CSS-in-JS) from git+https://git.nose.space/defunkt/forge +- **Commander** + **kleur** for CLI - TypeScript + Hono JSX ## Running @@ -36,7 +59,7 @@ bun run --hot src/server/index.tsx # Dev mode with hot reload ```tsx // apps/example/index.tsx -import { Hype } from "hype" +import { Hype } from "@because/hype" const app = new Hype() app.get("/", (c) => c.html(

Content

)) export default app.defaults @@ -48,12 +71,23 @@ export default app.defaults - Each app is isolated process with own dependencies - No path-based routing - apps run on separate ports - `DATA_DIR` env controls where apps are discovered +- Path aliases: `$` → server, `@` → shared, `%` → lib ## Current State -- Core infrastructure: ✓ Complete (discovery, spawn, watch, ports, UI) -- Apps: basic, profile (working); risk, tictactoe (empty) -- Check TODO.md for planned features +### Infrastructure (Complete) +- App discovery, spawn, watch, auto-restart with exponential backoff +- Health checks every 30s (3 failures trigger restart) +- Port pool (3001-3100), sticky allocation per app +- SSE streams for real-time app state and log updates +- File sync protocol with hash-based manifests + +### CLI +- Full management: `toes list|start|stop|restart|info|new|rename|delete|open` +- File sync: `toes push|pull|sync` +- Logs: `toes logs [-f] ` + +Check `TODO.txt` for planned features ## Coding Guidelines diff --git a/README.md b/README.md index 8cea5f9..81b3957 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Toes is a personal web server you run in your home. -Turn it on and forget about the cloud. +Plug it in, turn it on, and forget about the cloud. ## quickstart