Skip to content

aayush223/nexus

Repository files navigation

🛸 Antigravity Nexus

A local-first, privacy-focused RAG (Retrieval-Augmented Generation) platform powered by Ollama and Qwen3. Upload your documents, train domain-specific AI assistants with custom personalities, and query your data — all running 100% locally.

✨ Features

  • 🔐 Authentication — Secure sign-up/login with bcrypt-hashed passwords
  • 💬 General RAG Chat — Query your ingested documents with streaming responses
  • 🧬 Domain Training Lab — Create isolated AI domains for specific niches
  • 🎭 Personality Engine — 5 built-in presets (Professional, Friendly, Technical, Creative, Concise) or custom system prompts
  • 📄 Multi-Format Upload — PDF, DOCX, TXT, MD file ingestion
  • 📊 System Telemetry — Real-time CPU, RAM, disk, and Ollama monitoring
  • 🌐 Modern React UI — Glassmorphic dark theme with streaming chat

🏗️ Architecture

antigrav-nexus/
├── api.py                  # FastAPI REST server
├── rag.py                  # General RAG chain (Qwen3 + ChromaDB)
├── ingest.py               # Document chunking & embedding pipeline
├── file_loader.py          # Multi-format file parser (PDF, DOCX, TXT, MD)
├── auth_db.py              # SQLite + bcrypt user authentication
├── monitor.py              # System performance monitoring
├── domain_training/        # 🧬 Domain Training Module
│   ├── models.py           # Pydantic schemas
│   ├── personality.py      # Personality presets & prompt builder
│   └── trainer.py          # Domain CRUD, ingestion, chain builder
├── frontend/               # React + Vite frontend
│   └── src/
│       ├── App.jsx          # Main application with routing
│       ├── DomainLab.jsx    # Domain management UI
│       ├── DomainChat.jsx   # Domain-scoped chat interface
│       └── index.css        # Design system
├── requirements.txt
└── .gitignore

🚀 Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Ollama running locally with models:
    ollama pull qwen3:8b
    ollama pull nomic-embed-text

Backend Setup

cd antigrav-nexus
python -m venv .venv
.venv\Scripts\activate  # Windows
pip install -r requirements.txt

# Ingest documents (optional)
python ingest.py ./docs

# Start API server
python -m uvicorn api:app --reload --port 8000

Frontend Setup

cd frontend
npm install
npm run dev

Open http://localhost:5173 and create an account to start.

🧬 Domain Training

  1. Navigate to 🧬 Domain Lab in the sidebar
  2. Click + New Domain — name it, describe the niche, pick a personality
  3. Upload domain-specific documents (PDF, DOCX, TXT, MD)
  4. Click 💬 Chat to query your domain-specific AI

Each domain gets its own isolated ChromaDB collection — zero data cross-contamination.

📡 API Endpoints

Method Endpoint Description
POST /api/signup Create user account
POST /api/login Authenticate user
POST /api/chat General RAG chat (streaming)
GET /api/stats System telemetry
GET /api/domains List all domains
POST /api/domains Create domain
POST /api/domains/chat Domain-specific chat
POST /api/domains/{id}/upload Upload training data
DELETE /api/domains/{id} Delete domain
GET /api/personality-presets List personality presets

🛠️ Tech Stack

  • LLM: Qwen3 via Ollama (local, air-gapped)
  • Embeddings: nomic-embed-text
  • Vector DB: ChromaDB
  • Backend: FastAPI + LangChain
  • Frontend: React + Vite
  • Auth: SQLite + bcrypt

📜 License

MIT

About

Local-first RAG platform with Domain Training & Personality Engine — powered by Ollama + Qwen3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors