update claude

This commit is contained in:
Chris Wanstrath 2026-01-30 11:36:04 -08:00
parent f1cf2b9291
commit f4e13dd932
2 changed files with 44 additions and 10 deletions

View File

@ -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(<h1>Content</h1>))
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] <app>`
Check `TODO.txt` for planned features
## Coding Guidelines

View File

@ -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