This guide walks you through cloning the repository, configuring the required environment variables, and bringing up the full NISIRA Assistant stack — MySQL database, Django backend, and React frontend — with a single Docker Compose command. By the end you will have initialized the RAG pipeline and received a cited answer from your document corpus.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HugoX2003/nisira-assistant/llms.txt
Use this file to discover all available pages before exploring further.
This guide covers local development using the default
docker-compose.yml (MySQL + ChromaDB). For production deployment with PostgreSQL, pgvector, and Nginx, see the Docker production deployment guide.Check prerequisites
Before you begin, make sure the following tools are installed and available on your
PATH:- Docker ≥ 24 and Docker Compose v2 (
docker compose version) - Git
- An LLM API key — either a Google AI API key for Gemini 2.0 Flash, or an OpenRouter API key for any OpenRouter-hosted model
Configure the backend environment
Copy the example environment file and open it for editing:Set at minimum the following variables in
backend/.env:Start the stack with Docker Compose
From the repository root, run:Docker Compose will build and start three services:
Wait until you see log output from the backend indicating that migrations have run and Gunicorn is listening:
| Service | Port | Description |
|---|---|---|
db | 3306 | MySQL 8.0 database |
backend | 8000 | Django REST API + RAG pipeline |
frontend | 3000 | React SPA (served via Nginx) |
The first build downloads the
sentence-transformers/all-mpnet-base-v2 model (~420 MB) and installs Python dependencies. Subsequent starts are much faster.Create an admin user
With the stack running, open a second terminal and execute the custom management command inside the backend container:The command creates a superuser with username
admin and password admin123. If the admin user already exists, the command resets the password to admin123 and ensures the account has superuser privileges.Log in to the frontend
Open http://localhost:3000 in your browser. You will be redirected to
/login.Enter the credentials for the admin user you just created. Admin users are automatically redirected to the Admin Panel at /admin; regular users land on the chat interface at /chat.Initialize the RAG pipeline
The vector store must be initialized before the system can answer questions. You can do this from the Admin Panel UI, or via the API with the JWT token obtained during login.Option A — Admin Panel UI: In the Admin Panel, navigate to the Embeddings tab and click Initialize / Generate Embeddings.Option B — cURL: First retrieve a token, then call the initialize endpoint:A successful response returns a JSON object with
"success": true and statistics about documents processed and embeddings generated. You can check the current state at any time:Send your first chat message
With the pipeline initialized, send a question through the chat endpoint:The
conversation_id: null field tells the API to start a new conversation. Pass the returned conversation_id value in subsequent requests to maintain context across turns.Review the response and sources
The API returns a JSON payload containing the bot’s answer and an array of source citations:In the browser at http://localhost:3000/chat, the response renders as formatted Markdown. Each source badge in the UI is clickable and opens the original PDF file in an inline viewer, scrolled to the referenced page.
What’s next?
You now have a fully functional local NISIRA Assistant instance. From here you can:- Upload documents — Use the Admin Panel to upload PDF, DOCX, PPTX, XLSX, or TXT files and generate their embeddings.
- Configure Google Drive sync — Set
ENABLE_GOOGLE_DRIVE=trueand provideGOOGLE_DRIVE_FOLDER_IDandGOOGLE_CREDENTIALS_JSONto enable automatic document polling. - Switch LLM providers — Change
LLM_PROVIDERtoopenrouterorgroqand provide the corresponding API key to try different models. - Review evaluation metrics — The Admin Panel’s Metrics tab shows per-query latency breakdowns, Precision@k, faithfulness scores, and aggregated rating data.
Ready to go to production? The Docker production deployment guide covers switching to PostgreSQL with pgvector, configuring Nginx as a reverse proxy, and setting up SSL with Certbot on DigitalOcean or a similar VPS.