Commit Graph

8 Commits

Author SHA1 Message Date
kennethreitz 4caaa7394f Expand end-times study guide content 2025-11-30 11:20:30 -05:00
kennethreitz 6fba0707cc data 2025-11-30 11:09:57 -05:00
kennethreitz fe28decc7f study_guides 2025-11-30 10:18:58 -05:00
kennethreitz f9b2778ec5 updated study guides 2025-11-30 10:16:17 -05:00
kennethreitz 29046647e5 update study guides 2025-11-30 10:12:30 -05:00
kennethreitz 768e000870 update study_guides.json 2025-11-30 09:57:25 -05:00
kennethreitz 6d44f647fe Add 11 comprehensive study guides covering major topics
Added study guides:
- Foundational Studies: Baptism, Holy Communion
- Character & Living: Discipleship, Evangelism, Suffering & Persecution
- Biblical Themes: Parables of Jesus, Miracles of Jesus
- Doctrinal Studies: End Times & Eschatology, Spiritual Warfare, Spiritual Gifts, The Church

Each guide includes 8 detailed sections with verse references and comprehensive theological content.

Total study guides: 36 (up from 25)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 09:39:52 -05:00
kennethreitz df67749532 Migrate hardcoded data to JSON files for better maintainability
This commit completes a comprehensive data migration, externalizing all hardcoded
theological content from Python modules to structured JSON files in the data/ directory.

## Changes

### New JSON Data Files (3 files, 356 KB total)
- **study_guides.json** (265 KB): 25 complete study guides with 183 sections and 732 verse references
  - 6 categories: Foundational, Character & Living, Biblical Themes, Doctrinal, Thematic, Family
- **word_studies.json** (35 KB): 53 biblical terms with Hebrew/Greek definitions
  - Includes transliterations, meanings, and theological notes for OT and NT
- **verse_commentary.json** (56 KB): 22 verses with detailed theological analysis
  - Includes analysis, historical context, applications, and reflection questions

### Code Refactoring

**routes/study_guides.py** (1,248 lines removed, 85% reduction)
- Replaced 1,070 lines of hardcoded study guide content with JSON loader
- File reduced from 1,463 lines to 215 lines
- Added @lru_cache JSON loaders for performance
- Removed `_get_study_guides_catalog_old()` and `_get_study_guides_content_old()`

**routes/commentary.py** (496 lines removed, 11.7% reduction)
- Replaced 494 lines of hardcoded word studies and verse commentary
- File reduced from 4,222 lines to 3,726 lines
- Added structured JSON loaders with data transformation:
  - `_load_word_studies()`: Converts flat JSON to nested OT/NT structure
  - `_load_verse_commentary()`: Parses verse references into book/chapter/verse hierarchy
- Removed hardcoded `word_studies` (226 lines) and `enhanced_commentary` (268 lines) dictionaries

## Benefits
- **Maintainability**: Non-developers can now edit theological content in JSON
- **Performance**: @lru_cache ensures data loaded once per process
- **Separation of Concerns**: Content separated from application logic
- **Version Control**: Easier to track content changes in structured format
- **Scalability**: Can add new study guides/commentary without code changes

## Testing
- All 252 tests pass
- Verified data structure compatibility
- Confirmed JSON loaders work correctly with existing templates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 18:10:40 -05:00