diff --git a/AGENTS.md b/AGENTS.md index 683e9c2..72b7d63 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,16 +2,7 @@ ## Project Overview -Dockify is a self-hosted Docker app deployment platform. Single Go binary with embedded web UI, SQLite database, SSH-based worker management, Caddy reverse proxy integration, and Cloudflare DNS automation. - -## Tech Stack - -- **Language:** Go 1.25+ -- **Database:** SQLite via `modernc.org/sqlite` (pure Go, no CGo) -- **Router:** `github.com/go-chi/chi/v5` -- **SSH:** `golang.org/x/crypto/ssh` -- **Web UI:** Go `html/template` + HTMX (embedded via `embed`, no build step) — fully custom CSS, no framework -- **Docker:** Multi-stage build, published to `ghcr.io/coderbuzz/dockify` +Dockify is a self-hosted Docker app deployment platform — single Go binary, SQLite, SSH workers, Caddy + Cloudflare automation. Full project reference: `SPEC.md`. ## Build @@ -21,167 +12,27 @@ go build -o dockify ./cmd/dockify ./dockify version # print version ``` -## Project Structure - -``` -cmd/dockify/main.go # entry point, wires dependencies -internal/ - config/config.go # env var config - db/db.go + schema.sql # SQLite setup + schema - ssh/client.go # SSH client (connect, exec, write file) - server/ # VM/Server CRUD, resource monitoring - app/ # App CRUD, deploy/undeploy/redeploy/rollback - caddy/client.go # Caddy Admin API via SSH - cloudflare/client.go # Cloudflare DNS API v4 - webhook/handler.go # GitHub + GitLab webhook handler - scheduler/scheduler.go # Auto-select least-loaded VM - http/ # Chi router, templates (embedded), renderer - templates/ # HTML templates (custom CSS + HTMX) -scripts/ - install.sh # One-liner install script - setup-worker.sh # Generate SSH key on worker, output for Dockify UI - update.sh # Auto-detect mode, download & restart latest - release.sh # Version bump + tag helper -Dockerfile # Multi-stage Docker build -docker-compose.yml # Dockify + Caddy reverse proxy -.github/workflows/build.yml # CI: vet, test, build binary + Docker, release on tag -``` - -## UI Style Guide - -### Typography -- **Font:** `"Berkeley Mono", "IBM Plex Mono", ui-monospace, monospace` -- **Base size:** 15px -- **Line height:** 1.5 -- **Headings:** weight 600, sizes: h1=1.35em, h2=1.1em - -### Color System -All colors are defined as CSS custom properties in `:root` (light) and `html.dark` (dark) in `internal/http/templates/layout.html`. - -| Token | Light | Dark | -|---|---|---| -| `--bg` | `#f5f5f5` | `#0d0d0d` | -| `--bg-elevated` | `#fff` | `#141414` | -| `--bg-card` | `#fff` | `#1a1a1a` | -| `--border` | `#d4d4d4` | `#2a2a2a` | -| `--text` | `#1a1a1a` | `#cfcecd` | -| `--text-muted` | `#666` | `#888` | -| `--link` | `#2563eb` | `#8ab4f8` | - -Status colors: `--green`, `--red`, `--yellow`, `--orange` (both themes). - -### Dark/Light Mode -- Default: light (`` without class) -- Dark: `` -- Toggle button in nav uses `localStorage('dockify-theme')` -- Icons: ☀ (light mode toggle button), ☾ (dark mode toggle button) - -### Component Patterns - -**Nav:** `