Skip to content

An LLM-powered system that understands Outline documents, and helps teams query, summarize, and reason over them securely.

License

Notifications You must be signed in to change notification settings

carakawedhatama/outline-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outline-LLM

Outline LLM Banner

AI-powered document assistant for Outline wiki

Query, summarize, and reason over your internal documentation using RAG.

MIT License Python React

FeaturesQuick StartConfigurationArchitecture


Features

🔄 Auto-Sync with Outline — Periodically fetches documents from your Outline wiki
🔍 Semantic Search — Find relevant content using vector similarity search
💬 Chat Interface — Natural language queries with AI-powered responses
📝 Citations — Every answer includes source document references
🔒 Security — PII detection and prompt injection defense
Fast — Lightweight stack with ChromaDB and LiteLLM

Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • uv (Python package manager)
  • An Outline account with API access
  • An OpenAI API key (or compatible LLM provider)

1. Clone and Setup

git clone https://github.com/carakawedhatama/outline-llm.git
cd outline-llm

# Copy environment template
cp .env.example .env

2. Configure Environment

Edit .env with your credentials:

# Required: Outline API (get token from Settings → API)
OUTLINE_API_URL=https://app.getoutline.com
OUTLINE_API_TOKEN=your_outline_api_token

# Required: OpenAI
OPENAI_API_KEY=your_openai_api_key

# Optional: For production deployments with custom domain
CORS_ORIGINS=https://your-domain.com
VITE_API_URL=https://api.your-domain.com

3. Install Dependencies

make install

4. Start Development Servers

make dev

This starts:

5. Trigger Initial Sync

Open the web app and click "Sync Now" in the sidebar, or:

curl -X POST http://127.0.0.1:8000/api/sync/trigger

Configuration

Variable Description Default
OUTLINE_API_URL Outline instance URL https://app.getoutline.com
OUTLINE_API_TOKEN API token from Outline settings
SYNC_INTERVAL_MINUTES Auto-sync frequency 15
LLM_MODEL LLM model to use gpt-4o-mini
EMBEDDING_MODEL Embedding model text-embedding-3-small
CORS_ORIGINS Allowed origins (comma-separated or *) *
VITE_API_URL API URL for frontend (cross-origin) (empty = same-origin)

See .env.example for all options.

Architecture

┌──────────────────────────────────────────────────────────┐
│                   React Frontend                         │
│              Chat UI + Sync Dashboard                    │
└─────────────────────────┬────────────────────────────────┘
                          │ API Calls
┌─────────────────────────▼────────────────────────────────┐
│                   FastAPI Backend                        │
│  ┌─────────────┐  ┌──────────────┐  ┌─────────────────┐  │
│  │ Sync Service│  │ RAG Service  │  │ Security Layer  │  |
│  │ (APScheduler)│  │ (Retrieval)  │  │ (PII/Injection)│  |
│  └──────┬──────┘  └──────┬───────┘  └─────────────────┘  |
│         │                │                               │
│  ┌──────▼──────┐  ┌──────▼───────┐                       │
│  │ Outline API │  │    LiteLLM   │                       │
│  └─────────────┘  └──────────────┘                       │
└─────────────────────────┬────────────────────────────────┘
                          │
            ┌─────────────┴─────────────┐
            │                           │
     ┌──────▼──────┐             ┌──────▼──────┐
     │  ChromaDB   │             │   SQLite    │
     │ (Vectors)   │             │ (Sync State)│
     └─────────────┘             └─────────────┘

Project Structure

outline-llm/
├── apps/
│   ├── api/                 # FastAPI backend
│   │   ├── src/
│   │   │   ├── models/      # Pydantic schemas
│   │   │   ├── routes/      # API endpoints
│   │   │   ├── services/    # Business logic
│   │   │   └── main.py
│   │   ├── Dockerfile
│   │   └── pyproject.toml
│   └── web/                 # React frontend
│       ├── src/
│       │   ├── components/  # UI components
│       │   └── App.tsx
│       ├── Dockerfile
│       └── package.json
├── docker-compose.yml
├── Makefile
├── .env.example             # ← Root env file (used by both apps)
└── README.md

Commands

make dev        # Start dev servers
make install    # Install dependencies
make build      # Build Docker images
make up         # Start Docker containers
make down       # Stop Docker containers
make logs       # View container logs
make test       # Run all tests

API Endpoints

Method Endpoint Description
POST /api/chat Send a RAG query
GET /api/sync/status Get sync status
POST /api/sync/trigger Trigger manual sync
GET /api/sync/documents List indexed documents
GET /health Health check

Docker Deployment

# Build and start
docker compose up -d

# View logs
docker compose logs -f

# Stop
docker compose down

Custom Domain Deployment

For deploying with a custom domain, set these in .env:

CORS_ORIGINS=https://docs.example.com
VITE_API_URL=https://api.example.com

License

MIT License. See LICENSE for details.


Made with ❤️ for better documentation search

About

An LLM-powered system that understands Outline documents, and helps teams query, summarize, and reason over them securely.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published