┌─────────────────────────────┐ │ Browser │ │ HTML + HTMX + UI Kit │ └──────────────┬──────────────┘ │ HTTPS (TLS) │ ┌──────────────▼──────────────┐ │ GoFiber App │ ├─────────────────────────────┤ │ CORS Middleware │ │ Session Middleware │ │ CSRF (optional) │ │ Rate Limiter (Auth) │ └──────────────┬──────────────┘ │ ┌───────────────────▼───────────────────┐ │ Auth & Authorization │ │ - RequireAuth │ │ - RequireAdmin │ │ - Role validation │ └───────────────────┬───────────────────┘ │ ┌───────────────────▼───────────────────┐ │ Business Layer (Services) │ └───────────────────┬───────────────────┘ │ ┌───────────────────▼───────────────────┐ │ Repository Layer (GORM) │ └───────────────────┬───────────────────┘ │ ┌───────────────────▼───────────────────┐ │ Database │ │ - Users (bcrypt passwords) │ │ - Token hashes (SHA-256) │ │ - AuditLog │ └───────────────────────────────────────┘