- Python 61.6%
- TypeScript 36.4%
- CSS 0.8%
- Dockerfile 0.5%
- HTML 0.3%
- Other 0.4%
| api | ||
| docs | ||
| ui | ||
| .dockerignore | ||
| .gitignore | ||
| campfire.yaml.example | ||
| CLAUDE.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
Campfire
A self-hosted AI chat interface that connects to any OpenAI-compatible API. Run your own ChatGPT-like experience backed by Ollama, OpenRouter, OpenAI, or any other provider -- with full control over your data.
Features
- Multi-provider support -- Connect to Ollama (local), OpenRouter, OpenAI, or any OpenAI-compatible API simultaneously
- Configurable agents -- Create named personas with custom system prompts, models, and parameters
- Streaming responses -- Token-by-token SSE streaming with cancel support
- Rich Markdown rendering -- Syntax-highlighted code blocks, tables, LaTeX math, and more
- Dark and light themes -- Follows your OS preference by default, or set manually
- Settings UI -- Manage providers, models, and agents from the browser
- Local data ownership -- All data stays on your machine in SQLite. No telemetry, no cloud dependencies
- Single-command deploy -- One
docker compose upto run everything
Quick Start
Prerequisites
- Docker and Docker Compose
- At least one LLM backend (e.g., Ollama running locally, or an API key for OpenRouter/OpenAI)
1. Clone and configure
git clone https://github.com/jhonnold/campfire.git
cd campfire
cp campfire.yaml.example campfire.yaml
Edit campfire.yaml if you need to change server settings (the defaults work out of the box). Providers, models, and agents are configured through the Settings UI after starting the app.
2. Start
docker compose up --build -d
3. Open
Navigate to http://localhost:8080.
If no providers are configured yet, you'll see a setup guide that walks you through adding one in Settings.
Verify
curl localhost:8080/api/v1/health
# {"status":"ok","version":"0.1.0"}
Configuration
Campfire is configured via campfire.yaml for server settings and the Settings UI for everything else (providers, models, agents, appearance).
server:
host: "0.0.0.0" # Listen address
port: 8080 # Listen port
data_dir: "/data" # SQLite database and uploads (Docker volume)
log_level: "INFO" # DEBUG, INFO, WARNING, ERROR
API keys and other secrets can use ${VAR_NAME} syntax for environment variable substitution. See campfire.yaml.example for a template and docs/prd.md (Appendix A) for the full configuration reference.
Architecture
campfire/
api/ Python backend (FastAPI, SQLAlchemy, Alembic)
ui/ React frontend (TypeScript, Vite, Tailwind v4)
docs/ Design docs and feature specs
Dockerfile Multi-stage build (Node + Python)
docker-compose.yml
Backend: FastAPI serves the REST API and proxies SSE streams from providers. SQLite (WAL mode) stores chats, agents, providers, and models. Alembic handles schema migrations automatically on startup.
Frontend: React SPA built with Vite and Tailwind CSS v4. Communicates with the backend over /api/v1/* endpoints. Served as static files by the backend in production.
Development
Prerequisites
- Python 3.12+
- Node.js 22+
- uv (Python package manager)
Backend
cd api
uv sync --extra dev # Install dependencies (including test deps)
uv run python -m pytest -v # Run tests (use uv run, not bare pytest)
uv run alembic upgrade head # Run migrations manually
Frontend
cd ui
npm install # Install dependencies
npm run dev # Start Vite dev server
npm run build # Production build
npm run lint # ESLint
npx tsc --noEmit # Type check
Roadmap
Campfire is built in phases. See docs/prd.md for the full plan.
| Phase | Focus | Status |
|---|---|---|
| 1 -- Foundation | Chat, providers, agents, streaming, themes | Active |
| 2 -- Organization | Projects, file uploads, branching, search | Planned |
| 3 -- Rich Content | Artifacts, thinking traces, tool execution | Planned |
| 4 -- Knowledge | Memory, templates, MCP integration, export | Planned |
| 5 -- Polish | Keyboard shortcuts, usage tracking, performance | Planned |
License
This project is for personal use. No license has been specified yet.