You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm install
cp .env.example .env
# Set DB_HOST, DB_USER, DB_PASSWORD, etc.
npm start
API Reference / Referencia de la API
Base: /api/v1
Authentication / Autenticación
Include API key as / Incluir clave API como:
Authorization: Bearer <key>
x-api-key: <key> header
?api_key=<key> query param
Permissions / Permisos
Permission / Permiso
EN Description
ES Descripción
read
Read components and status
Leer componentes y estado
write
Read + update component status
Leer + actualizar estado de componentes
admin
All permissions (includes read + write)
Todos los permisos (incluye read + write)
Endpoints / Endpoints
Health / Salud
GET /api/v1/health — Health check / Comprobación de salud
Pages / Páginas
GET /api/v1/pages — List all pages / Listar todas las páginas
GET /api/v1/pages/:id — Get single page / Obtener página
POST /api/v1/pages — Create page (write) / Crear página
PUT /api/v1/pages/:id — Update page (write) / Actualizar página
DELETE /api/v1/pages/:id — Delete page (admin) / Eliminar página
Components / Componentes
GET /api/v1/components — List all components / Listar componentes
GET /api/v1/components/:id — Get component / Obtener componente
POST /api/v1/components — Create component (write) / Crear componente
PUT /api/v1/components/:id — Update component (write) / Actualizar componente
DELETE /api/v1/components/:id — Delete component (admin) / Eliminar componente
PUT /api/v1/components/:id/status — Update status (write) / Actualizar estado
GET /api/v1/components/:id/history — Status history / Historial de estados
Incidents / Incidentes
GET /api/v1/incidents/admin — List all incidents / Listar incidentes
GET /api/v1/incidents/:id — Get incident / Obtener incidente
POST /api/v1/incidents — Create incident (write) / Crear incidente
PUT /api/v1/incidents/:id — Update incident (write) / Actualizar incidente
DELETE /api/v1/incidents/:id — Delete incident (admin) / Eliminar incidente
Maintenance / Mantenimiento
GET /api/v1/maintenance — List maintenance / Listar mantenimiento
GET /api/v1/maintenance/:id — Get maintenance / Obtener mantenimiento
POST /api/v1/maintenance — Create maintenance (write) / Crear mantenimiento
PUT /api/v1/maintenance/:id — Update maintenance (write) / Actualizar mantenimiento
DELETE /api/v1/maintenance/:id — Delete maintenance (admin) / Eliminar mantenimiento
Webhooks / Webhooks
GET /api/v1/pages/:pageId/webhooks — List webhooks for page / Listar webhooks
POST /api/v1/pages/:pageId/webhooks — Create webhook (write) / Crear webhook
PUT /api/v1/webhooks/:id — Update webhook (write) / Actualizar webhook
DELETE /api/v1/webhooks/:id — Delete webhook (admin) / Eliminar webhook
API Keys / Claves API
GET /api/v1/api-keys — List keys (admin) / Listar claves
POST /api/v1/api-keys — Create key (admin) / Crear clave
DELETE /api/v1/api-keys/:id — Revoke key (admin) / Revocar clave
Dependencies / Dependencias
GET /api/v1/dependencies — List dependencies / Listar dependencias
POST /api/v1/dependencies — Create dependency (write) / Crear dependencia
DELETE /api/v1/dependencies/:id — Delete dependency (admin) / Eliminar dependencia
Users / Usuarios
GET /api/v1/users — List users (admin) / Listar usuarios
GET /api/v1/users/:id — Get user (admin) / Obtener usuario
PUT /api/v1/users/:id — Update user (admin) / Actualizar usuario
Notifications / Notificaciones
GET /api/v1/notifications — List notifications / Listar notificaciones
POST /api/v1/notifications/:id/read — Mark as read / Marcar como leída
POST /api/v1/notifications/read-all — Mark all as read / Marcar todas como leídas
DELETE /api/v1/notifications/:id — Delete notification / Eliminar notificación
Analytics / Analíticas
GET /api/v1/analytics — Page/component analytics / Analíticas de página/componente
GET /api/v1/analytics-detail — Chart data / Datos de gráficos
Public Endpoints / Endpoints Públicos (no auth required)
GET /status/:slug — Public status page / Página de estado pública
GET /embed/:slug — Embed widget / Widget embebido
Architecture / Arquitectura
src/app.js ← Express entry point / Punto de entrada
src/routes/api.js ← REST API /api/v1
src/routes/admin.js ← Admin UI CRUD
src/routes/admin-extra.js ← Notifications, analytics, config
src/routes/auth.js ← Login/register/logout
src/middleware/session.js ← PostgreSQL session store / Almacenamiento de sesiones
src/middleware/auth.js ← API key auth / Autenticación API
src/middleware/csrf.js ← CSRF protection / Protección CSRF
src/middleware/rate-limit.js ← Rate limiting / Limitación de velocidad
src/middleware/require-2fa.js ← 2FA enforcement / Aplicación 2FA
src/db/init.js ← Schema + seed data / Esquema + datos iniciales
src/db/database.js ← pg Pool singleton / Pool de conexiones PostgreSQL
src/db/models.js ← CRUD helpers
src/utils/email.js ← Nodemailer / Correo
src/utils/webhooks.js ← Webhook delivery / Entrega de webhooks
src/utils/totp.js ← TOTP implementation
src/utils/ssl.js ← Self-signed SSL generation
views/ ← EJS templates / Plantillas
public/ ← Static assets / Recursos estáticos
data/audit_logs/ ← Daily rotated audit log CSV files / Logs CSV rotativos
Troubleshooting / Solución de Problemas
PostgreSQL connection error / Error de conexión PostgreSQL
Reset admin password / Restablecer contraseña de admin
docker exec -it statusfe node -e "const bcrypt = require('bcryptjs');const { run } = require('./src/db/database');run('UPDATE users SET password_hash=? WHERE email=?', [ bcrypt.hashSync('newpassword', 10), 'admin@status.local']);"
Clean all Docker data / Limpiar todos los datos de Docker
docker compose down -v
docker volume rm statusfe_statusfe-data statusfe_postgres-data
docker builder prune -af
docker system prune -f
npm install fails in corporate network / npm falla en red corporativa
# Use alternative registry mirror
npm config set registry https://registry.npmmirror.com
npm install
npm config set registry https://registry.npmjs.org
# Or if behind proxy
npm config set proxy http://proxy:port
npm config set https-proxy http://proxy:port
License / Licencia
MIT
About
Open source status page system for monitoring your services, components, and incidents with a beautiful public-facing dashboard and powerful REST API.