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,7 +1,7 @@
{
"expo": {
"name": "Adan Conductor",
"slug": "adan-conductor",
"name": "Atlas Conductor",
"slug": "atlas-conductor",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
@@ -16,7 +16,7 @@
],
"ios": {
"supportsTablet": false,
"bundleIdentifier": "com.adan.conductor",
"bundleIdentifier": "com.atlas.conductor",
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "Necesitamos acceso a tu ubicación para rastrear el viaje",
"NSLocationAlwaysAndWhenInUseUsageDescription": "Necesitamos acceso continuo a tu ubicación para el seguimiento de rutas",
@@ -35,7 +35,7 @@
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#3b82f6"
},
"package": "com.adan.conductor",
"package": "com.atlas.conductor",
"permissions": [
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
@@ -57,7 +57,7 @@
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Adan necesita tu ubicación para rastrear viajes, incluso en segundo plano.",
"locationAlwaysAndWhenInUsePermission": "Atlas necesita tu ubicación para rastrear viajes, incluso en segundo plano.",
"isAndroidBackgroundLocationEnabled": true,
"isIosBackgroundLocationEnabled": true
}
@@ -65,7 +65,7 @@
[
"expo-camera",
{
"cameraPermission": "Permitir a Adan acceder a tu cámara para la función dashcam"
"cameraPermission": "Permitir a Atlas acceder a tu cámara para la función dashcam"
}
],
[

View File

@@ -1,5 +1,5 @@
{
"name": "adan-driver-app",
"name": "atlas-driver-app",
"version": "1.0.0",
"private": true,
"main": "node_modules/expo/AppEntry.js",

View File

@@ -1,6 +1,6 @@
/**
* App.tsx - Punto de entrada principal y configuración de navegación
* Adan Conductor - App móvil para conductores
* Atlas Conductor - App móvil para conductores
*/
import React, { useEffect, useState } from 'react';

View File

@@ -75,7 +75,7 @@ export const LoginScreen: React.FC = () => {
<View style={styles.logoContainer}>
<Text style={styles.logoText}>A</Text>
</View>
<Text style={styles.title}>Adan Conductor</Text>
<Text style={styles.title}>Atlas Conductor</Text>
<Text style={styles.subtitle}>
Ingresa tu número de teléfono para continuar
</Text>

View File

@@ -355,7 +355,7 @@ export const PerfilScreen: React.FC = () => {
/>
{/* Versión */}
<Text style={styles.versionText}>Adan Conductor v1.0.0</Text>
<Text style={styles.versionText}>Atlas Conductor v1.0.0</Text>
</ScrollView>
</SafeAreaView>
);

View File

@@ -30,7 +30,7 @@ import type {
// Configuración base
const API_BASE_URL = __DEV__
? 'http://192.168.1.100:8000/api/v1' // Cambiar por IP local en desarrollo
: 'https://api.adan.com/api/v1';
: 'https://api.atlas.com/api/v1';
const API_KEY = 'your-api-key-here'; // Configurar en producción

View File

@@ -10,7 +10,7 @@ import { ubicacionApi } from './api';
import type { Ubicacion, UbicacionOffline } from '../types';
// Nombre de la tarea de background
const LOCATION_TASK_NAME = 'adan-background-location';
const LOCATION_TASK_NAME = 'atlas-background-location';
// Configuración
const CONFIG = {
@@ -280,7 +280,7 @@ const startBackgroundTracking = async (): Promise<void> => {
deferredUpdatesDistance: CONFIG.DISTANCE_FILTER,
showsBackgroundLocationIndicator: true,
foregroundService: {
notificationTitle: 'Adan - Rastreo activo',
notificationTitle: 'Atlas - Rastreo activo',
notificationBody: 'Enviando ubicación en tiempo real',
notificationColor: '#3b82f6',
},

View File

@@ -88,7 +88,7 @@ export const getPushToken = async (): Promise<string | null> => {
// Configuración específica de Android
if (Platform.OS === 'android') {
await Notifications.setNotificationChannelAsync('default', {
name: 'Adan Conductor',
name: 'Atlas Conductor',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#3b82f6',

View File

@@ -7,16 +7,16 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
// Claves de almacenamiento
export const STORAGE_KEYS = {
AUTH_TOKEN: '@adan/auth_token',
CONDUCTOR: '@adan/conductor',
DISPOSITIVO: '@adan/dispositivo',
UBICACIONES_OFFLINE: '@adan/ubicaciones_offline',
VIAJE_ACTIVO: '@adan/viaje_activo',
CONFIGURACION: '@adan/configuracion',
ULTIMO_SYNC: '@adan/ultimo_sync',
MENSAJES_PENDIENTES: '@adan/mensajes_pendientes',
PARADAS_PENDIENTES: '@adan/paradas_pendientes',
COMBUSTIBLE_PENDIENTE: '@adan/combustible_pendiente',
AUTH_TOKEN: '@atlas/auth_token',
CONDUCTOR: '@atlas/conductor',
DISPOSITIVO: '@atlas/dispositivo',
UBICACIONES_OFFLINE: '@atlas/ubicaciones_offline',
VIAJE_ACTIVO: '@atlas/viaje_activo',
CONFIGURACION: '@atlas/configuracion',
ULTIMO_SYNC: '@atlas/ultimo_sync',
MENSAJES_PENDIENTES: '@atlas/mensajes_pendientes',
PARADAS_PENDIENTES: '@atlas/paradas_pendientes',
COMBUSTIBLE_PENDIENTE: '@atlas/combustible_pendiente',
} as const;
type StorageKey = typeof STORAGE_KEYS[keyof typeof STORAGE_KEYS];
@@ -124,8 +124,8 @@ class StorageService {
async clearAll(): Promise<void> {
try {
const keys = await AsyncStorage.getAllKeys();
const adanKeys = keys.filter((key) => key.startsWith('@adan/'));
await AsyncStorage.multiRemove(adanKeys);
const atlasKeys = keys.filter((key) => key.startsWith('@atlas/'));
await AsyncStorage.multiRemove(atlasKeys);
} catch (error) {
console.error('Error limpiando almacenamiento:', error);
throw new Error('No se pudo limpiar el almacenamiento');
@@ -187,8 +187,8 @@ class StorageService {
async getStorageSize(): Promise<number> {
try {
const keys = await AsyncStorage.getAllKeys();
const adanKeys = keys.filter((key) => key.startsWith('@adan/'));
const pairs = await AsyncStorage.multiGet(adanKeys);
const atlasKeys = keys.filter((key) => key.startsWith('@atlas/'));
const pairs = await AsyncStorage.multiGet(atlasKeys);
let totalSize = 0;
pairs.forEach(([key, value]) => {