Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reebot

Reebot is a source-grounded chat application. Users create rooms, attach PDFs or URLs, and ask questions that are answered from those sources.

Architecture

  • frontend/: React and Vite user interface.
  • backend/: Express API, MongoDB models, Chroma Cloud hybrid retrieval, and OpenAI chat.
  • backend/src/pdf_parser.py: extracts PDF content as Markdown with PyMuPDF4LLM.
  • backend/src/pdfParser.js: the Node-to-Python process boundary.
  • backend/src/markdownChunker.js: splits parsed Markdown by headings, sections, structural blocks, and sentence boundaries.

Room ingestion preserves Markdown structure and heading context while keeping chunks within the configured size whenever a structural block permits it. PDFs are stored in backend/uploads/. Answers include chunk citations; hovering a PDF citation renders its source page with the supporting text highlighted.

Chroma Cloud setup

Create a Chroma Cloud database and API key, then add CHROMA_API_KEY, CHROMA_TENANT, and CHROMA_DATABASE to backend/.env. Reebot creates the reebot-hybrid-v1 collection with a Chroma BM25 sparse index and combines it with OpenAI dense-vector results using Reciprocal Rank Fusion (70% dense, 30% BM25). BM25 index statistics and retrieval are managed by Chroma, not MongoDB.

Collection schemas cannot currently be changed after creation. Sources stored in the former local reebot collection therefore need to be uploaded again.

Run with Docker

  1. Copy .env.example to backend/.env and set OPENAI_API_KEY, JWT_SECRET, CHROMA_API_KEY, CHROMA_TENANT, and CHROMA_DATABASE.

  2. Start the stack:

    docker compose up --build
  3. Open http://localhost:5173 for rooms and chat.

Local development

The backend requires Node.js 22+, Python 3, the packages in backend/requirements.txt, MongoDB, and a Chroma Cloud account. MongoDB must be available when running the backend outside Docker.

cd backend
npm ci
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
PYTHON_BIN="$PWD/.venv/bin/python" npm run dev

In another terminal:

cd frontend
npm ci
npm run dev

Because backend/.env is in the backend working directory, dotenv loads it automatically. PYTHON_BIN selects the virtual environment used by the PDF parser. Set PDF_PARSE_TIMEOUT_MS in backend/.env to override the default two-minute parser timeout.

PyMuPDF4LLM and PyMuPDF are AGPL-3.0 licensed unless used under a commercial license. Confirm that this is compatible with your distribution model.

About

Source-grounded RAG with hybrid search and citations.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages