Files
HostKeeper/docs/PROGRESS.md
T

203 lines
7.7 KiB
Markdown

# Hostkeeper V2 — Progress Tracker
> **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**: Sprint 0 + 1 selesai, Sprint 2 sedang dikerjakan.
---
## 1. Overview
Hostkeeper V2 is a Termius-like cross-platform SSH/SFTP management GUI application.
| Item | Value |
|------|-------|
| **Goal** | Build a free, open-source Termius alternative with full feature parity |
| **Desktop** | GoFiber backend + HTMX + xterm.js + Alpine.js |
| **Mobile** | Go mobile library + WebView wrapper (Android/iOS) |
| **Backend language** | Go 1.26 |
| **HTTP framework** | GoFiber v2 (fasthttp-based) |
| **Frontend** | HTMX + Alpine.js + xterm.js (minimal JS, server-rendered HTML) |
| **Styling** | TailwindCSS v4 + custom CSS (Lumina System) |
| **Desktop wrapper** | Electron (opsional — bisa lewat browser saja) |
| **Mobile wrapper** | gomobile + WebView |
| **V1 (existing)** | CLI/TUI SSH/SFTP manager — 105 tests, all passing. Frozen. |
**Keputusan arsitektur**: Migrasi dari React/SPA ke HTMX/server-rendered HTML.
Lihat [ARCHITECTURE_HTMX.md](ARCHITECTURE_HTMX.md) untuk detail.
---
## 2. Current Status Summary
| Item | Status |
|------|--------|
| Planning documents (HTMX) | DONE |
| 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 |
| Sprint 6 — Storage Integration | NOT STARTED |
---
## 3. Sprint Checklist (HTMX)
### 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 — 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 — `<select>` + `hx-get="/hosts?filter=..."`
- [x] View toggle (grid/list) — Alpine `x-data="{ view: 'grid' }"` + `x-show`
- [x] Add host modal (`views/host_modal.html`) — Alpine event-driven `$dispatch('open-modal')`
- [x] POST /hosts — create host via HTMX form swap
- [x] DELETE /hosts/:id — hx-delete with confirm
- [x] Background transfers panel — static placeholder in nav
- **Verify**: Homepage renders with 8 hosts, search+filter works, create+delete CRUD
### Sprint 2 — Snippets + Keychain
- [ ] Model Snippet + SnippetStore (`internal/model/snippet.go`)
- [ ] Model Key + KeyStore (`internal/model/keychain.go`)
- [ ] Snippets handler (`internal/handler/snippets.go`)
- [ ] Keychain handler (`internal/handler/keychain.go`)
- [ ] Snippets template (`views/snippets.html`)
- [ ] Snippet grid partial (`views/snippet_grid.html`)
- [ ] Snippet modal (`views/snippet_modal.html`)
- [ ] Keychain template (`views/keychain.html`)
- [ ] Key grid partial (`views/key_grid.html`)
- [ ] Key modal (`views/key_modal.html`)
- [ ] Clipboard JS (`static/js/clipboard.js`)
- [ ] Passphrase reveal + strength (`static/js/utils.js`)
- **Verify**: Both pages render, CRUD works, clipboard copies, passphrase reveal toggles
### Sprint 3 — Settings + Brief
- [ ] Model Device + Config
- [ ] Settings handler
- [ ] Brief handler
- [ ] Settings template
- [ ] Brief template
- [ ] Toggle switch JS
- [ ] Danger zone
### Sprint 4 — SFTP Dual-Pane
- [ ] Model FileItem + Transfer
- [ ] SFTP handler
- [ ] SFTP template with dual-pane layout
- [ ] Breadcrumb navigation
- [ ] Folder create + delete
- [ ] Toast notification
### Sprint 5 — Terminal + xterm.js
- [ ] Download xterm.js
- [ ] Terminal handler (page)
- [ ] WebSocket handler
- [ ] Terminal template
- [ ] Terminal JS (xterm init + WS)
- [ ] Tab management
- [ ] SSH pipe (mock)
### Sprint 6 — Data Store Integration
- [ ] replace directive go.mod
- [ ] Integrate v1/pkg/storage
- [ ] Integrate v1/pkg/config
- [ ] Integrate v1/pkg/crypto
- [ ] Integrate v1/pkg/knownhosts
- [ ] Real SSH via v1/pkg/ssh
- [ ] Real SFTP via v1/pkg/ssh
- [ ] Remove all mock data
---
## 4. Known Issues
| # | Issue | Severity | Status |
|---|-------|----------|--------|
| (none) | — | — | — |
---
## 5. Last Session Notes
| Date | What was done | Commits |
|------|---------------|---------|
| 2026-06-29 | V2 planning documents created (9 files) | — |
| 2026-07-07 | Sprint 0: GoFiber+HTMX scaffolding, TailwindCSS, layout, nav, health | `43a19b7` |
| 2026-07-07 | Sprint 1: Host model+store, dashboard CRUD, HTMX partials (grid/list, search, filter, modal, delete), transfers panel | `d771925`, `86620b0` |
| 2026-07-07 | Sprint 2 dimulai: Snippet + Keychain models created | — |
---
## 6. How to Continue
### For a new AI agent:
1. **Read this file** (`docs/PROGRESS.md`) — find the first `[ ]` item
2. **Read `AGENTS.md`** (root) — understand architecture, paths, rules
3. **Read the relevant spec doc** for the current sprint:
- Data models → `docs/DATA_MODELS.md`
- UI components → `docs/UI_COMPONENTS.md`
- Build pipeline → `docs/BUILD_SYSTEM.md`
4. **Read `docs/SPRINT_PLAN.md`** — detailed file-by-file task instructions
5. **Implement** in `app/backend/`
6. **Test**`cd app/backend && go build -o /dev/null .` then curl endpoints
7. **Update this file** — mark `[x]` completed tasks, update "Last Session Notes"
### For a returning AI agent:
1. **Read this file** — check "Last Session Notes" for context
2. **Check git log**`git log --oneline -10`
3. **Find the first `[ ]`** — that's where you continue
4. **Update this file** when done
---
## 7. Reference Documents Index
| Document | When to read |
|----------|-------------|
| `docs/PROGRESS.md` | Always (first) — know where to continue |
| `AGENTS.md` (root) | Architecture, paths, important rules |
| `docs/ARCHITECTURE_HTMX.md` | System design, component flow |
| `docs/ARCHITECTURE.md` | Summary + pointer to HTMX doc |
| `docs/SPRINT_PLAN.md` | Detailed file-by-file task instructions |
| `docs/API.md` | REST + WebSocket endpoint specs |
| `docs/DATA_MODELS.md` | Go struct definitions |
| `docs/UI_COMPONENTS.md` | HTMX partials / Alpine components |
| `docs/BUILD_SYSTEM.md` | Build pipeline (Go + CSS) |
| `docs/UI_TERMIUS_REFERENCE.md` | Visual layout reference |
| `docs/PERFORMANCE.md` | Performance & stability notes |
| `template/` dir | Visual reference only (Lumina System) |
---
## 8. Git History Reference
| Commit | Description |
|--------|-------------|
| `43a19b7` | Sprint 0 — GoFiber + HTMX + TailwindCSS v4 scaffolding |
| `d771925` | Sprint 1 — host model, mock store, dashboard CRUD, HTMX partials |
| `86620b0` | Sprint 1 final — delete host, Alpine modal events, grid/list toggle, transfers panel |
---
**IMPORTANT**: This file MUST be updated after every development session to ensure continuity.