Django REST + Socket.IO backend for the Dietrich Analysis Research Education (DARE) Platform.
- What is DARE?
- Overview
- Quick Start
- Documentation
- Tech Stack
- What is included in this repo?
- What is not included in this repo?
- Stay in touch
- Acknowledgements
- Contributors
- License
The Dietrich Analysis Research Education (DARE) Platform is an open-source, multi-LLM research and conversation platform. It provides a single, vendor-agnostic interface to OpenAI, Anthropic Claude, Google Gemini, and self-hosted LLaMA models, with file-grounded retrieval (RAG), Model Context Protocol (MCP) tool integration, visual multi-step workflows, and real-time streaming. DARE is built for researchers and institutions that need more than a chatbot — document intelligence, reproducible workflows, and per-user usage tracking in one place.
This repository is the DARE backend — the Django ASGI service that powers the platform. It handles:
- Real-time streaming chat across providers
- Document upload, processing, and RAG over vector stores (Pinecone, Weaviate)
- Multi-step AI workflow execution via a visual DAG builder
- Token usage tracking and per-user billing
- Access-code based registration for institutional deployments
- Inter-service authentication for partner platforms (e.g. SocraticBooks)
DARE runs standalone. The DARE backend and frontend are all you need to run the platform — nothing else is required. SocraticBooks is a separate, optional platform built on top of DARE.
flowchart TB
clients["Clients\nDARE Frontend, partner frontends, mobile"]
subgraph backend["DARE Backend (Django ASGI)"]
auth["Auth / Users"]
chat["Conversations + Chat"]
files["Files / RAG"]
workflows["Workflow Engine"]
services["Service Layer\nLLM, vector, MCP, email"]
end
postgres["Postgres"]
redis["Redis + RQ"]
vectors["Vector Stores\nPinecone / Weaviate"]
llms["LLM APIs\nOpenAI, Claude, Gemini"]
ollama["Ollama\nself-hosted models"]
clients <-->|REST + Socket.IO| backend
auth --> postgres
chat --> services
files --> services
workflows --> services
services --> postgres
services --> redis
services --> vectors
services --> llms
services --> ollama
See docs/architecture.md for the full diagram and docs/architecture/overview.md for component-level detail.
Fastest path — Docker brings up the whole stack (API, worker, Postgres, Redis, Weaviate):
For local development, scripts/dev-setup.sh --demo-user does all of the below in one command
(submodule init, env files, build, demo login) — see INSTALL.md.
Document generation is powered by
quillmark-mcp (Typst
rendering over MCP), vendored as the quillmark-mcp/ git submodule and run as
a service in the compose stack.
# 1. Clone (with the quillmark-mcp submodule)
git clone --recurse-submodules https://github.com/cmudco/dare-backend.git
cd dare-backend
# 2. Configure
cp .example.env .env
# Edit .env. At minimum, set DJANGO_SECRET_KEY and one provider key
# such as OPENAI_API_KEY, CLAUDE_API_KEY, or GEMINI_API_KEY.
# 3. Build and start the backend stack
docker compose up --build -d
docker compose exec web python manage.py createsuperuser
docker compose exec web python manage.py collectstatic --noinput # so the admin panel renders with its CSS/JS
curl http://localhost:8000/api/health/The API is at http://localhost:8000/; Swagger UI at http://localhost:8000/api/docs/.
See QUICKSTART.md for the full walkthrough — the local-Python path, collecting static files, and creating an access code so users can register — and DEPLOYMENT.md for production and server deployment.
| Doc | What's in it |
|---|---|
| QUICKSTART.md | Run the backend locally — Docker stack, or local Python in a venv |
| DEPLOYMENT.md | Production deployment — Docker and bare metal |
| docs/configuration.md | Every environment variable, with type, default, and description |
| docs/architecture.md | Component diagram and request flows |
| docs/admin-guide.md | User/role management, access codes, analytics |
| CONTRIBUTING.md | Issues, pull requests, coding standards |
| CHANGELOG.md | Release notes |
| SECURITY.md | Vulnerability disclosure process |
| docs/integration/socraticbooks-dare-proxy.md | DARE/SocraticBooks integration contract and update rules |
| docs/architecture/socketio-events.md | Socket.IO event reference |
| docs/api/dare-backend.md | REST API reference |
| docs/code-standards.md | Coding conventions |
- Python 3.13, Django 5.1, Django REST Framework
- Django Channels + python-socketio for real-time streaming
- Django RQ + Redis for background jobs
- PostgreSQL (production) / SQLite (local dev)
- Weaviate and Pinecone for vector storage
- Ollama for self-hosted LLaMA models
- Django apps for auth/users, conversations + chat, files/RAG, and the workflow engine
core/services/— the service layer (LLM providers, vector stores, MCP, email)docs/— architecture, configuration, admin, API reference, deployment, and integration guides- Docker Compose stack (API, RQ worker, Postgres + pgvector, Redis, Weaviate) and
requirements/ - Supporting docs —
QUICKSTART.md,DEPLOYMENT.md,CONTRIBUTING.md,CHANGELOG.md,SECURITY.md,BRAND.md
- dare-frontend — the React/TypeScript web client (run it separately)
- socraticbooks-backend and socraticbooks-react — the SocraticBooks platform that proxies to DARE
- External infrastructure you provide yourself — LLM provider API keys, an Ollama host for self-hosted models, and managed Postgres/Redis/vector-store instances in production
- Found a bug or have a feature request? Open an issue on the project's GitHub repository.
- Questions or general inquiries? Email the project team at vks@andrew.cmu.edu.
- Security disclosures: see SECURITY.md.
DARE is an Open Forum for AI (OFAI) initiative, Carnegie Mellon University Libraries.
The DARE name and marks are owned by Carnegie Mellon University. Use of the name, wordmark, Scotty dog mark, header lockup, and footer badge is governed by the DARE Brand Guidelines & Usage Policy, independently of the software license.
This software integrates with third-party APIs (Anthropic, OpenAI, Google, and others); use of those APIs is subject to each provider's own Terms of Service.
DARE is built and maintained by contributors at Carnegie Mellon University and in the open-source community.
Creators
Sayeed Choudhury Creator |
![]() Vincent Sha Creator |
![]() George Cann Creator |
Team
![]() Carl Skipper Contributor |
Muhammad Abdurrehman Team Lead |
Brian Wingenroth Developer |
Farhat Abbas Developer |
Hariss M. Developer |
Eira Khan QA |
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). The software license does not grant rights to the DARE name or marks; see the DARE Brand Guidelines & Usage Policy.
See the LICENSE file for the full license text, or visit https://www.gnu.org/licenses/agpl-3.0.en.html.


