Enterprise Document Intelligence Platform
SEMBRA is a high-performance document retrieval and intelligence platform that enables:
- Document Ingestion: Upload PDF, DOCX, TXT, Markdown files
- Intelligent Chunking: Configurable chunk size with overlap for context preservation
- Semantic Search: Hybrid vector + BM25 search with RRF fusion
- Graph Context: Document relationships and citation chains
- LLM Synthesis: AI-powered answers with source citations
| Component | Purpose | Port |
|---|---|---|
| Postgres | Auth, Config, Tenants | 5432 |
| BarqDB | Vector embeddings storage | 8080 |
| BarqGraphDB | Document graph relationships | 8081 |
| Celrix | High-speed embedding cache | 6380 |
| AiMesh | Message queue for embedding pipeline | 9000 |
| SEMBRA API | REST API | 3000 |
| SEMBRA UI | Web interface | 80 |
# Clone repository
git clone https://github.com/YASSERRMD/sembra.git
cd sembra
# Start all services
cd docker && docker-compose up -d
# Access
# API: http://localhost:3000
# UI: http://localhostPOST /v1/login
{"email": "admin@enterprise.com", "password": "password"}
# Returns: {"token": "eyJ..."}POST /v1/upload
Content-Type: multipart/form-data
# files[]: PDF, DOCX, TXT, MD
# document_id: string
# document_name: stringPOST /v1/configure-embedding
{
"provider": "openai|ollama|huggingface",
"model": "text-embedding-3-small",
"api_key": "sk-...",
"batch_size": 32
}POST /v1/retrieve
{
"query": "machine learning optimization",
"top_k": 10,
"include_graph": true
}POST /v1/retrieve-with-llm
{
"query": "How does gradient descent work?",
"top_k": 5,
"llm_provider": "openai",
"llm_model": "gpt-4"
}| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
Postgres connection | postgresql://postgres:password@postgres:5432/sembra |
BARQ_DB_URL |
BarqDB endpoint | http://barq-db:8080 |
BARQ_GRAPHDB_URL |
BarqGraphDB endpoint | http://barq-graphdb:8081 |
CELRIX_URL |
Celrix cache | celrix:6380 |
AIMESH_URL |
AiMesh queue | http://aimesh:9000 |
JWT_SECRET |
JWT signing key | Required |
cd backend
cargo build --release
cargo testcd frontend
npm install
npm run devcd docker
docker-compose up --build -dsembra/
├── backend/
│ ├── sembra-api/ # REST API server
│ ├── sembra-core/ # Business logic, AiMesh consumer
│ ├── sembra-storage/ # Postgres + BarqDB clients
│ ├── sembra-graph/ # BarqGraphDB client
│ ├── sembra-cache/ # Celrix client
│ └── sembra-types/ # Shared types
├── frontend/ # React UI
├── docker/ # Docker configuration
└── docs/ # Documentation
MIT License
Built with BarqDB, BarqGraphDB, AiMesh, and Celrix

