Skip to main content

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.

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.
1

Clone the Repository

Clone the project from GitHub and move into the project directory:
git clone https://github.com/RubenDarioGuerreroNeira/Ecosistema-IA-Colombia.git salud-ia-bot
cd salud-ia-bot
2

Install Dependencies

Install all Node.js dependencies. Node.js 18 or later is recommended — the project uses @types/node v20 and NestJS v11, which are compatible with Node.js 18+.
npm install
Key packages installed include nestjs-telegraf, openai (OpenRouter client), better-sqlite3, typeorm, fast-xml-parser, joi, and https-proxy-agent.
3

Configure Environment

Create a .env file in the project root by copying .env.example, then fill in your credentials:
cp .env.example .env
Open .env and set the following variables:
VariableDescription
TELEGRAM_BOT_TOKENYour Telegram Bot API token — get it from @BotFather
OPENROUTER_API_KEYYour OpenRouter API key — get it from openrouter.ai
OPENROUTER_MODELOpenRouter model ID (default: nvidia/nemotron-3-super-120b-a12b:free)
PORTHTTP port for the NestJS server (default: 3000)
TELEGRAM_BOT_TOKEN=1234567890:AABBCCDDEEFFaabbccddeeff
OPENROUTER_API_KEY=sk-or-v1-...
OPENROUTER_MODEL=nvidia/nemotron-3-super-120b-a12b:free
PORT=3000
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.
4

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.
# Seed all datasets at once (recommended for first-time setup)
npm run import:data
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.
In production (Render, Railway, etc.), the app reads from the pre-seeded SQLite file only — XML is never re-parsed, which greatly reduces memory usage and startup time. Commit the data/salud-ia-bot.db file to your deployment artifact or seed it as a build step on the hosting platform.
5

Start the Bot

Launch the NestJS development server with hot-reload enabled:
npm run start:dev
Once you see the NestJS startup banner and no Joi validation errors, open Telegram, search for your bot by its username, and send:
/start
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:
QueryCapability
¿Cuántos casos de dengue hay en Colombia?SIVIGILA epidemiological lookup — returns national case counts and demographic breakdown
Graficar calidad del aire en MedellínChart visualization — generates a bar/line chart image of air quality indicators
Analizar riesgo de tuberculosis en AntioquiaComposite risk scoring — returns BAJO/MEDIO/ALTO/CRÍTICO classification with weighted dimension breakdown
Hospitales en CaliLocal 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úblicaEarly 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.

Build docs developers (and LLMs) love