Skip to content

njujiangxiang/myRAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

myRAG - Multi-user RAG System

License Go Version

A high-performance, self-hosted RAG (Retrieval-Augmented Generation) system with knowledge graph support.

Features

  • ๐Ÿ“š Knowledge Bases - Create isolated knowledge bases per user/tenant
  • ๐Ÿ“„ Multi-format Support - PDF, DOCX, XLSX, Markdown, CSV, TXT
  • ๐Ÿ’ฌ AI Chat - Chat with your documents, get answers with citations
  • ๐Ÿ” Hybrid Search - Vector + keyword search with optional GraphRAG
  • ๐Ÿ‘ฅ Multi-tenant - Row-level security for data isolation
  • ๐Ÿš€ High Performance - Go backend with async document processing
  • ๐Ÿณ One-click Deploy - Docker Compose setup

Quick Start

# Clone the repository
git clone https://github.com/njujiangxiang/myRAG.git
cd myRAG

# Start all services
docker-compose up -d

# Access the web UI
open http://localhost:3000

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   React     โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Go API    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  PostgreSQL โ”‚
โ”‚   Frontend  โ”‚     โ”‚   Backend   โ”‚     โ”‚  (Metadata) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   NATS JS   โ”‚
                    โ”‚  (Queue)    โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   Workers   โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ                 โ–ผ                 โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Qdrant    โ”‚    โ”‚    MinIO    โ”‚   โ”‚  LLM APIs   โ”‚
โ”‚  (Vectors)  โ”‚    โ”‚   (Files)   โ”‚   โ”‚ (OpenAI)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

  • Backend: Go 1.21+ with Gin framework
  • Frontend: React + TypeScript + shadcn/ui + Tailwind CSS
  • Database: PostgreSQL 16
  • Vector DB: Qdrant 1.7+
  • Message Queue: NATS JetStream
  • File Storage: MinIO (S3-compatible)
  • LLM: OpenAI/Anthropic/Local (ollama)

Configuration

Copy .env.example to .env and configure:

# Database
DATABASE_URL=postgres://user:pass@localhost:5432/ragdb

# Qdrant
QDRANT_URL=http://localhost:6333

# NATS
NATS_URL=nats://localhost:4222

# MinIO
MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin

# LLM
OPENAI_API_KEY=sk-...

Development

# Run backend
go run cmd/server/main.go

# Run frontend (in web/ directory)
npm run dev

# Run tests
go test ./...

Roadmap

  • v1.0: Core RAG functionality (vector search + chat)
  • v1.1: GraphRAG integration (knowledge graph + entity extraction)
  • v1.2: Advanced search (hybrid search + BM25 + reranking)
  • v1.3: Frontend UI (multi-tenant dashboard)
  • v1.4: SSE streaming for chat responses
  • v2.0: Advanced permissions and team collaboration

License

MIT

About

๐Ÿš€ ้ซ˜ๆ€ง่ƒฝๅคš็”จๆˆท RAG ็Ÿฅ่ฏ†ๅบ“้—ฎ็ญ”็ณป็ปŸ | Go + React | ๆ”ฏๆŒๆททๅˆๆฃ€็ดขใ€็Ÿฅ่ฏ†ๅ›พ่ฐฑใ€ๅคš็งŸๆˆท | High-performance multi-user RAG system with hybrid search & knowledge graph

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors