v0.3.0: structural refactor — go:embed templates, server split, domain rename
- Migrate all 7 HTML templates + CSS from Go string constants to individual go:embed files in internal/web/templates/ (templates.go: 2150→35 lines) - Split server.go into auth.go, handlers.go, funcmap.go (server.go: 540→120 lines) - Rename controller subdomain from dashboard.* to felhom.* in Traefik labels - Update documentation (CLAUDE.md, README.md, CONTEXT.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,14 @@ E:\git\deploy-felhom-compose\ (or /e/git/deploy-felhom-compose/ in Git Bash)
|
||||
│ │ ├── sync/ # Git sync — periodic pull of app catalog repo
|
||||
│ │ ├── api/ # REST API endpoints
|
||||
│ │ ├── system/ # System info (memory, disk)
|
||||
│ │ └── web/ # Dashboard UI (embedded HTML/CSS templates)
|
||||
│ │ └── web/ # Dashboard UI
|
||||
│ │ ├── server.go # Server struct, routing, static serving
|
||||
│ │ ├── auth.go # Session auth, login/logout handlers
|
||||
│ │ ├── handlers.go # Page handlers (dashboard, stacks, deploy, etc.)
|
||||
│ │ ├── funcmap.go # Template function map
|
||||
│ │ ├── embed.go # go:embed directive for templates
|
||||
│ │ ├── templates.go # Felhom logo SVG constant
|
||||
│ │ └── templates/ # go:embed HTML/CSS files (Hungarian UI)
|
||||
│ ├── Dockerfile
|
||||
│ ├── Makefile
|
||||
│ └── go.mod
|
||||
@@ -148,8 +155,8 @@ manually via the dashboard "Sablonok frissítése" button.
|
||||
|
||||
- **Language:** Go 1.22+
|
||||
- **Web framework:** stdlib `net/http` + `html/template` (no frameworks)
|
||||
- **Templates:** Embedded as Go string constants in `templates.go` (Hungarian UI)
|
||||
- **CSS:** Single embedded const in `templates.go` (no external CSS files)
|
||||
- **Templates:** go:embed HTML files in `internal/web/templates/` (Hungarian UI)
|
||||
- **CSS:** go:embed CSS file in `internal/web/templates/style.css`
|
||||
- **Auth:** bcrypt password hash + session cookies
|
||||
- **Container orchestration:** Docker Compose via CLI (`docker compose up -d`)
|
||||
- **Reverse proxy:** Traefik (separate stack, managed by controller)
|
||||
|
||||
Reference in New Issue
Block a user