Skip to content

Repository files navigation

Logos

A backend service for turning YouTube sermons into a searchable, personal knowledge base.

Overview

Logos helps individuals capture and organize insights from audio messages without having to take manual notes. It takes a video input, processes the transcript to extract key teachings, and allows users to query their entire listening history using natural language. This removes the friction of revisiting past lessons and makes personal study highly accessible without requiring complicated setup.

System Architecture

flowchart LR
  Client["Web Client"]
  API["API Server"]
  Queue["Redis Queue"]
  Worker["Celery Worker"]
  DB[("PostgreSQL")]
  External["External Services"]

  Client --> API
  API --> DB
  API --> Queue
  Queue --> Worker
  Worker --> External
  Worker --> DB

  style Client fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#fff
  style API fill:#2e1065,stroke:#8b5cf6,stroke-width:2px,color:#fff
  style Queue fill:#4c0519,stroke:#ef4444,stroke-width:2px,color:#fff
  style Worker fill:#2e1065,stroke:#8b5cf6,stroke-width:2px,color:#fff
  style DB fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#fff
  style External fill:#451a03,stroke:#f59e0b,stroke-width:2px,color:#fff
Loading

Features

  • Automated Sermon Analysis: Automatically generates summaries, key teachings, and themes from a simple YouTube link.
sequenceDiagram
  actor User
  participant API as "API Server"
  participant Queue as "Redis Queue"
  participant Worker as "Celery Worker"
  participant DB as "Database"

  User->>API: Send YouTube link
  API->>DB: Mark status pending
  API->>Queue: Enqueue task
  API->>User: Confirm submission
  Worker->>Queue: Consume task
  Worker->>Worker: Fetch and process
  Worker->>DB: Save completed analysis
Loading
  • Contextual Q&A (RAG): Ask questions spanning multiple sermons and receive cited answers directly from the transcript content.
sequenceDiagram
  actor User
  participant API as "API Server"
  participant DB as "Database"
  participant LLM as "AI Model"

  User->>API: Ask question
  API->>DB: Find relevant chunks
  DB->>API: Return context
  API->>LLM: Generate cited answer
  LLM->>API: Return answer text
  API->>User: Display final response
Loading
  • Semantic Search: Find specific moments across an entire library using meaning rather than exact keywords.
  • Personalized Notes: Attach personal reflections to specific sermons alongside the generated AI analysis.

Installation

Clone the Repository:

git clone https://github.com/DanielPopoola/logos.git
cd logos

Set up your local environment and dependencies using uv. You will also need Docker to run the database and cache.

uv sync --all-extras --dev
docker compose up -d
cp .env.example .env

Make sure to populate your .env file with your real LLM API keys and Google Client credentials.

Run the database migrations and install your pre-commit hooks.

uv run alembic upgrade head
uv run pre-commit install

Usage

Once the infrastructure is up, start the FastAPI server and the Celery worker in separate terminals.

To start the API server:

uv run uvicorn app.main:app --reload

To start the background worker:

uv run celery -A app.workers.celery_app worker --loglevel=info

To submit a new sermon for processing, make a standard HTTP POST request.

curl -X POST http://localhost:8000/v1/sermons \
  -H "Content-Type: application/json" \
  -H "Cookie: session_token=YOUR_SESSION_TOKEN" \
  -d '{"youtube_url": "https://youtube.com/watch?v=ABC123"}'

If you prefer testing the pipeline directly without hitting the API endpoints, you can use the verification script provided.

uv run python scripts/verify_ingestion.py "https://www.youtube.com/watch?v=VIDEO_ID"

Technologies Used

Technology Purpose
FastAPI High-performance Python web framework for building the REST API.
PostgreSQL & pgvector Primary data storage and vector search engine for embeddings.
SQLAlchemy & Alembic ORM for database interactions and migration management.
Celery & Redis Task queue and broker for managing asynchronous video ingestion.
Gemini LLM Powers transcript analysis, summaries, and query embeddings.
pytest & uv Testing framework and fast Python package management.

Author Info

Badges

Python FastAPI PostgreSQL Celery Redis

Readme was generated by Dokugen

About

An application that turns YouTube sermons into a searchable, personal knowledge base — so users can capture, understand, organize, and revisit what they've learned across every message they've listened to.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages