Tech Stack
Backend (SoRag)
- FastAPI 0.104.1 - Web framework
- LangGraph 0.2.50 - Workflow orchestration
- LangSmith 0.3.45 - Observability
- SQLAlchemy 2.0.23 - ORM
- PostgreSQL - Primary database
- FAISS 1.7.4 - Dense vectors
- Elasticsearch 8.11.0 - Sparse vectors
- Redis 5.0.1 - Cache/Memory
Frontend (RagChat)
- Next.js 15.3.0 - React framework
- React 19.0.0 - UI library
- TypeScript 5.6.3 - Type system
- Vercel AI SDK 5.0.26 - AI integration
- Radix UI - Accessible components
- Tailwind CSS 4.1.13 - Styling
- Drizzle ORM 0.34.0 - Database
Admin (AosoRag)
- ABP.io Framework - DDD framework
- .NET Core - Backend
- Entity Framework - ORM
- Angular/Blazor - Frontend
LLM Providers
- OpenAI GPT-4
- Anthropic Claude
- Ollama (Local)
Architecture Features
✅ LangGraph Workflows
- Observability - LangSmith full-chain tracing
- Maintainability - Node-based design
- Recoverability - Checkpointer support
- Testability - Independent node testing
✅ Multi-Agent Architecture
- Specialization - RAG/Chat/Integration separation
- Parallelization - asyncio.gather concurrency
- Extensibility - Registry mechanism
- Isolation - Independent compilation
✅ Multi-Tenant Architecture
- Automation - ContextVars + event listeners
- Security - Database-level auto-filtering
- Flexibility - Context Manager switching
- Performance - Index optimization
✅ DDD Design Principles
- Layered architecture - 4 clear layers
- Repository pattern - Data access abstraction
- Entity handles business logic
- Based on ABP.io principles
High-Level Overview
This section provides simplified, high-level architecture diagrams that show the overall system structure without implementation details. These diagrams are perfect for:
- Executive Presentations - Quick understanding of system architecture
- Onboarding - New team members getting familiar with the system
- Architecture Reviews - High-level discussions without technical details
- Client Demos - Showcasing system capabilities and structure
System Architecture
Overall System Architecture
AosoRag Admin + SoRag Backend + RagChat Frontend

Ddd Architecture
DDD 4-Layer Architecture
Python implementation based on ABP.io principles

Indexing
Indexing Adapters Architecture
Factory Pattern for pluggable components (⭐ = Current default)

Retrieval
Retrieval Architecture Overview
Supervisor orchestrating three specialized agents

Supervisor Workflow Detailed
Query Split → Orchestrate → Synthesize

RAG Agent Workflow
Memory Check → Hybrid Search → Rerank(0.7*dense + 0.3*sparse) → Generate

Chat Agent Workflow
Conversation memory management + LLM generation

Shop Multi-Agent Detailed Architecture
Supervisor coordinating three specialized agents

Design Patterns
Design Patterns Overview
8 core design patterns used in the system
