Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

siso-kh/tunisia-energy-rag

Domain:

environment and energynatural language processing

Record type:

softwareproject
Creator:
sis
Host:
# Tunisia Energy RAG RAG pipeline for the Tunisian energy sector: PDF collection, Arabic/OCR ingestion, LLM-based triage, ChromaDB vector retrieval, an async FastAPI backend, a React frontend (Vite build served by Nginx), and an async SQLAlchemy/PostgreSQL layer for conversations and the crowdsourced outage map. ## Quick start (Docker Compose) `docker compose up` starts the full stack with **PostgreSQL** and **auto-seeding**: | Service | Purpose | URL | |---|---|---| | `postgres` | PostgreSQL 16 (port `127.0.0.1:5433`, internal `postgres:5432`) | — | | `db-seed` | One-shot seeder — runs `src/database/seed.py` once Postgres is healthy, then exits | — | | `backend` | FastAPI (healthcheck on `/health`) | localhost | | `frontend` | React SPA (Vite build → Nginx, proxies `/api` to backend) | localhost | | `ngrok` | Public tunnel to the frontend (requires `NGROK_AUTHTOKEN`) | localhost | ### Environment ```bash cp .env.example .env # then fill in NGROK_AUTHTOKEN (and CUSTOM_API_KEY / OPENAI_BASE_URL) docker compose up --build ``` The React frontend lives in `frontend/`: chat (SSE streaming from `/api/chat/stream`), the outage map (`/api/outages`), and a solar ROI calculator. Local dev: ```bash cd frontend npm install npm run dev # localhost, proxies /api to localhost:8000 ``` ### Database - Connection string: `postgresql+asyncpg://postgres:postgres@postgres:5432/energie_tunisie` (the `DATABASE_URL` env var is set automatically for `backend` and `db-seed`). - Tables are created by the seeder; data is persisted in the `postgres_data` named volume. - Reseed from scratch: ```bash docker compose run --rm db-seed python -m src.database.seed --reset ``` - Connect from the host (e.g. `psql`): `postgresql://postgres:postgres@localhost:5433/energie_tunisie` ### Service healthchecks - `postgres` → `pg_isready -U postgres -d energie_tunisie` - `backend` → GET `localhost` - `frontend` → GET `/healt …

Visit

github.com

Tasks

information retrieval

Similar

hhsassi/tunisia-economic-ragheikalazzouna-svg/tunisia-health-ragahmedcharef/Tunisia-Open-Gov-Data-RAGslowmagic720-cpu/KH-AImalakazz18/Tunisia-Renewable-Energy-Transition-AssistantPlan for energy system modelling in Tunisia

hhsassi/tunisia-economic-rag

RAG system for analyzing Tunisia's economic data # Tunisia Financial Data RAG RAG system for analy

heikalazzouna-svg/tunisia-health-rag

Healthcare RAG chatbot over a Tunisian hospital knowledge graph (Neo4j + LangChain + FastAPI + Strea

ahmedcharef/Tunisia-Open-Gov-Data-RAG

RAG pipeline over Tunisian open government data using LangChain # Tunisia Open Government Data RAG

slowmagic720-cpu/KH-AI

KHAI is an offline Artificial Intelligence healthcare system designed to improve healthcare services

malakazz18/Tunisia-Renewable-Energy-Transition-Assistant

A document-grounded chatbot that answers questions about Tunisia's renewable energy incentive progra

Plan for energy system modelling in Tunisia

Context, plan, methods, preliminary results of energy system modelling activities in Tunisia within