Vanijya AI / TradeSight Codebase Dossier¶
Vanijya AI is a trade-intelligence platform combining structured-data analysis and an advanced RAG workspace. The rag/ application provides the inspected FastAPI/React system; vanijya_ai_use_case.md documents its integration with an Analyst API for code-based structured insights.
Read first¶
System map¶
flowchart TD
classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4
User["Trade analyst"]:::highlight --> FE["Unified React workspace"]
FE --> Analyst["Analyst API / structured data"]
FE --> RAG["FastAPI RAG API"]
RAG --> Qdrant["Qdrant dense vectors"]
RAG --> Meili["Meilisearch sparse search"]
RAG --> Redis["Redis memory"]
RAG --> PG["PostgreSQL metadata/history"]
RAG --> MinIO["MinIO documents"]
linkStyle default stroke:#64748b,stroke-width:2px
Top facts¶
- Five use cases are scoped through project IDs and specialized prompts.
- Hybrid retrieval merges dense and sparse results, then reranks.
- Document ingestion supports PDF/layout extraction, chunking, embeddings, summaries, and suggestions.
- SSE streams answer tokens and pipeline/debug events.
- Redis supplies sliding-window conversation memory; PostgreSQL stores durable history.
- JWT SSO is shared across structured and unstructured workspaces.
- Docker Compose runs Postgres, Redis, MinIO, Qdrant, Meilisearch, backend, worker, and frontend.