New Endpoints:
1. GET /api/verse/random - Random verse with OT/NT/book filtering
2. GET /api/commentary/{book}/{chapter}/{verse} - AI-generated verse commentary
3. GET /api/chapter-commentary/{book}/{chapter} - Chapter explanations
4. POST /api/verses/bulk - Bulk verse lookup
5. GET /api/family-tree - List biblical figures
6. GET /api/family-tree/{name} - Get biography with alias support
Features:
- Random verse supports testament (ot/nt) and book filters
- Commentary includes analysis, historical context, and reflection questions
- Chapter commentary provides context for each chapter
- Bulk lookup handles multiple verse references in one request
- Family tree supports name aliases (e.g., Israel → Jacob)
- All endpoints include comprehensive OpenAPI documentation
Tests:
- Added 19 new tests (78 total, all passing)
- Test coverage for all new endpoints
- Edge case handling (invalid inputs, 404s, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added /api/red-letter endpoint for listing all verses where Jesus speaks
- Supports filtering by book
- Includes pagination (limit/offset)
- Returns verse text, reference, and whether full or partial
- Added /api/red-letter/stats endpoint for statistics
- Total count of red letter verses
- Breakdown by full vs partial verses
- Count by book
- List of books containing red letter verses
- Added 8 comprehensive tests (59 total tests now)
- All tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated all API endpoint parameters to use `example` instead of `examples` for better Swagger UI experience
- Parameters now pre-fill with reasonable defaults when testing endpoints in /api/docs
- Added --reload and --reload-include '*.json' flags to docker-compose for auto-reload on JSON changes
- Included commentary-generator agent configuration for AI-powered verse commentary
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
New features:
- PDF export endpoints for resources
* GET /api/resources/{category}/pdf - Category PDF
* GET /api/resources/{category}/{slug}/pdf - Item PDF
* Proper error handling (404 before 503)
* Uses existing resource_detail_pdf.html templates
- Add html_url field to resource categories
* Provides web URL in addition to API URL
* Format: /biblical-locations (kebab-case)
* Helps clients link to HTML pages
Comprehensive test coverage (12 new tests):
- test_list_all_resources - List all 39 categories
- test_get_resource_category - Get category items
- test_get_resource_category_biblical_locations - Nested structures
- test_get_resource_item - Get specific item with verses
- test_get_resource_item_from_different_categories - Multiple types
- test_get_nonexistent_resource_category - 404 handling
- test_get_nonexistent_resource_item - Item 404
- test_resource_category_pdf - PDF generation
- test_resource_item_pdf - Item PDF
- test_resource_pdf_nonexistent_category - PDF 404
- test_resource_pdf_nonexistent_item - Item PDF 404
- test_all_resource_categories_accessible - All categories work
All 51 API tests passing (was 39, added 12).
Note: PDF route ordering with FastAPI path matching is documented
in tests. More specific routes should ideally come before general ones.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
New endpoints:
- GET /api/resources - List all 39 resource categories
- GET /api/resources/{category} - Get all items in a category
- GET /api/resources/{category}/{slug} - Get specific resource details
Features:
- Pydantic response models with OpenAPI documentation
- Complete examples in Swagger UI
- Support for all 39 resource categories:
* Biblical locations (Old/New Testament)
* Angels, Prophets, Apostles, Women of the Bible
* Parables, Miracles, Prayers, Beatitudes
* Names of God, Names of Christ, I AM Statements
* Theological resources (Trinity, Christology, Soteriology, etc.)
* Systematic theology (Bibliology, Pneumatology, Eschatology, etc.)
* Armor of God, Ten Commandments, Fruits of the Spirit
* Covenants, Festivals, Types & Shadows, Messianic Prophecies
* And many more...
Technical implementation:
- Handles nested resource structures (e.g., biblical_locations with OT/NT subcategories)
- Recursive slug-based search for flexible data access
- Full verse references included with each resource item
- Comprehensive category metadata (item counts, URLs)
- Clean JSON responses with proper field descriptions
All existing tests pass - no breaking changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add red_letter field to all verse API responses
* /api/verse/{book}/{chapter}/{verse} - single verse
* /api/verse-range/{book}/{chapter}/{start}/{end} - verse ranges
* /api/verse-of-the-day - daily verse
Red letter field values:
* null - Jesus doesn't speak in this verse
* "full" - entire verse is Jesus speaking (e.g., John 3:16)
* "quoted text" - partial verse with exact words Jesus spoke
- Add Pydantic response models for OpenAPI documentation
* VerseResponse - single verse with red_letter field
* VerseRangeResponse - verse range with red_letter per verse
* DailyVerseResponse - daily verse with red_letter
* Includes comprehensive examples showing all red letter scenarios
- Enhance OpenAPI/Swagger documentation
* Add detailed response examples for each endpoint
* Multiple example scenarios (Jesus speaking, not speaking, partial)
* Improved parameter descriptions with validation (ge=1)
* Better endpoint summaries and descriptions
- Add comprehensive test coverage for red letter feature
* test_red_letter_full_verse - Jesus speaks entire verse
* test_red_letter_partial_verse - Jesus speaks part of verse
* test_red_letter_no_words - Jesus doesn't speak
* test_red_letter_verse_range_with_christ_words - range test
* Update existing tests to verify red_letter field presence
All 39 API tests pass with no warnings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Generated using commentary-generator agent with Reformed theological perspective.
Commentary includes:
- Deep theological analysis with Hebrew text and transliteration
- Messianic prophecy exposition (John the Baptist and Jesus)
- Post-exilic historical context
- Cross-references to NT fulfillment passages
- Practical application questions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
WeasyPrint outputs logging messages to stdout/stderr when imported,
which pollutes the console output. This change temporarily redirects
stdout/stderr to /dev/null during the import, then restores them.
Changes:
- Added sys and os imports
- Wrapped WeasyPrint import with stdout/stderr suppression
- Properly restore stdout/stderr in finally block
Result: Clean import with no console noise
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The verse_commentary.json already contains extensive high-quality commentary
on all Pauline epistles with superior analysis. The pauline_commentary.json
was redundant and of lower quality.
Current Pauline coverage in verse_commentary.json:
- Complete: Romans, 1-2 Corinthians, Galatians, Ephesians, Philippians,
Colossians, 1-2 Thessalonians, 1-2 Timothy, Titus, Philemon
- All key verses already covered with detailed theological analysis
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Organize schema files:
- Moved red_letter_verses.schema.json to schemas/ directory
- Updated README.md references to point to new location (schemas/red_letter_verses.schema.json)
- Maintains consistency with other schema files (all now in schemas/ directory)
The validation script (scripts/validate_data.py) already uses the schemas/ directory, so no code changes needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed all remaining verses with complex narrative structures:
- 27 verses updated with correct spoken words only
- 6 verses removed (not Jesus speaking or too complex):
• Mark 16:7 (angel speaking)
• Luke 9:33 (Peter speaking)
• Luke 13:23 (answer continues in v24)
• Luke 15:17 (prodigal son speaking)
• Luke 18:4 (unjust judge in parable)
• John 21:15 (mixed dialog, too complex)
Examples of fixes:
- Matthew 16:8: "Which when Jesus perceived, he said unto them," → black
Only "O ye of little faith..." → red
- John 8:10: "When Jesus had lifted up himself, and saw none but the woman, he said unto her," → black
Only "Woman, where are those thine accusers?..." → red
- John 19:30: "When Jesus therefore had received the vinegar, he said," → black
Only "It is finished:" → red
- Luke 22:52: Narrative intro → black, "Be ye come out..." → red
Total red letter fixes this session:
- 48 verses fixed automatically
- 33 verses fixed manually
- 81 verses total corrected ✓
Red letter edition is now accurate across all Gospels!
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed 48 verses where narrative introductions (like "Jesus answered them,")
were incorrectly marked in red. Only Christ's actual spoken words should be red.
Automatically fixed verses including:
- John 8:34: "Jesus answered them," → now in black
- John 8:19, 8:49, 8:54: "Jesus answered," → now in black
- Matthew 11:25, 12:39, 15:3, 15:13, 17:22, 17:26, 21:30, 21:31, 25:12, 26:10
- Mark 12:29, Luke 4:4, John 5:17, 6:70, 7:16, 10:25, 10:32, 10:34, 13:8
- And 29 more verses across Matthew, Mark, Luke, and John
Added script: scripts/fix_red_letter_narrative.py
- Automatically extracts spoken words from narrative text
- Uses regex patterns to identify narrative introductions
- 48 verses fixed, 33 remaining for manual review
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Add "Quick Start - Run It Yourself" section at top
- Feature docker compose up as the easiest way to run locally
- Streamline Installation section with Docker as recommended
- Reorganize for better developer experience
- Remove redundant Docker instructions
Makes it immediately clear how to run the project locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Used 12 parallel agents to systematically add comprehensive commentary for
top Bible verses missing substantive content.
Verses added:
Gospel & Salvation:
- Matthew 19:26 - With God all things are possible
- Luke 1:37 - Nothing shall be impossible with God
Comfort & Trust:
- Isaiah 40:31 - Renew their strength, mount up with wings as eagles
- Isaiah 41:10 - Fear not, for I am with thee
- Psalm 27:1 - The LORD is my light and salvation
- Psalm 37:4 - Delight thyself in the LORD
- Psalm 56:3 - What time I am afraid, I will trust in thee
- Psalm 103:12 - As far as east from west, removed our transgressions
- Psalm 118:24 - This is the day the LORD hath made
- Psalm 119:105 - Thy word is a lamp unto my feet
- Psalm 121:1-2 - I will lift up mine eyes unto the hills
- 1 Peter 5:7 - Casting all your care upon him
Guidance & Obedience:
- Proverbs 16:3 - Commit thy works unto the LORD
- Proverbs 22:6 - Train up a child in the way he should go
- Isaiah 26:3 - Thou wilt keep him in perfect peace
- Isaiah 53:6 - All we like sheep have gone astray
Prayer & Faith:
- Matthew 7:7 - Ask, seek, knock
- 1 Thessalonians 5:16-18 - Rejoice, pray, give thanks
Discipleship & Mission:
- Matthew 5:14 - Ye are the light of the world
- Matthew 22:37 - Greatest commandment (love God)
- Matthew 28:19 - Great Commission
- John 10:10 - I am come that they might have life abundantly
- John 14:27 - My peace I give unto you
- John 15:13 - Greater love hath no man than this
Total verses with commentary: 11,989 (up from 11,965)
Coverage of top 100 verses: 71% (71/100)
Each commentary includes deep theological analysis with original language
studies, historical/cultural context, and 5 reflection questions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
These 3 verses were not saved in the previous commit due to encoding error.
Now all 15 top Bible verses have comprehensive commentary.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added deep theological commentary with Greek/Hebrew word studies for:
Gospel & Salvation:
- Jeremiah 29:11 - God's plans for peace and hope
- John 14:6 - The way, truth, and life
- John 1:1 - The eternal Word made flesh
- John 3:3 - You must be born again
- Isaiah 53:5 - Suffering servant, wounded for our transgressions
- 1 John 1:9 - Confession and forgiveness
Psalms (Comfort & Trust):
- Psalm 23:1 - The LORD is my shepherd
- Psalm 46:1 - God our refuge and strength
- Psalm 91:1 - Dwelling in the secret place
- Psalm 139:14 - Fearfully and wonderfully made
Christian Living:
- Proverbs 3:5-6 - Trust in the LORD, not your own understanding
- Matthew 6:33 - Seek first the kingdom of God
- Matthew 11:28 - Come unto me, all who are weary
- Hebrews 11:1 - Definition of faith
Each commentary includes:
- Detailed analysis with original language study
- Historical and cultural context
- 5 reflection questions for application
Total verses with commentary now: 11,965 (up from 11,950)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update Pydantic model to match nested JSON structure (Book → Chapter → Verse)
- Rename field: historical_context → historical (11,950 entries)
- Remove unused application field
- Update VerseCommentary schema with nested VersesDict and ChaptersDict
- All 18 data validation tests now passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Provides comprehensive statistics and filtering options:
- Shows overall stats: 31,102 verses, 11,917 with commentary (38.3%)
- Filter by book and/or chapter
- Show random verses without commentary
- Breakdown by book showing where commentary is needed
Usage examples:
python scripts/list_unwritten_commentary.py --stats
python scripts/list_unwritten_commentary.py --book John --chapter 3
python scripts/list_unwritten_commentary.py --random 10
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove 2,871 verses with generic template commentary
- Keep 11,950 verses with substantive content
- Restructure JSON from flat to nested format (Book → Chapter → Verse)
- Update schema to reflect nested structure
- Add comprehensive commentary for John 3:16 with Greek word studies
- Update commentary.py to handle both flat and nested JSON formats
- Add *.backup to .gitignore
File size reduced from 47MB to 36MB after removing generic content.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Verses without verse-specific commentary now return None for analysis,
historical context, and questions sections instead of generic template
text that could apply to any verse.
Changes:
- Set analysis, historical, and questions to None for non-enhanced verses
- Template already checks for these values before rendering sections
- Verses with real commentary (like Psalm 1:4, Revelation 1) unaffected
- Reduces clutter and improves signal-to-noise ratio
Result: Verse pages now show only verse text, word-by-word analysis,
and cross-references unless there's genuine verse-specific commentary.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
PDF Script:
- Added --limit N parameter to process only first N books (for testing)
- Added --output FILE parameter for custom output filename
- Updated help text and examples
- Example: --limit 1 --output genesis.pdf to test with just Genesis
Name Linking:
- Fixed compound names like "Sarai or Sarah" not linking properly
- Now splits names on " or " and creates separate mappings for each variant
- Both "Sarai" and "Sarah" in Bible text will link to same person entry
- Preserves full compound name as well for exact matches
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cross-reference links were showing both their own CSS tooltip and the
JavaScript verse tooltip simultaneously, creating a cluttered experience.
Changes:
- Added .cross-references-section class to cross-references container
- Updated JavaScript to skip all links inside .cross-references-section
- Cross-ref links now only show their own CSS-based tooltip
This ensures cross-references show only one tooltip with the verse
preview, not multiple overlapping tooltips.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added 'li' to the verse linking selector so that verse references in
list items are automatically converted to clickable links. This fixes
verse references not being linked in sections like "Questions for
Reflection" which use unordered lists.
Now verse references like "1 Peter 5:8" in list items throughout the
site will be automatically linked to their corresponding verse pages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added font-weight: 600 to give Scripture text more visual weight and
emphasis in both regular verse tooltips and cross-reference tooltips.
The Bible verse text now appears as bold italic, making it stand out
more prominently while maintaining the elegant italic style.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Applied the cleaner, more refined styling from cross-reference tooltips
to all verse tooltips throughout the site for visual consistency.
Changes:
- Reduced border thickness from 2px to 1px for lighter appearance
- Adjusted padding from 1rem to 0.75rem 1rem for more compact look
- Reduced font size from 0.95rem to 0.9rem to match cross-refs
- Added min-width: 300px for consistent tooltip sizing
- Updated dark mode border color from #555 to #444 to match
The result is a cleaner, more consistent tooltip experience across the
entire site that matches the superior cross-reference tooltip design.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The random verse endpoint was being cached by browsers, causing it to
always redirect to the same verse instead of selecting a new random
verse each time.
Changes:
- Added /random-verse to the no-cache path list in CacheControlMiddleware
- Set explicit cache control headers on the redirect response
- Changed status code to 302 (Found) for temporary redirect
- Added Pragma and Expires headers for better cache prevention
Tested with 5 consecutive requests, all returned unique verses.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace the help cursor (question mark) with a normal pointer cursor
on verse links that show tooltips. This provides a cleaner, more
standard user experience while still showing the verse tooltip on hover.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Concordance pages already display full verse text inline with search
results, so showing tooltips with the same text is redundant. This
change prevents tooltips from appearing on concordance result links
while keeping them active on other verse references throughout the site.
Changes:
- Added JavaScript exclusion for .occurrence-reference and .occurrence elements
- Set cursor: pointer on concordance links to override base cursor: help style
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Use negative lookahead to prevent matching words followed by 's
- Fixes issue where "LORD'S" was being split into "LORD" + "'S"
- Sidenotes now appear after complete words only
Script now checks if WeasyPrint is available before attempting
to generate PDF and provides helpful installation instructions
if system libraries are missing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed the /bible/pdf endpoint (too resource-intensive for live requests)
and created a standalone script for offline PDF generation.
New script: scripts/generate_bible_pdf.py
- Generates complete KJV Bible PDF with all footnotes
- ~1000 pages with cross-references and word studies
- Progress tracking during generation
- Saves to kjv-complete-bible.pdf
Usage:
uv run python scripts/generate_bible_pdf.py
This is more efficient - generate once, serve as static file if needed,
rather than regenerating on every request.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Corrected import to use OT_BOOKS and NT_BOOKS from utils.books
instead of non-existent bible_metadata module.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
New endpoint /bible/pdf generates a comprehensive PDF of the entire
King James Bible with all cross-references and word studies.
Features:
- Title page with edition information
- Table of contents (Old Testament & New Testament)
- All 66 books with proper page breaks
- All 31,102 verses with footnotes
- Cross-references grouped by description
- Word studies with Greek/Hebrew terms
- Running headers with book names
- Page numbers
- Professional typography
PDF structure:
- Title page
- Table of contents (2 columns)
- Genesis through Malachi (Old Testament)
- Matthew through Revelation (New Testament)
- Footer page
This will generate a substantial PDF (likely 1000+ pages) with
complete study content suitable for printing or offline study.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cross-references and word studies now appear as proper footnotes
in PDF exports using WeasyPrint's CSS footnote support.
Features:
- Cross-references grouped by description (e.g., "References God")
- Word studies with Greek/Hebrew terms and meanings
- Automatic footnote numbering
- Footnote markers (* and †) in verse text
- Clean footnote formatting at bottom of pages
PDF now includes all the study content from the web view in a
print-friendly format.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Tightened template formatting to ensure no space appears
between the last reference and the period.
Now: Genesis 2:5.
Not: Genesis 2:5 .
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Each grouped cross-reference line now ends with a period for
proper punctuation.
Example:
References God: Hebrews 6:7; Genesis 1:29; Matthew 6:30.
Creation: Genesis 1:1; Hebrews 11:3; Isaiah 45:18.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>