feat: implement Havenllo single-board kanban (Go+SQLite backend, Preact/Vite frontend)
Some checks failed
Build and deploy Havenllo / Verify Go and frontend (push) Failing after 7s
Build and deploy Havenllo / Build and push image (push) Has been skipped
Build and deploy Havenllo / Apply and restart Havenllo (push) Has been skipped

- Single fixed 'Haven' board: lists (To do/In progress/Done) + cards, no multi-board
- Go 1.24 backend, CGO-free modernc.org/sqlite, embedded SPA, REST /api
- Preact + Vite + TS frontend, native HTML5 drag-and-drop, optimistic UI, dark Haven theme
- PVC (nfs-client) for SQLite, root container on NFS, simple nginx ingress havenllo.haven
- Dockerfile multi-arch build, Gitea CI via pipeline-actions@main
This commit is contained in:
Hermes
2026-07-14 10:13:51 -03:00
commit 041c3fab4b
44 changed files with 5931 additions and 0 deletions

42
internal/domain/models.go Normal file
View File

@@ -0,0 +1,42 @@
package domain
import "errors"
var (
ErrNotFound = errors.New("resource not found")
ErrLastList = errors.New("the last remaining list cannot be deleted")
)
// ValidationError represents a user-correctable domain validation failure.
type ValidationError struct{ Message string }
func (e ValidationError) Error() string { return e.Message }
type List struct {
ID int64 `json:"id"`
Name string `json:"name"`
Position float64 `json:"position"`
CardCount int `json:"card_count,omitempty"`
}
type Card struct {
ID int64 `json:"id"`
ListID int64 `json:"list_id"`
Title string `json:"title"`
Description string `json:"description"`
Position float64 `json:"position"`
Done bool `json:"done"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type ListWithCards struct {
ID int64 `json:"id"`
Name string `json:"name"`
Position float64 `json:"position"`
Cards []Card `json:"cards"`
}
type Snapshot struct {
Lists []ListWithCards `json:"lists"`
}