ChatForge is a Django-based desktop-style chat application that integrates with multiple AI backends (via OpenRouter). It features:
- 🎯 Multiple AI models (GPT-4.1 Mini, Claude 3.7, Qwen, Gemini, etc.)
- 🔄 Token-based pay-as-you-go billing
- 📂 Persistent chat sessions with rename & delete
- 🔄 Dynamic model list with manual “Refresh models”
- ⚙️ User settings (API key, default model)
- 🖼️ Copy-to-clipboard on every message
- 🎨 Responsive, oval chat bubbles & sidebar navigation
git clone https://github.com/yonetici/chatforge-web.git
cd chatforge-webpython3 -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windowspip install --upgrade pip
pip install -r requirements.txtCreate a .env in project root with:
SECRET_KEY=your-django-secret-key
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
OPENROUTER_API_KEY=your-openrouter-api-keypython manage.py migrate
python manage.py createsuperuserpython manage.py runserverBrowse to http://127.0.0.1:8000/chat/ to start chatting!
chatforge-web/
├── accounts/ # User & settings app
│ ├── migrations/
│ ├── models.py # AIModel, User (custom)
│ ├── views.py # settings_view, refresh_models
│ └── templates/accounts/
│ └── settings.html
├── chat/ # Chat app
│ ├── migrations/
│ ├── models.py # ChatSession, Message
│ ├── services.py # OpenRouterClient
│ ├── views.py # session_list, session_detail, send, rename, delete
│ └── templates/chat/
│ ├── chat_base.html
│ └── session_detail.html
├── core/ # Landing/home app (optional)
├── chatforge/ # Django project settings
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── requirements.txt
└── README.md
- API key: paste your OpenRouter key on Settings page
- Default model: choose from the dropdown (dynamic or fallback list)
- Refresh models: manually reload available models
- New chat: click + Yeni Sohbet in sidebar
- Rename: edit the title inline and ✓ to save
- Delete: click 🗑 and confirm
- Sidebar: shows all sessions with latest snippet & timestamp
- Oval chat bubbles with pointer arrows
- Copy any message via the 📋 icon
- Send via button or Enter (Shift+Enter for newline)
- Auto-scroll to latest message
For production, consider:
- Use Gunicorn + Nginx reverse proxy
- Set
DEBUG=Falseand configureALLOWED_HOSTS - Securely store secrets (e.g. via environment variables)
- Serve static files with
collectstatic& S3 or CDN
Example Gunicorn command:
gunicorn chatforge.wsgi:application --bind 0.0.0.0:8000 --workers 3- Fork the repo
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m "Add your feature") - Push to your fork (
git push origin feature/YourFeature) - Open a Pull Request
Please follow PEP 8 & Django best practices.
This project is licensed under the MIT License. See LICENSE for details.