Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danizd/urbanviable/llms.txt

Use this file to discover all available pages before exploring further.

UrbanViable has a notably small set of environment variables. Because there is no backend API, no database, and no third-party service integrations, the .env file contains only domain configuration and React build-time settings. There are no database passwords, no API keys, and no authentication secrets to manage.

.env.example

This file is versioned in Git and serves as the canonical reference for all supported variables. Copy it to .env and fill in real values before deploying:
cp .env.example .env
DOMAIN=tu-dominio.com
ENVIRONMENT=production
CORS_ORIGIN=https://tu-dominio.com
REACT_APP_TILE_URL=https://tu-dominio.com/tiles
REACT_APP_DATA_STATUS_URL=https://tu-dominio.com/api/status
REACT_APP_LAYER_NAME=secciones
REACT_APP_SOURCE_NAME=galicia-scouting

Infrastructure variables

These variables configure the Nginx container and Docker Compose runtime behaviour. They are read at container startup time.
VariableDescriptionExample valueRequired
DOMAINPublic domain name for the frontend and SSL certificateurbanviable.movilab.es
ENVIRONMENTDeployment environment identifierproduction | development
CORS_ORIGINExact origin that Nginx will allow in Access-Control-Allow-Origin for the /tiles/ proxy locationhttps://urbanviable.movilab.es
CORS_ORIGIN must match the full origin (scheme + domain + optional port) of the deployed frontend. For local development with Vite, set it to http://localhost:5173.

Frontend build-time variables

The frontend is a Vite project. Variables prefixed with REACT_APP_ are resolved at compile time because vite.config.js declares envPrefix: ['VITE_', 'REACT_APP_']. They are accessed inside components via import.meta.env.REACT_APP_* and are not available as runtime environment variables — they are literally substituted into the built JS files by Vite during npm run build.
VariableDescriptionExample valueNotes
REACT_APP_TILE_URLBase URL for the vector tile source, used to construct the MapLibre tile source URLhttps://tu-dominio.com/tilesAppend ?v=YEAR to bust browser tile cache after an ETL update
REACT_APP_DATA_STATUS_URLURL of the static JSON endpoint that reports ETL data freshnesshttps://tu-dominio.com/api/statusPolled by the DataStatus component on page load
REACT_APP_LAYER_NAMEInternal MapLibre layer identifier for the census sections layerseccionesMust match the --layer argument used in the Tippecanoe tile generation step
REACT_APP_SOURCE_NAMEMapLibre source identifier; also the dataset name registered in tiles_data/config.jsongalicia-scoutingMust match the key under "data" in config.json and the Tippecanoe --name argument
Build-time variables are baked into the JS bundle by Vite. If you change any REACT_APP_* variable in .env, you must recompile the frontend and restart the Nginx container for the change to take effect:
cd frontend && npm run build && cd ..
docker compose restart urbanviable-web
Simply restarting the container without rebuilding will have no effect — the old values are already embedded in the static files.
REACT_APP_LAYER_NAME and REACT_APP_SOURCE_NAME form a three-way contract between the frontend, the ETL pipeline (Tippecanoe arguments), and the TileServer GL config.json. If any one of the three drifts, tiles will either not load or render without data. When renaming layers, update all three sources simultaneously.

.gitignore — what is excluded and why

Path / patternReason for exclusion
.envContains domain-specific configuration; must never be committed
*.pem, *.keyTLS private keys and certificates — committing these would expose the server’s SSL identity
certs/Let’s Encrypt certificate directory — contains private keys
etl/data/raw/Raw INE source data; files are large (hundreds of MB) and fully reproducible by re-running download_data.py
etl/data/processed/Processed GeoJSON and .mbtiles — large generated files, regenerated by ETL
tiles_data/galicia_scouting.mbtilesProduction tile file; too large for Git (15–40 MB), transferred to the server via scp
frontend/build/Compiled React output — a build artefact, not source
frontend/node_modules/npm dependency tree — installed fresh from package.json
__pycache__/, *.pyc, .venv/Python bytecode and virtual environments
.vscode/, .idea/IDE workspace files
docker-compose.override.ymlLocal development overrides that should not affect production
.env.example is versioned in Git. Keep it up to date whenever you add a new environment variable. It is the only source of truth for what variables the project expects — without it, a new deployment has no way to know what to configure.

Build docs developers (and LLMs) love