feat: Complete ATLAS system installation and API fixes

## Backend Changes
- Add new API endpoints: combustible, pois, mantenimiento, video, configuracion
- Fix vehiculos endpoint to return paginated response with items array
- Add /vehiculos/all endpoint for non-paginated list
- Add /geocercas/all endpoint
- Add /alertas/configuracion GET/PUT endpoints
- Add /viajes/activos and /viajes/iniciar endpoints
- Add /reportes/stats, /reportes/templates, /reportes/preview endpoints
- Add /conductores/all and /conductores/disponibles endpoints
- Update router.py to include all new modules

## Frontend Changes
- Fix authentication token handling (snake_case vs camelCase)
- Update vehiculosApi.listAll to use /vehiculos/all
- Fix FuelGauge component usage in Combustible page
- Fix chart component exports (named + default exports)
- Update API client for proper token refresh

## Infrastructure
- Rename services from ADAN to ATLAS
- Configure Cloudflare tunnel for atlas.consultoria-as.com
- Update systemd service files
- Configure PostgreSQL with TimescaleDB
- Configure Redis, Mosquitto, Traccar, MediaMTX

## Documentation
- Update installation guides
- Update API reference
- Rename all ADAN references to ATLAS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
ATLAS Admin
2026-01-25 03:04:23 +00:00
parent 0dfce3ce20
commit e59aa2a742
73 changed files with 4415 additions and 450 deletions

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Sistema de ADAN - API Backend
Documentation=https://github.com/tuorganizacion/adan
Description=Sistema de ATLAS - API Backend
Documentation=https://github.com/tuorganizacion/atlas
After=network.target postgresql.service redis.service
Wants=postgresql.service redis.service
@@ -8,14 +8,14 @@ Wants=postgresql.service redis.service
Type=exec
User=root
Group=root
WorkingDirectory=/opt/adan/backend
WorkingDirectory=/opt/atlas/backend
# Cargar variables de entorno
EnvironmentFile=/opt/adan/.env
EnvironmentFile=/opt/atlas/.env
# Comando de inicio
# Uvicorn con multiples workers para produccion
ExecStart=/opt/adan/backend/venv/bin/uvicorn \
ExecStart=/opt/atlas/backend/venv/bin/uvicorn \
app.main:app \
--host 0.0.0.0 \
--port 8000 \
@@ -44,12 +44,12 @@ NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/adan /var/log/adan /tmp
ReadWritePaths=/opt/atlas /var/log/atlas /tmp
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=adan-api
SyslogIdentifier=atlas-api
# Health check (systemd 253+)
# WatchdogSec=30

View File

@@ -1,17 +1,17 @@
[Unit]
Description=Sistema de ADAN - Frontend Web
Documentation=https://github.com/tuorganizacion/adan
After=network.target adan-api.service
Wants=adan-api.service
Description=Sistema de ATLAS - Frontend Web
Documentation=https://github.com/tuorganizacion/atlas
After=network.target atlas-api.service
Wants=atlas-api.service
[Service]
Type=exec
User=root
Group=root
WorkingDirectory=/opt/adan/frontend
WorkingDirectory=/opt/atlas/frontend
# Cargar variables de entorno
EnvironmentFile=/opt/adan/.env
EnvironmentFile=/opt/atlas/.env
# Comando de inicio usando 'serve' para servir archivos estaticos
# Opcion 1: Usando serve (recomendado para SPA React/Vue)
@@ -22,7 +22,7 @@ ExecStart=/usr/bin/serve \
--single
# Opcion 2: Si usas Next.js en modo standalone
# ExecStart=/usr/bin/node /opt/adan/frontend/.next/standalone/server.js
# ExecStart=/usr/bin/node /opt/atlas/frontend/.next/standalone/server.js
# Opcion 3: Si prefieres usar Node directamente
# ExecStart=/usr/bin/npx serve -s dist -l 3000
@@ -47,12 +47,12 @@ NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/adan
ReadWritePaths=/opt/atlas
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=adan-web
SyslogIdentifier=atlas-web
[Install]
WantedBy=multi-user.target

View File

@@ -1,5 +1,5 @@
[Unit]
Description=Cloudflare Tunnel - Sistema de ADAN
Description=Cloudflare Tunnel - Sistema de ATLAS
Documentation=https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
After=network-online.target
Wants=network-online.target
@@ -20,7 +20,7 @@ ExecStart=/usr/local/bin/cloudflared tunnel --no-autoupdate run --token ${CLOUDF
# ExecStart=/usr/local/bin/cloudflared tunnel --config /etc/cloudflared/config.yml run
# Cargar variables de entorno
EnvironmentFile=/opt/adan/.env
EnvironmentFile=/opt/atlas/.env
# Reinicio automatico
Restart=always