A modern, full-stack AI chatbot application powered by local LLMs
Features โข Demo โข Installation โข Usage โข Tech Stack โข Contributing
- ๐ Dark/Light Mode - Seamless theme switching with custom dark blue palette
- ๐ฑ Fully Responsive - Works flawlessly on desktop, tablet, and mobile
- ๐ญ Smooth Animations - Elegant transitions and fade-in effects
- ๐ฏ Modern Design - Clean, intuitive interface with gradient accents
- ๐จ๏ธ Multiple Chat Sessions - Create and manage unlimited conversations
- ๐ Search Chats - Quickly find previous conversations
- ๐ Message History - Full conversation context maintained
- โก Real-time Responses - Instant AI replies with typing indicators
- ๐๏ธ Delete Chats - Easy cleanup of unwanted conversations
- ๐ค Local LLM - Runs completely offline using Ollama (no API costs!)
- ๐พ Persistent Storage - SQLite database for chat history
- ๐ REST API - Clean Django REST Framework backend
- โ๏ธ Modern Frontend - React 19 with hooks and functional components
- ๐ฆ State Management - React Query for efficient data fetching
- โ๏ธ React 19.2.0 - Modern UI library
- ๐จ Tailwind CSS 4.0 - Utility-first CSS framework
- ๐ React Router 7.9 - Client-side routing
- ๐ TanStack Query 5.90 - Data fetching and caching
- ๐ญ Lucide React - Beautiful icon library
- โก Vite 7.2 - Lightning-fast build tool
- ๐ Django 5.1 - High-level Python web framework
- ๐ Django REST Framework 3.15 - Powerful API toolkit
- ๐๏ธ SQLite - Lightweight database
- ๐ฆ LangChain - LLM application framework
- ๐ค Ollama - Local LLM runtime
- ๐ฆ Llama 2 - Meta's open-source language model
- ๐ป Runs Locally - No internet required after setup
- ๐ Private - Your data never leaves your machine
- ๐ฐ Free - No API costs or rate limits
- ๐ Python 3.10+
- ๐ฆ Node.js 18+
- ๐บ Homebrew (macOS)
- ๐ค Ollama
git clone https://github.com/Yirmeyahuu/Askium.git
cd Askium# Navigate to backend
cd backend
# Create virtual environment
python -m venv virt
source virt/bin/activate # On Windows: virt\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run migrations
python manage.py migrate
# Start Django server
python manage.py runserver# Navigate to frontend (in a new terminal)
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev# Install Ollama
brew install ollama
# Start Ollama service
brew services start ollama
# Pull Llama 2 model (in a new terminal)
ollama pull llama2
# Verify installation
ollama list-
Start all services:
# Terminal 1: Django backend cd backend && python manage.py runserver # Terminal 2: React frontend cd frontend && npm run dev # Terminal 3: Ollama (if not running as service) ollama serve
-
Open your browser:
http://localhost:5173 -
Start chatting!
- Click "New Chat" to create a conversation
- Type your message and press Enter
- Switch between light/dark mode with the theme toggle
- Search through your chat history
- Delete unwanted conversations
llm-chatbot/
โโโ backend/ # Django backend
โ โโโ chats/ # Chat app
โ โ โโโ models.py # Database models
โ โ โโโ views.py # API endpoints
โ โ โโโ serializers.py # Data serialization
โ โ โโโ utils.py # Ollama integration
โ โโโ llmproject/ # Project settings
โ โโโ requirements.txt # Python dependencies
โ
โโโ frontend/ # React frontend
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โ โโโ Sidebar.jsx # Chat list sidebar
โ โ โ โโโ ChatRoom.jsx # Chat interface
โ โ โ โโโ ThemeToggle.jsx
โ โ โโโ context/ # React context
โ โ โ โโโ ThemeContext.jsx
โ โ โโโ services/ # API services
โ โ โ โโโ api.js
โ โ โโโ App.jsx # Main app component
โ โ โโโ App.css # Global styles
โ โโโ package.json # Node dependencies
โ
โโโ README.md # You are here!
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/sessions/ |
List all chat sessions |
POST |
/api/sessions/new/ |
Create new chat session |
GET |
/api/sessions/:id/ |
Get specific chat session |
POST |
/api/sessions/:id/ |
Send message to chat |
DELETE |
/api/sessions/:id/ |
Delete chat session |
Edit backend/chats/utils.py:
llm = Ollama(
model="mistral", # or "llama3.2", "codellama", etc.
base_url="http://localhost:11434",
temperature=0.7
)Edit frontend/src/App.css:
@theme {
--color-dark-blue-950: #your-color;
}Higher = more creative, Lower = more focused
temperature=0.7 # Range: 0.0 to 1.0# Check if Ollama is running
ollama list
# Restart Ollama service
brew services restart ollama
# Or start manually
ollama serve# Backend (Django)
python manage.py runserver 8001
# Frontend (Vite)
npm run dev -- --port 5174cd backend
python manage.py migrate
python manage.py makemigrationsThis project is licensed under the MIT License - see the LICENSE file for details.
- Ollama - For making local LLMs accessible
- LangChain - For the excellent LLM framework
- Meta AI - For the Llama 2 model
- Tailwind CSS - For the amazing styling framework
- Lucide - For beautiful icons
Project Link: https://github.com/Yirmeyahuu/Askium.git