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.
- 📖 Hebrew/English side-by-side view of the Talmud
- 🗂 Tabbed interface: Text, Key Terms, Analysis
- ⚙️ Responsive UI built with React
- 🔄 Serverless Sefaria API integration
ChavrutAI uses a serverless function deployed on Netlify to proxy requests to the Sefaria API. This architecture provides several 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
Client Application → Serverless Function → Sefaria API → Serverless Function → Client Application
With caching enabled:
Client Application → Serverless Function (Cache Hit) → Client Application
The proxy consists of three main components:
-
Netlify Function (
/netlify/functions/sefaria.js
):- Handles API requests and responses
- Implements in-memory caching (1-hour duration)
- Manages error handling
-
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
-
Netlify Configuration (
netlify.toml
):- Maps
/api/*
routes to the serverless functions - Configures deployment settings
- Maps
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');
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
- 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
Claude mock-up:
https://claude.site/artifacts/71c7cc9e-341f-4140-ae47-e7a7e0cf91c8
#1 (top):
#2 (scrolled to bottom):
The ChavrutAI platform is deployed at: https://lighthearted-frangollo-2bcc29.netlify.app