This guide walks you through running Salud IA Bot on your local machine. You will clone the repository, install dependencies, configure your credentials, seed the SQLite database with Colombia’s health datasets, and start the NestJS server — resulting in a fully functional Telegram bot that responds to public health queries in Spanish.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/RubenDarioGuerreroNeira/Ecosistema-IA-Colombia/llms.txt
Use this file to discover all available pages before exploring further.
Install Dependencies
Install all Node.js dependencies. Node.js 18 or later is recommended — the project uses Key packages installed include
@types/node v20 and NestJS v11, which are compatible with Node.js 18+.nestjs-telegraf, openai (OpenRouter client), better-sqlite3, typeorm, fast-xml-parser, joi, and https-proxy-agent.Configure Environment
Create a Open
The app uses Joi to validate these on startup. If a required variable is missing, the process will exit immediately with a descriptive error before the bot attempts to connect.
.env file in the project root by copying .env.example, then fill in your credentials:.env and set the following variables:| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN | Your Telegram Bot API token — get it from @BotFather |
OPENROUTER_API_KEY | Your OpenRouter API key — get it from openrouter.ai |
OPENROUTER_MODEL | OpenRouter model ID (default: nvidia/nemotron-3-super-120b-a12b:free) |
PORT | HTTP port for the NestJS server (default: 3000) |
Seed the Database
Before starting the bot, populate the local SQLite database (
data/salud-ia-bot.db) with Colombia’s health datasets. The seed scripts parse the raw XML files and insert them into structured tables via TypeORM.The database file is created at
data/salud-ia-bot.db relative to the project root. Once seeded, the application reads exclusively from SQLite at runtime — XML files are never re-parsed. This is what allows the app to start quickly and use minimal memory in production.Start the Bot
Launch the NestJS development server with hot-reload enabled:Once you see the NestJS startup banner and no Joi validation errors, open Telegram, search for your bot by its username, and send:You will receive a personalized welcome message. The bot is now ready to answer public health queries.
Example Interactions
Once the bot is running, try these queries in Telegram to exercise its core capabilities:| Query | Capability |
|---|---|
¿Cuántos casos de dengue hay en Colombia? | SIVIGILA epidemiological lookup — returns national case counts and demographic breakdown |
Graficar calidad del aire en Medellín | Chart visualization — generates a bar/line chart image of air quality indicators |
Analizar riesgo de tuberculosis en Antioquia | Composite risk scoring — returns BAJO/MEDIO/ALTO/CRÍTICO classification with weighted dimension breakdown |
Hospitales en Cali | Local provider search — lists health centers and urgency services in Cali directly from SQLite |
¿Cuáles son los eventos de salud pública más frecuentes en Colombia? | NLP epidemiological intelligence — returns a ranked list of the most reported SIVIGILA events |
Alertas tempranas de salud pública | Early warning system — triggers EarlyWarningService for outbreak alert assessment |
All queries should be sent in Spanish. The bot is tuned for natural Colombian Spanish, including tolerance for spelling variations and regional phrasing. Queries like
"dengue en cali" and "casos de dengue en la ciudad de Cali" are both handled correctly by the hybrid NLP region-detection system.