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:
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.
| Variable | Description | Example value | Required |
|---|
DOMAIN | Public domain name for the frontend and SSL certificate | urbanviable.movilab.es | ✅ |
ENVIRONMENT | Deployment environment identifier | production | development | ✅ |
CORS_ORIGIN | Exact origin that Nginx will allow in Access-Control-Allow-Origin for the /tiles/ proxy location | https://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.
| Variable | Description | Example value | Notes |
|---|
REACT_APP_TILE_URL | Base URL for the vector tile source, used to construct the MapLibre tile source URL | https://tu-dominio.com/tiles | Append ?v=YEAR to bust browser tile cache after an ETL update |
REACT_APP_DATA_STATUS_URL | URL of the static JSON endpoint that reports ETL data freshness | https://tu-dominio.com/api/status | Polled by the DataStatus component on page load |
REACT_APP_LAYER_NAME | Internal MapLibre layer identifier for the census sections layer | secciones | Must match the --layer argument used in the Tippecanoe tile generation step |
REACT_APP_SOURCE_NAME | MapLibre source identifier; also the dataset name registered in tiles_data/config.json | galicia-scouting | Must 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 / pattern | Reason for exclusion |
|---|
.env | Contains domain-specific configuration; must never be committed |
*.pem, *.key | TLS 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.mbtiles | Production 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.yml | Local 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.