Skip to content

3xCaffeine/RAGnarok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAGnarok

Fast and modern RAG powered research and documentation assistant for professionals

Tech Stack

NextJs Python FastAPI AstraDB Docker Gemini Bun GitHub Actions Ollama Caddy UV DigitalOcean

Overview

The project consists of four main components:

  • Ingestion Pipeline
    Reads documents (PDFs, text, image and audio transcriptions), splits and vectorizes them, and stores embeddings in a vector database.

  • Backend API
    A FastAPI service exposing endpoints for querying the vector store, invoking SoTa LLMs such as Deepseek, and streaming chat responses.

  • Frontend UI
    A NextJS + Typescript chat interface that calls the Backend API for conversational RAG.

  • Deployment Manifests
    Dockerfiles and Docker Compose manifests to deploy entire project locally or in the cloud.

System Architecture

Prerequisites

  • Docker & Docker Compose
  • Node.js (v20+) and Bun
  • Python (v3.11+)
  • LLM API key (Groq, Gemini, etc.)
  • AstraDB Vector database credentials

Project Structure

.
├───.github
│   └───workflows
├───assets
├───backend
│   └───app
│       ├───models
│       ├───routes
│       ├───services
│       └───utils
├───deployment
├───frontend
│   ├───public
│   └───src
│       ├───app
│       │   └───test
│       ├───components
│       │   └───ui
│       ├───context
│       └───lib
└───ingestion-pipeline

20 directories, 65 files

Setup

  1. Clone the repo

    git clone https://github.com/3xCaffeine/rag.git
    cd rag
  2. Configure environment variables

    Copy the example .env.example into each service folder and add the API keys, URLs and AstraDB database credentials.

  3. Run the backend API and Ollama embedding model with Docker Compose

    docker-compose up -d
    

Note

In case GPU support is unavailable on the machine, utilize a hosted text embedding model (OpenAI Ada, Jina AI, Cohere etc.) and remove the Ollama section from the Compose config.

  1. Run the dev server for the chat frontend

    bun i
    bun dev
  2. (Optional) For remote deployment with custom domains, configure the deployment/Caddyfile otherwise remove the Caddy section from Compose configuration.

Expected Result

$ docker compose ps
NAME            IMAGE                  COMMAND                  SERVICE   CREATED         STATUS                   PORTS
backend-api-1   ragbackend:latest      "fastapi run app/mai…"   api       3 minutes ago   Up 3 minutes (healthy)   0.0.0.0:8000->8000/tcp
ollama          ollama/ollama:latest   "/bin/sh ./run_model…"   ollama    9 seconds ago   Up 9 seconds             0.0.0.0:11434->11434/tcp

Usage

Visit Ragnarok chat at http://localhost:3000 in the browser.

Demo

Authors

This project was built for the AISoC Chronos Hackathon 2025 by the 3xCaffeine team.

Version

Version Date Comments
1.0 May 14th, 2025 Revised release

About

AISoC's Chronos Hackathon, RAGnarok Track Project

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •