Skip to main content

Welcome to Tesis Rutas

Tesis Rutas is a tourism platform for managing heritage destinations and tourist routes at Universidad Central del Ecuador. This guide will help you get started quickly based on your role.
The platform supports three user roles: visitor (browse content), editor (manage destinations and routes), and administrator (full system access).

For Visitors: Explore Routes

Get started exploring tourist routes and heritage destinations in minutes.
1

Access the Interactive Map

Navigate to the map page at /mapa to view all destinations and routes:
http://localhost:5173/mapa
The map displays Points of Interest (POIs) for all active heritage destinations with interactive markers.
2

Browse Available Routes

Visit the routes page to see all curated tourist routes:
http://localhost:5173/rutas
Each route includes:
  • Name and description
  • Category (cultural, historical, architectural, etc.)
  • Ordered list of destinations (POIs)
  • Interactive map visualization
3

View Destination Details

Click on any destination to see detailed information:
http://localhost:5173/destinos/:id
Destination pages include:
  • Heritage significance
  • Construction year and architect
  • Location and coordinates
  • Multimedia gallery (images and videos)
  • Building area and function
4

Create an Account (Optional)

Register to save favorite destinations and access personalized features:
POST http://localhost:8000/auth/register
Required fields:
{
  "nombre": "Your Name",
  "email": "[email protected]",
  "password": "secure_password"
}
New accounts are created with the visitor role by default.

For Administrators: Create Your First Destination

Learn how to add heritage destinations to the platform.
1

Authenticate as Admin

Login with admin credentials to receive a JWT token:
POST http://localhost:8000/auth/login
Request body:
{
  "email": "[email protected]",
  "password": "your_password"
}
Response includes the access token:
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "usuario": {
    "id": "...",
    "nombre": "Admin User",
    "email": "[email protected]",
    "rol": "administrador"
  }
}
Include this token in the Authorization header for all admin operations: Authorization: Bearer <token>
2

Navigate to Create Destination

Access the admin interface:
http://localhost:5173/admin/destinos/crear
Or use the API directly (recommended for integration):
POST http://localhost:8000/destinos/
3

Submit Destination Data

Send the destination information with required fields:
{
  "nombre": "Basílica del Voto Nacional",
  "ubicacion": "Quito, Ecuador",
  "importancia": "Templo católico neogótico, uno de los más grandes de América",
  "coordenadas": {
    "latitud": -0.214824,
    "longitud": -78.509293
  },
  "anio_construccion": [1892, 1988],
  "arquitecto": "Emilio Tarlier",
  "area_construccion": 15000.0,
  "funcion": "Templo religioso"
}
  • nombre (required): Name of the heritage site
  • ubicacion (required): Physical location/address
  • importancia (required): Historical or cultural significance
  • coordenadas (required): GPS coordinates (latitude/longitude)
  • anio_construccion (required): Construction year(s) - array with 1 or 2 values for start/end
  • arquitecto (optional): Architect name
  • area_construccion (optional): Building area in m²
  • funcion (optional): Primary function or purpose
Backend validation (from src/domain/entities/destino.py:31-33):
if not anio_construccion or len(anio_construccion) not in (1, 2):
    raise ValueError("El año de construcción debe contener uno o dos valores válidos.")
4

Upload Multimedia Files

Add images and videos to showcase the destination:
POST http://localhost:8000/destinos/{id}/multimedia
Upload 1-3 files per request (max 10 total per destination):
curl -X POST \
  -H "Authorization: Bearer <token>" \
  -F "[email protected]" \
  -F "[email protected]" \
  http://localhost:8000/destinos/{id}/multimedia
Files are automatically uploaded to Cloudinary and organized in folders by destination ID.
Supported formats: Images (JPG, PNG, WebP) and Videos (MP4, WebM). The system automatically detects file type and extracts metadata like dimensions and duration.
5

Verify Creation

View your newly created destination:
GET http://localhost:8000/destinos/
Or visit the frontend:
http://localhost:5173/destinos
The destination is now visible to all users and can be included in tourist routes.

Quick API Reference

Base URLs

http://localhost:8000

Authentication

# Register
POST /auth/register

# Login (returns JWT)
POST /auth/login

Destinations

# List all destinations (public)
GET /destinos/

# Create destination (admin only)
POST /destinos/

# Update destination (admin only)
PUT /destinos/{id}

# Upload multimedia (admin only)
POST /destinos/{id}/multimedia

# Delete multimedia (admin only)
DELETE /destinos/{id}/multimedia?public_id={cloudinary_id}

Routes

# List all routes (public)
GET /rutas/

# Get route details (public)
GET /rutas/{id}

# Create route (editor/admin)
POST /rutas/

# Generate route from POI (public)
POST /rutas/generar-desde-poi

Next Steps

Architecture Overview

Learn about the Clean Architecture design and technology stack

API Reference

Explore detailed API documentation and endpoints

Frontend Guide

Build custom interfaces with React and Leaflet maps

Deployment

Deploy to production with best practices

Common Issues

Ensure your frontend origin is included in the CORS configuration (src/infrastructure/api/main.py:13-17):
origins = [
    "http://localhost:5173",  # Vite (frontend)
    "http://127.0.0.1:5173",
    "https://tesis-rutas.vercel.app",
]
Tokens expire after 60 minutes (default). Request a new token by logging in again:
POST /auth/login
Adjust expiration in src/config/settings.py:27:
jwt_expire_minutes: int = 60
Verify your MongoDB URI in configuration. Check src/infrastructure/database/mongo_config.py:24:
cls._client = MongoClient(settings.mongo_uri, serverSelectionTimeoutMS=5000)
Ensure network access and credentials are correct.
Check Cloudinary credentials in your environment configuration. Files are uploaded to destinations/{destino_id}/ folders.Verify limits:
  • 1-3 files per request
  • Maximum 10 files per destination
  • Auto-detected resource types (image/video)

Build docs developers (and LLMs) love