Campfire is a self-hosted AI chat interface with a FastAPI backend, React frontend, and SQLite database. It supports multiple LLM providers via OpenAI-compatible APIs, configurable agents with custom personas, streaming responses, and markdown rendering. Ships as a single Docker container.
  • Python 61.6%
  • TypeScript 36.4%
  • CSS 0.8%
  • Dockerfile 0.5%
  • HTML 0.3%
  • Other 0.4%
Find a file
2026-08-04 18:35:12 -07:00
api chore(refactor): generic cleanup with /simplify 2026-08-04 18:35:12 -07:00
docs feat: cool slate light theme, starfield as React component 2026-04-10 17:34:12 -07:00
ui chore(refactor): generic cleanup with /simplify 2026-08-04 18:35:12 -07:00
.dockerignore feat: Docker multi-stage build with Compose for single-command startup 2026-04-04 17:17:28 -07:00
.gitignore chore: add .gitignore and remove local config from tracking 2026-04-04 17:44:43 -07:00
campfire.yaml.example feat: config system with YAML parsing and env var substitution 2026-04-04 16:47:58 -07:00
CLAUDE.md docs: add README and update CLAUDE.md 2026-04-11 07:56:51 -07:00
docker-compose.yml feat: Docker multi-stage build with Compose for single-command startup 2026-04-04 17:17:28 -07:00
Dockerfile fix: update Dockerfile to Node 22 and regenerate lockfile 2026-04-04 19:54:53 -07:00
README.md docs: add README and update CLAUDE.md 2026-04-11 07:56:51 -07:00

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 up to run everything

Quick Start

Prerequisites

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.