33d2cc2bcb6ee63743a22b6b0768a5fe41311cea
SAM Portal (Portal IT)
Índice de aplicaciones SAM + portal de gestión IT. Next.js 16 + Bootstrap 5 + Boxicons.
- Índice público: https://sam.devops.norteamericano.cl (aplicaciones integradas por sección)
- Portal IT (login): https://it.sam.devops.norteamericano.cl (tablero, gestión y tableros por módulo)
Rutas
| Ruta | Auth | Descripción |
|---|---|---|
/ |
no | Índice: módulos visibles por sección |
/login |
no | Ingreso IT (estilo legacy, USUARIO=idUsuario + CLAVE) |
/tablero |
sí | Tablero IT: estado global, carga por app (docker stats), servicios base |
/m/:name |
sí | Tablero del módulo (Portal IT redirige al tablero) |
/upload |
sí | Integrar módulo (categoría, tipo, visibilidad) |
/actualizar |
sí | Redeploy + webhook + toggle visibilidad |
/eliminar |
sí | Baja de módulos (con/sin código) |
/api/modules, /api/stats |
no/sí | Proxy al deployer (token server-side) |
/api/deployer/* |
sí | Proxy genérico al deployer |
/api/auth, /api/me |
— | Sesión HMAC 12h en cookie httpOnly |
Auth IT
Login contra el backend (POST /api/Auth/it-login, tabla sige_sam_v3.usuario,
clave en texto plano o SHA256) + allowlist IT_USERS (solo esos correos entran).
# Env del contenedor (las inyecta el deployer al registrar)
DEPLOYER_URL=http://sam-deployer:3010
DEPLOYER_TOKEN=<token>
NEXT_PUBLIC_API_URL=https://api.devops.norteamericano.cl
IT_USERS=cgaray@norteamericano.cl,fmena@norteamericano.cl,jallende@norteamericano.cl
IT_SESSION_SECRET=<openssl rand -hex 24>
Desarrollo
npm install
npm run dev # http://localhost:3000
npm run lint && npm run build
El deploy a producción (.4) es vía push a main del repo + rebuild del
contenedor (portal-frontend). El módulo está registrado en el deployer
(categoría sam, subdominio sam); sus pushes ya no autodespliegan solos
(ver deployer state.json en .4).
Languages
TypeScript
94.6%
CSS
4.7%
JavaScript
0.4%
Dockerfile
0.3%