Sprint 6: JSON file persistence + real SSH terminal + V1 crypto/knownhosts integration

- go.mod replace directive for git.tukangketik.id/swanadiva/hostkeeper → ../../v1
- store/ package: JSON file persistence for hosts, snippets, keys, settings
  (~/Library/Application Support/hostkeeper/v2/)
- model SSH fields: Hostname, Port, Username, AuthType, Password, KeyID
- sshconn/ package: real SSH client via golang.org/x/crypto/ssh
- Terminal WS: real SSH connection with fallback to mock shell
- Dynamic host list in terminal (server-rendered JSON script tag)
- All mock data defaults removed from model packages
- Settings persist via store/settings.go
This commit is contained in:
swanadiva
2026-07-07 13:53:50 +07:00
parent 04d9cfb096
commit fd7361aa14
21 changed files with 746 additions and 306 deletions
+17 -11
View File
@@ -2,7 +2,7 @@
> **Purpose**: Memungkinkan AI agent berikutnya melanjutkan development tanpa mengulang atau merusak.
> **Last Updated**: 2026-07-07
> **Current Phase**: Sprint 1 + 2 + 3 + 4 + 5 selesai, Sprint 6 berikutnya
> **Current Phase**: Sprint 0—6 selesai (V2 HTMX feature complete)
---
@@ -20,7 +20,7 @@ hostkeeper/ (root — bersih untuk V2)
│ ├── go.mod module git.tukangketik.id/swanadiva/hostkeeper
│ ├── Makefile
│ └── PROJECT_STATE.md V1 full project state
├── app/ ← (BELUM DIBUAT) V2 backend GoFiber + views + static
├── app/ ← V2 backend GoFiber + views + static
├── mobile/ ← (BELUM DIBUAT) V2 mobile wrapper
├── template/ ← Referensi UI React (Lumina System) — hanya untuk desain
│ └── src/components/ 7 React screens
@@ -102,7 +102,7 @@ Alasan:
---
## 4. V2 Status — Sprint 1 Complete
## 4. V2 Status — Sprint 0—6 Complete
### ✅ Sudah Selesai
- Semua dokumentasi diupdate ke HTMX (10 file di `docs/`)
@@ -112,13 +112,11 @@ Alasan:
- 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 / In Progress
- **Sprint 2 (DONE)**: Snippets + Keychain
- **Sprint 3 (DONE)**: Settings + Brief
- **Sprint 4 (DONE)**: SFTP Dual-Pane
- **Sprint 5 (DONE)**: Terminal + xterm.js
- Sprint 6: Storage Integration
- **Sprint 2**: Snippets + Keychain CRUD, clipboard.js, utils.js
- **Sprint 3**: Settings + Brief, tabs, toggles, danger zone
- **Sprint 4**: SFTP Dual-Pane, breadcrumb, file icons by type, create/delete
- **Sprint 5**: Terminal + xterm.js + WebSocket mock shell, tab management
- **Sprint 6**: JSON file persistence (store package), `go.mod replace` directive for V1 crypto+knownhosts, model SSH fields, real SSH client for terminal (falls back to mock), dynamic host list from server
### 🐛 Bug Template (dari template/src/ — catatan saat implementasi)
1. **P0**: Missing CSS keyframes (fade-in, scale-up, slide-in) → tambah di `custom.css`
@@ -149,6 +147,15 @@ app/backend/
│ │ ├── host.go
│ │ ├── snippet.go
│ │ └── keychain.go
│ ├── store/ ← JSON file persistence (store package)
│ │ ├── store.go
│ │ ├── host.go
│ │ ├── snippet.go
│ │ ├── key.go
│ │ ├── settings.go
│ │ └── devices.go
│ ├── sshconn/ ← Real SSH client for terminal
│ │ └── client.go
│ ├── template/ ← Template helper funcs
│ └── middleware/ ← View data injection
├── static/
@@ -156,7 +163,6 @@ app/backend/
│ ├── js/ ← htmx.min.js, alpine.min.js, utils.js, clipboard.js, terminal.js
│ └── xterm/ ← xterm.js lib
└── views/ ← Semua template flat (tidak ada subfolder partials/)
├── layout.html
├── nav.html
├── index.html
├── host_list.html