|
Download README.md from Sandy-sys/finai: direct link, hf CLI and curl.
- Browser
- Download file 2.21 kB
-
https://huggingface.co/spaces/Sandy-sys/finai/resolve/main/README.md
- Command line
-
hf download hf://spaces/Sandy-sys/finai/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Sandy-sys/finai/resolve/main/README.md
2.21 kB
metadata
title: FinAI
emoji: π
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
short_description: Conversational analytics for Magic Bus India Foundation
MBF Insight β Magic Bus AI Insights Platform
A Julius.ai-grade dynamic intelligence platform for the Magic Bus India Foundation magicbusDB knowledge base. Each query produces a uniquely composed dashboard with citations, multi-modal retrieval (GraphRAG + LlamaIndex SubQuery + Text-to-SQL + pgvector hybrid), and adaptive chart counts/types driven by data + intent.
Monorepo layout
FinAi/
βββ apps/
β βββ web/ Next.js 15 (App Router) + shadcn/ui
β βββ api/ FastAPI orchestrator + LangGraph
βββ etl/ Data foundation (MySQL import, PG mirror, Parquet, GraphRAG, vectors)
βββ infra/ Docker compose (MySQL, Postgres+pgvector+AGE, Jupyter, Langfuse, Redis)
βββ evals/ Gold-query eval harness
βββ mbtestdb/ Source MySQL dump (read-only)
βββ data/ Local snapshots, parquet, graphrag artifacts (gitignored)
Quick start (local-only)
# 1. Spin infrastructure
docker compose -f infra/docker-compose.yml up -d
# 2. Configure secrets (edit .env.local with DeepSeek keys β DO NOT commit)
copy .env.local.example .env.local
# 3. Import the MySQL dump
bash etl/import_mysql.sh
# 4. Mirror to Postgres + build dim tables
python etl/mirror_to_pg.py
# 5. Snapshot Parquet + build vectors + GraphRAG
python etl/snapshot_parquet.py
python etl/build_vectors.py
python etl/build_graphrag.py
# 6. Start backend
cd apps/api && uvicorn mbf.app:app --reload --port 8000
# 7. Start frontend
cd apps/web && pnpm install && pnpm dev
Security
- Never commit
.env.localβ it holds the 15 DeepSeek API keys. - The MySQL dump is read-only source-of-truth; the backend connects via a read-only DB user.
- Generated SQL passes through an AST allow-list (SELECT-only, no DDL/DML).
See /memories/session/plan.md for the full 8-phase plan.