Skip to content

Interactive, AI-assisted Talmud study platform with bilingual text, inline commentary, and smart navigation. Built with React

License

Notifications You must be signed in to change notification settings

EzraBrand/chavrutai-platform

Repository files navigation

ChavrutAI Platform

ChavrutAI is an enhanced Talmud study interface built on top of Sefaria's comprehensive text database. It addresses the practical limitations of standard digital Talmud interfaces by providing context continuity, improved navigation, and enhanced text processing for sustained study sessions.

Core Features

πŸ“– Context Continuity System

  • Adjacent Page Context: Automatically fetches relevant text from previous and next pages when sentences break across page boundaries
  • Seamless Reading: Eliminates jarring mid-sentence page breaks that plague most digital Talmud interfaces
  • Intelligent Display: Context appears with reduced opacity to distinguish from main page content

🧭 Comprehensive Navigation System

  • Complete Talmud Bavli Access: All 37 tractates across 6 traditional sedarim
  • Smart Page Navigation: Previous/next buttons work consistently at top and bottom with actual page numbers
  • Traditional Daf System: Proper handling of 90a β†’ 90b β†’ 91a pagination logic
  • Progress Tracking: Visual indicators showing position within tractates

οΏ½ Advanced Text Processing

  • Nikud Removal: Comprehensive removal of Hebrew vowel points while preserving punctuation
  • Intelligent Paragraph Splitting: Breaks Hebrew and English text into logical paragraphs based on punctuation patterns
  • Biblical Quote Styling: Automatic detection and special typography for Hebrew biblical quotes using Torah scroll fonts
  • Terminology Conversion: Processes 25+ terms for consistency ("Gemara" β†’ "Talmud", "Rabbi" β†’ "R'")

🎨 Enhanced Typography & Readability

  • Sepia Color Scheme: Designed for extended reading sessions
  • Adjustable Font Sizes: Separate controls for Hebrew and English text
  • Proper Line Spacing: Optimized for both Hebrew (1.8) and English (1.6) text
  • Authentic Hebrew Fonts: Biblical quotes styled with traditional Torah scroll typography

πŸ—‚ Multiple Navigation Methods

  • Breadcrumb Navigation: Hierarchical dropdowns organized by seder with bilingual support
  • Interactive Library Modal: Comprehensive tractate overview with search and filtering
  • Sidebar Organization: Collapsible seder structure with real-time search
  • Direct Page Access: Jump to any tractate, chapter, or page through dropdowns

Technical Architecture

Frontend

  • React/TypeScript SPA: Built with Vite for fast development and production builds
  • Component Architecture: Custom components for text viewing, navigation, and settings
  • Responsive Design: Optimized for desktop and mobile with proper accessibility support
  • Client-Side Processing: Text processing happens locally for responsive performance

API Integration

  • Sefaria API: Leverages Sefaria's comprehensive Talmud database
  • Netlify Functions: Serverless proxy for API requests with CORS handling
  • Context Fetching: Intelligent adjacent page data retrieval for continuity

Text Processing Pipeline

  1. Data Retrieval: Fetch text from Sefaria API
  2. Hebrew Processing: Remove nikud, detect quotes, split paragraphs
  3. English Processing: Smart paragraph splitting with HTML formatting preservation
  4. Terminology Conversion: Apply consistent term replacements
  5. Rendering: Display with enhanced typography and styling

How It Works

ChavrutAI functions as a layer over Sefaria rather than a replacement:

ChavrutAI Interface β†’ Sefaria API β†’ Enhanced Processing β†’ Improved Display

The platform pulls text from Sefaria's API and applies sophisticated processing to address common study interface limitations. Context continuity solves page break issues, while navigation improvements provide seamless movement through the corpus.

Key Improvements Over Standard Interfaces

  1. Context Continuity: Eliminates mid-sentence page breaks
  2. Unified Navigation: Consistent previous/next functionality throughout interface
  3. Enhanced Typography: Better fonts and spacing for extended reading
  4. Intelligent Text Processing: Automatic paragraph formatting and quote detection
  5. Traditional Structure: Respects sedarim organization and daf numbering system

Sefaria API Integration

ChavrutAI uses a serverless function deployed on Netlify to proxy requests to the Sefaria API, providing enhanced performance and reliability.

Architecture Benefits

  • CORS Handling: Serverless proxy eliminates cross-origin request issues
  • Performance: Client-side caching reduces API load and improves response times
  • Error Handling: Graceful fallbacks when API requests fail
  • Consistency: Unified interface for all Sefaria API interactions

Implementation

The integration consists of three components:

  1. Netlify Function (/netlify/functions/sefaria.js): Handles API requests with caching
  2. Frontend Utility (/src/components/utils/SefariaApi.ts): Provides clean API interface
  3. Context Helper (/src/components/utils/SefariaContextHelper.ts): Manages page calculations and context fetching

API Flow

ChavrutAI β†’ Netlify Function β†’ Sefaria API β†’ Text Processing β†’ Enhanced Display

Getting Started

Prerequisites

  • Node.js 16+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/EzraBrand/chavrutai-platform.git

# Navigate to project directory
cd chavrutai-platform

# Install dependencies
npm install

# Start development server
npm run dev

Development

The platform includes automated testing and development tools:

# Run tests
npm test

# Take screenshots for verification
npm run screenshot

# Build for production
npm run build

Live Demo

Visit the deployed platform: https://lighthearted-frangollo-2bcc29.netlify.app

Future Development

Areas for potential enhancement:

  • Dictionary integration for Hebrew word hover functionality
  • Text-to-speech capabilities
  • Advanced search and cross-referencing
  • Bookmark and annotation system
  • AI-assisted study features

Screenshots

Interface Overview

The platform provides a clean, sepia-themed interface optimized for extended study:

image

Provides context at the beginning and end of pages, and Bible text in different font:

image

Navigation Interface

Enhanced navigation with comprehensive tractate access, in the traditional ordering:

image

Text Display

Improved typography with context continuity and enhanced readability:

Text Display with Context

Built to enhance the Talmud study experience by addressing practical limitations of standard digital interfaces while leveraging Sefaria's comprehensive text database.

About

Interactive, AI-assisted Talmud study platform with bilingual text, inline commentary, and smart navigation. Built with React

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published