diff --git a/AGENTS.md b/AGENTS.md index 38ca7d8..a792077 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ > **Purpose**: Memungkinkan AI agent berikutnya melanjutkan development tanpa mengulang atau merusak. > **Last Updated**: 2026-07-07 -> **Current Phase**: Pre-development (documentation updated, scaffolding not yet started) +> **Current Phase**: Sprint 1 selesai, Sprint 2 sedang dikerjakan --- @@ -102,7 +102,7 @@ Alasan: --- -## 4. V2 Status — Pre-Development +## 4. V2 Status — Sprint 1 Complete ### ✅ Sudah Selesai - Semua dokumentasi diupdate ke HTMX (10 file di `docs/`) @@ -110,9 +110,15 @@ Alasan: - Root dibersihkan — V1 di `v1/`, V2 siap dimulai di `app/` - `template/` tetap sebagai referensi desain (warna, layout, spacing) - Bug template sudah diidentifikasi (animasi CSS, w-4.5, error boundary, dll) +- **Sprint 0**: GoFiber v2 server + HTMX + Alpine.js + TailwindCSS v4 + custom CSS + layout + nav + health endpoint +- **Sprint 1**: Host model (8 mock hosts), dashboard CRUD, search/filter HTMX, grid/list Alpine toggle, add host modal (Alpine events), delete host (hx-delete), transfers panel -### ❌ Belum Dimulai -- `app/backend/` — GoFiber v2 server + handler + views +### ❌ Belum Dimulai / In Progress +- **Sprint 2 (IN PROGRESS)**: Snippets + Keychain +- Sprint 3: Settings + Brief +- Sprint 4: SFTP Dual-Pane +- Sprint 5: Terminal + xterm.js +- Sprint 6: Storage Integration ### 🐛 Bug Template (dari template/src/ — catatan saat implementasi) 1. **P0**: Missing CSS keyframes (fade-in, scale-up, slide-in) → tambah di `custom.css` @@ -123,7 +129,7 @@ Alasan: --- -## 5. Struktur Folder V2 (Target) +## 5. Struktur Folder V2 (Aktual) ``` app/backend/ @@ -132,24 +138,39 @@ app/backend/ ├── internal/ │ ├── handler/ ← HTTP handlers (render HTML) │ │ ├── dashboard.go -│ │ ├── terminal.go -│ │ ├── sftp.go │ │ ├── snippets.go │ │ ├── keychain.go +│ │ ├── terminal.go +│ │ ├── sftp.go │ │ ├── settings.go │ │ ├── brief.go │ │ └── health.go │ ├── model/ ← Go structs (Host, Snippet, Key, dll) +│ │ ├── host.go +│ │ ├── snippet.go +│ │ └── keychain.go │ ├── template/ ← Template helper funcs │ └── middleware/ ← View data injection ├── static/ │ ├── css/ ← output.css + custom.css -│ ├── js/ ← htmx.min.js, alpine.min.js, utils.js, terminal.js +│ ├── js/ ← htmx.min.js, alpine.min.js, utils.js, clipboard.js, terminal.js │ └── xterm/ ← xterm.js lib -└── views/ +└── views/ ← Semua template flat (tidak ada subfolder partials/) ├── layout.html + ├── nav.html ├── index.html - └── partials/ ← ~17 partial HTML files + ├── host_list.html + ├── host_modal.html + ├── snippets.html + ├── snippet_grid.html + ├── snippet_modal.html + ├── keychain.html + ├── key_grid.html + ├── key_modal.html + ├── terminal.html + ├── sftp.html + ├── settings.html + └── brief.html ``` --- diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 6f00bc5..c9e1ebf 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -3,7 +3,7 @@ > **Purpose**: Enable seamless continuation of development by any agent/LLM across sessions. > **How to use**: Read this file first. Find the first unchecked `[ ]` item. That's where you continue. > **Last Updated**: 2026-07-07 -> **Status**: Documentation complete, Sprint 0 not started. +> **Status**: Sprint 0 + 1 selesai, Sprint 2 sedang dikerjakan. --- @@ -34,9 +34,9 @@ Lihat [ARCHITECTURE_HTMX.md](ARCHITECTURE_HTMX.md) untuk detail. | Item | Status | |------|--------| | Planning documents (HTMX) | DONE | -| Sprint 0 — Setup GoFiber + HTMX | NOT STARTED | -| Sprint 1 — Dashboard + Host List | NOT STARTED | -| Sprint 2 — Snippets + Keychain | NOT STARTED | +| Sprint 0 — Setup GoFiber + HTMX | DONE | +| Sprint 1 — Dashboard + Host List | DONE | +| Sprint 2 — Snippets + Keychain | IN PROGRESS | | Sprint 3 — Settings + Brief | NOT STARTED | | Sprint 4 — SFTP Dual-Pane | NOT STARTED | | Sprint 5 — Terminal + xterm.js | NOT STARTED | @@ -44,234 +44,86 @@ Lihat [ARCHITECTURE_HTMX.md](ARCHITECTURE_HTMX.md) untuk detail. --- -## 3. Sprint Checklist +## 3. Sprint Checklist (HTMX) -### Sprint 0 — Project Scaffolding (Day 0) -- [ ] Create `app/backend/` directory with Go module (`go mod init`) -- [ ] Install GoFiber v2 + dependencies in `go.mod` -- [ ] Create `app/backend/main.go` — minimal fiber server (port 0 for random) -- [ ] Create `app/frontend/` with Vite + React + TypeScript -- [ ] Create `app/electron/` with Electron shell -- [ ] Electron spawns Go backend as child process on startup -- [ ] Electron loads web UI from localhost (Go serve frontend dist) -- [ ] Create `app/backend/middleware/` — CORS, logging, recover, compress -- [ ] Create `app/backend/bridge/` directory (placeholder handlers) -- [ ] Create `app/backend/ws/` directory (placeholder handlers) -- [ ] Build script: `scripts/build.sh` — Go build → frontend build → Electron package -- [ ] Verify: `npm run dev` opens Electron window with "Hostkeeper V2" title -- [ ] Verify: Go server responds at `localhost:PORT/api/health` +### Sprint 0 — Setup GoFiber + HTMX +- [x] Go module init (`app/backend/go.mod`) +- [x] Install GoFiber v2 + deps +- [x] Minimal Fiber server (`main.go`) — port 1947 +- [x] Static files serving (`/static/`) +- [x] HTML template engine (html/template via gofiber/template) +- [x] Download HTMX + Alpine.js (`static/js/`) +- [x] Setup TailwindCSS v4 — `input.css` → `output.css` +- [x] Custom CSS (Lumina) — dot-grid, glassmorphism, keyframes, toggle, modal, x-cloak +- [x] Layout template (`views/layout.html`) — sidebar + header + main +- [x] Nav template (`views/nav.html`) — nav items with active state +- [x] Index + routing (`views/index.html` + `handler/dashboard.go`) +- [x] Health endpoint (`handler/health.go`) +- **Verify**: `curl :1947/api/health` → `{"app":"hostkeeper-v2","status":"ok"}` -### Sprint 1 — Foundation (Day 1-5) +### Sprint 1 — Dashboard + Host List +- [x] Model Host + HostStore (`internal/model/host.go`) — mock data (8 hosts) +- [x] Dashboard handler — full page render (`handler/dashboard.go`) +- [x] Host list partial (`views/host_list.html`) — cards + list view +- [x] Search HTMX — `hx-get="/hosts?q=..." hx-trigger="keyup delay:200ms"` +- [x] Filter status — `