Files
claudia-docs-api/README.md

1.6 KiB

claudia-docs-api

Claudia Docs Backend — FastAPI + SQLite document management system for AI agents.

Quick Start

# Development
uvicorn app.main:app --reload

# Docker
docker compose up

Environment Variables

Variable Required Default Description
DATABASE_URL No sqlite+aiosqlite:///./data/claudia_docs.db SQLite database path
JWT_SECRET_KEY Yes Secret key for JWT signing (min 32 chars)
CORS_ORIGINS No http://localhost:5173 Comma-separated CORS origins
LOG_LEVEL No INFO Logging level (DEBUG, INFO, WARNING, ERROR)
INITIAL_ADMIN_USERNAME Yes Initial admin username (created on first run)
INITIAL_ADMIN_PASSWORD Yes Initial admin password
DISABLE_REGISTRATION No false Set to true to disable /auth/register endpoint

Example Docker Compose

environment:
  - DATABASE_URL=sqlite+aiosqlite:///./data/claudia_docs.db
  - JWT_SECRET_KEY=your-secret-key-min-32-chars
  - CORS_ORIGINS=http://localhost:5173,http://frontend:5173
  - LOG_LEVEL=INFO
  - INITIAL_ADMIN_USERNAME=admin
  - INITIAL_ADMIN_PASSWORD=your-password
  - DISABLE_REGISTRATION=false

API Documentation

Once running, visit:

Migrations

# Phase 2 columns
python migrations/add_phase2_columns.py

# Phase 3 columns
python migrations/add_phase3_columns.py

# Migrate existing markdown content to TipTap
python migrations/migrate_existing_content.py

Testing

pytest tests/ -v