feat: add auth, RBAC, admin panel, and JWT-protected routes

This commit is contained in:
neon
2026-01-12 15:05:39 -06:00
parent 015028240c
commit 45f7c73ecb
109 changed files with 3813 additions and 180 deletions
+42
View File
@@ -0,0 +1,42 @@
export interface Permission {
id: number
name: string
description?: string
isSystem: boolean
}
export interface Role {
id: number
name: string
description?: string
isSuperuser: boolean
isSystem: boolean
permissions: Permission[]
}
export interface AuthUser {
id: number
username: string
name: string
email?: string
active: boolean
isDefaultPassword: boolean
settings: Record<string, unknown>
roles: Role[]
permissions: string[] // flat list; '*' means superuser
}
export interface AuthResponse {
accessToken: string
user: AuthUser
}
export interface RefreshResponse {
accessToken: string
}
export interface Session {
id: number
createdAt: string
expiresAt: string
}
+1
View File
@@ -0,0 +1 @@
export * from './auth'