A full-stack AI chat assistant that runs entirely on your machine — no cloud, no API costs, no data leaving your device. Built with React, Django REST Framework, and Ollama (Qwen 4B).
Why local? Most AI assistants send your conversations to external servers. This project was built on the deliberate architectural decision to keep inference local — eliminating API costs entirely and ensuring 100% data privacy.
- Fully offline — zero cloud dependency, zero API cost
- Persistent chat sessions — ChatGPT-style sidebar with multiple conversations
- Conversation memory — full message history passed to the model for context-aware responses
- Auto-generated titles — chat sessions are named automatically based on content
- Real-time chat UI — no page reloads, instant responses
- Delete sessions — clean session management
| Layer | Technology |
|---|---|
| Frontend | React.js |
| Backend | Django, Django REST Framework |
| AI Runtime | Ollama |
| LLM Model | Qwen 4B |
| Database | SQLite |
React UI → Django REST API → Ollama (local) → Qwen 4B (on-device)
↕
SQLite DB
(session & message store)
- User sends a message from the React frontend
- Django backend receives the request and retrieves conversation history from SQLite
- Full conversation context is passed to the local LLM via Ollama
- Qwen 4B generates a response entirely on-device
- Response is saved to the database and returned to the UI
No data ever leaves your machine.
- Python 3.10+
- Node.js 18+
- Ollama installed on your machine
git clone https://github.com/PraveenSankar03/local-llm-assistant.git
cd local-llm-assistant# Install Ollama from https://ollama.com, then run:
ollama pull qwen:4b
# Verify it works
ollama run qwen:4bcd backend
pip install -r requirements.txt
python manage.py migrate
python manage.py runservercd frontend
npm install
npm startNavigate to http://localhost:3000 in your browser.
local-llm-assistant/
├── backend/
│ ├── chat/ # Django app — models, views, serializers
│ ├── manage.py
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ └── App.js
│ └── package.json
└── README.md
Why Ollama over cloud APIs? Cloud LLM APIs (OpenAI, Gemini, etc.) charge per token and send your data to external servers. Ollama runs open-source models locally, making this assistant completely free to run after setup and fully air-gapped for privacy-sensitive use cases.
Why Qwen 4B? Qwen 4B offers a strong balance between response quality and hardware requirements — capable of running on a mid-range machine without a dedicated GPU, while still producing coherent, context-aware responses.
