8000 GitHub - EzraBrand/chavrutai-platform: Interactive, AI-assisted Talmud study platform with bilingual text, inline commentary, and smart navigation. Built with React
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 open-source, interactive Talmud study platform that combines bilingual Talmudic text display and smart navigation tools to make the Talmud more accessible and explorable for modern learners. A further stage will incorporate inline glossaries, AI-assisted chavruta, and extensive LLM-driven summaries, overviews, and user-friendly analysis.

Features

  • 📖 Hebrew/English side-by-side view of the Talmud
  • 🗂 Tabbed interface: Text, Key Terms, Analysis
  • ⚙️ Responsive UI built with React
  • 🔄 Serverless Sefaria API integration

Serverless Sefaria API Proxy

ChavrutAI uses a serverless function deployed on Netlify to proxy requests to the Sefaria API. This architecture provides several benefits:

Key Benefits

  • Reduced API Load: Built-in caching reduces requests to Sefaria's servers
  • Performance: Faster load times after initial request due to caching
  • Error Handling: Graceful fallback to local data when API is unavailable
  • Flexibility: Easy to add authentication or rate limiting in the future

How It Works

Client Application → Serverless Function → Sefaria API → Serverless Function → Client Application

With caching enabled:

Client Application → Serverless Function (Cache Hit) → Client Application

Implementation Details

The proxy consists of three main components:

  1. Netlify Function (/netlify/functions/sefaria.js):

    • Handles API requests and responses
    • Implements in-memory caching (1-hour duration)
    • Manages error handling
  2. Frontend Utility (/src/components/utils/SefariaApi.ts):

    • Provides clean API for frontend components
    • Handles response parsing and error handling
    • Converts API data to application format
  3. Netlify Configuration (netlify.toml):

    • Maps /api/* routes to the serverless functions
    • Configures deployment settings

API Usage

To fetch text from the Sefaria API:

import { fetchTalmudText, parseSefariaResponse } from './utils/SefariaApi';

// Simple usage
const data = await fetchTalmudText('Sanhedrin.90a');
const { hebrew, english } = parseSefariaResponse(data);

// With language specification
const hebrewData = await fetchTalmudText('Sanhedrin.90a', 'he');

Deployment

The serverless function is automatically deployed with the application when pushed to Netlify:

# Build the project
npm run build

# Deploy to Netlify
netlify deploy --prod --dir=src/components/dist

Limitations

  • In-memory cache resets on function cold starts
  • Subject to Netlify's serverless function limits (125K executions/month on free tier)
  • Cold starts may cause slight delays for infrequent users

Screenshots of mock-ups and pre-alpha

Claude mock-up:

https://claude.site/artifacts/71c7cc9e-341f-4140-ae47-e7a7e0cf91c8 image

#1 (top):

image

#2 (scrolled to bottom):

image

Live Demo

The ChavrutAI platform is deployed at: https://lighthearted-frangollo-2bcc29.netlify.app

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
0