# FLUJOS Software libre para analizar y visualizar flujos de información. Conecta noticias, documentos y eventos históricos para entender la historia como una sucesión de eventos y combatir la desinformación. --- ## Requisitos - Node.js >= 18.x - Python >= 3.11 - MongoDB >= 6.x ### Instalar MongoDB (Ubuntu/Debian) ```bash sudo apt install -y gnupg curl curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list sudo apt update && sudo apt install -y mongodb-org sudo systemctl enable --now mongod ``` --- ## Instalación ```bash git clone https://gitea.laenre.net/hacklab/FLUJOS.git cd FLUJOS git checkout production ``` ### Variables de entorno ```bash cp .env.example FLUJOS/BACK_BACK/.env ``` Edita `.env` con tus valores: | Variable | Por defecto | Descripción | |-------------|-------------------------------|------------------------------| | `MONGO_URL` | `mongodb://localhost:27017` | URL de conexión a MongoDB | | `DB_NAME` | `FLUJOS_DATOS` | Nombre de la base de datos | | `PORT` | `3000` | Puerto del servidor | ### Dependencias Node.js ```bash cd FLUJOS/BACK_BACK && npm install cd ../VISUALIZACION && npm install ``` ### Dependencias Python ```bash cd ../../FLUJOS_DATOS python3 -m venv myenv source myenv/bin/activate pip install transformers==4.10.0 tensorflow==2.17.0 scikit-learn==0.24.2 \ pandas==1.3.2 numpy==1.19.5 nltk==3.6.2 django obsei[all] python FLUJOS_DATOS/manage.py migrate ``` --- ## Arrancar ```bash # Servidor principal cd FLUJOS/BACK_BACK && npm start # API Python (en otra terminal, con el venv activo) cd FLUJOS/BACK_BACK && python flask_api/app.py ``` Disponible en `http://localhost:3000` --- ## Base de datos La app lee de MongoDB (`FLUJOS_DATOS`). Las colecciones se pueblan con el pipeline de datos: ```bash # 1. Scraping python FLUJOS_DATOS/NOTICIAS/main_noticias.py python FLUJOS_DATOS/WIKIPEDIA/main.py python FLUJOS_DATOS/TORRENTS/procesar_torrents.py # 2. Comparaciones python FLUJOS_DATOS/COMPARACIONES/pipeline_completo.py ``` Consulta `FLUJOS_DATOS/DOCS/` para más detalle. --- ## Estructura ``` flujos/ ├── FLUJOS/ │ ├── BACK_BACK/ # Servidor Express + Flask API + OBSEI │ └── VISUALIZACION/ # Frontend (Three.js, force-graph) └── FLUJOS_DATOS/ ├── NOTICIAS/ # Scraper de noticias ├── WIKIPEDIA/ # Extracción Wikipedia ├── TORRENTS/ # Documentos WikiLeaks ├── COMPARACIONES/ # Similitud entre documentos └── DOCS/ # Documentación técnica ``` --- *"Los gigantes vistos en perspectiva parecen marionetas."*