Skip to content
John R. D'Orazio edited this page Feb 18, 2026 · 4 revisions

OntoKit API

Welcome to the OntoKit API documentation. OntoKit is a collaborative OWL ontology curation platform with real-time editing and Git integration.

Overview

The OntoKit API is a FastAPI-based backend service that provides:

  • RESTful API for managing ontologies, classes, properties, and individuals
  • Project management with public/private visibility and team collaboration
  • Authentication via Zitadel (OpenID Connect)
  • Real-time collaboration support via WebSockets
  • Object storage integration with MinIO for ontology files

Quick Links

Tech Stack

Component Technology
Framework FastAPI (Python 3.11+)
Database PostgreSQL 17 + SQLAlchemy 2.0 (async)
Migrations Alembic
Cache Redis
Object Storage MinIO (S3-compatible)
Authentication Zitadel (OIDC)
Ontology Processing RDFLib, OWLReady2

Deployment Modes

OntoKit supports two deployment configurations:

Mode Compose File Best For
Full Docker compose.yaml Quick start, CI/CD, testing
Hybrid compose.prod.yaml Development with IDE debugging, production

Quick Start (Full Docker)

Everything runs in Docker containers:

# 1. Clone the repository
git clone https://github.com/JohnRDOrazio/ontokit-api.git
cd ontokit-api

# 2. Start all services (including API)
docker compose up -d

# 3. Run database migrations
docker compose exec api alembic upgrade head

# 4. Configure Zitadel authentication (creates OIDC apps, updates .env files)
./scripts/setup-zitadel.sh --update-env

# 5. Recreate API/worker containers to pick up new credentials
docker compose up -d --force-recreate api worker

The API is available at http://localhost:8000 with interactive docs at http://localhost:8000/docs.

Quick Start (Hybrid Mode)

Infrastructure in Docker, API on host for development:

# 1. Clone the repository
git clone https://github.com/JohnRDOrazio/ontokit-api.git
cd ontokit-api

# 2. Start infrastructure services
docker compose -f compose.prod.yaml up -d

# 3. Create Python virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# 4. Install dependencies
pip install -e ".[dev]"

# 5. Configure environment
cp .env.example .env

# 6. Configure Zitadel authentication (creates OIDC apps, updates .env files)
./scripts/setup-zitadel.sh --update-env

# 7. Run database migrations
alembic upgrade head

# 8. Start the development server
uvicorn ontokit.main:app --reload

Service URLs

Service URL
OntoKit API http://localhost:8000
API Docs (Swagger) http://localhost:8000/docs
API Docs (ReDoc) http://localhost:8000/redoc
Zitadel Console http://localhost:8080/ui/console
MinIO Console http://localhost:9001
Mailpit (Email Testing) http://localhost:8025

Default Zitadel Admin: admin@ontokit.localhost / Admin123!

Related Projects

  • ontokit-web - Next.js frontend application
  • ontokit-deploy - Production deployment configuration

Clone this wiki locally