Feat: Agregar estructura PWA Nuxt4 y configuración de desarrollo

Configuración PWA:
- Agregar estructura completa de Nuxt4 para PWA
- Configurar .env.example con variables de entorno
- Preparar aplicación para instalación offline

Configuración Claude Code:
- Agregar .claude/ con settings y hooks
- Configurar entorno de desarrollo con Claude

CI/CD:
- Agregar .gitea/workflows para Gitea Actions
- Preparar pipeline de despliegue automático

Docker:
- Actualizar docker-compose.yml con servicios PWA
- Configurar networking entre servicios

Git:
- Actualizar .gitignore para excluir archivos de build
- Ignorar node_modules y archivos temporales
This commit is contained in:
2025-10-17 17:57:18 -06:00
parent b341cca989
commit d1aeb88409
53 changed files with 23586 additions and 36 deletions

View File

@@ -0,0 +1,40 @@
/**
* Endpoint para verificar membresía de grupo desde el backend
* Valida contra los headers de Authentik en el servidor
*/
export default defineEventHandler(async (event) => {
// Leer el body de la petición
const body = await readBody(event)
const { groupName } = body
if (!groupName || typeof groupName !== 'string') {
throw createError({
statusCode: 400,
statusMessage: 'Group name is required'
})
}
// Leer headers de Authentik
const headers = getHeaders(event)
const authentikGroups = headers['x-authentik-groups']
// Si no hay header de grupos, el usuario no está autenticado o no tiene grupos
if (!authentikGroups) {
return {
hasGroup: false,
groups: []
}
}
// Parsear los grupos (separados por |)
const userGroups = authentikGroups.split('|').filter(g => g.trim())
// Verificar si el usuario tiene el grupo solicitado
const hasGroup = userGroups.includes(groupName)
return {
hasGroup,
groups: userGroups,
checkedGroup: groupName
}
})