Skip to content

Admin portal scaffolding#57

Merged
victor-cuevas merged 9 commits intofeat/admin-portalfrom
feat/admin-portal-scaffolding
Mar 7, 2026
Merged

Admin portal scaffolding#57
victor-cuevas merged 9 commits intofeat/admin-portalfrom
feat/admin-portal-scaffolding

Conversation

@victor-cuevas
Copy link

No description provided.

- Entry point with YAML config, --config flag, and env var overrides
- SQLite store with migration framework (instances, users, audit_log, sessions)
- HTTP server with security headers (CSP, X-Frame-Options, etc.)
- SPA handler with embed.FS for single-binary distribution
- Makefile targets: build-admin, run-admin, build-admin-dev
- Vue 3 + Vite + Pinia + Vue Router with Vite proxy to Go backend
- Design system: CSS custom properties, BaseButton, BaseCard, BaseInput, StatusIndicator, BaseEmptyState
- App shell with sidebar nav, Fleet Dashboard and Audit Log routes
- WCAG AA contrast, keyboard focus styles, aria attributes
- Vitest + jsdom configured for testing
- Lint (Go + ESLint), test (Go + Vitest), build (Go + Vite)
- Path-scoped triggers on admin/** changes only
RetentionDays as int made it impossible to set retention_days: 0
(keep forever) in YAML — the zero value was indistinguishable from
omission and silently became 90.

Change to *int so nil means unset (gets default 90) while &0 means
explicitly keep forever. Add regression test.
- Fix gofmt import ordering in main.go (errors before flag)
- Add context.Context to store.Open and migrate for noctx compliance
- Use ExecContext/QueryRowContext/BeginTx throughout store package
- Extract parseDuration helper to reduce applyEnvOverrides complexity
- Split migrate into ensureMigrationsTable/currentSchemaVersion/applyMigration
- Add justifying comment to blank sqlite driver import
- Extract default config constants to eliminate goconst violations
- CI: use --version instead of --help || true for binary verification
- BaseInput: add aria-invalid and aria-describedby for screen readers
Add #nosec G304 annotation to admin config loader (path from trusted
sources: CLI flag, env var, or hardcoded default).

Explicitly discard db.Close() errors on cleanup paths in store.Open()
to satisfy G104 (CWE-703).
@victor-cuevas victor-cuevas marked this pull request as ready for review March 6, 2026 22:09
@victor-cuevas victor-cuevas changed the base branch from master to feat/admin-portal March 7, 2026 12:16
@victor-cuevas victor-cuevas merged commit 95d343c into feat/admin-portal Mar 7, 2026
17 checks passed
@victor-cuevas victor-cuevas deleted the feat/admin-portal-scaffolding branch March 7, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants