Bib v1.36
A fast, efficient web-based Bible reading and study application.
Created by Jason Page
yahbib.com
---
Overview
Bib is a powerful Bible study tool that allows users to search, read, and study Scripture across multiple translations. Built with performance in mind, Bib uses an indexed data loading system to deliver lightning-fast search results and verse lookups.
Features
Core Functionality
- Verse Reference Lookup - Quickly find any Bible verse by book, chapter, and verse number
- Context Verses - View verses before and after your selected verse for better context
- Keyword Search - Search for any word or phrase across all 66 books of the Bible
- Multiple Translations - Access 10 different Bible translations simultaneously:
- King James Bible (KJV)
- American Standard Version (ASV)
- Douay-Rheims Bible (DRB)
- Darby Bible Translation (DBT)
- English Revised Version (ERV)
- Webster Bible Translation (WBT)
- World English Bible (WEB)
- Young's Literal Translation (YLT)
- American King James Version (AKJ)
- Weymouth New Testament (WNT)
Study Tools
- Study Notes Panel - Draggable and resizable floating panel for taking notes
- Local Storage - Notes are automatically saved to your browser
- Server Backup - Save notes anonymously to the server and share via link
- Download Notes - Export your study notes as timestamped text files
Results Management
- Advanced Filtering - Filter search results by verse reference, translation, or text
- Live Highlighting - Search terms are highlighted in filtered results
- CSV Export - Download search results as CSV files for offline study
- URL Sharing - Share searches via URL with all parameters preserved
Analytics
- Hit Tracking - Total page visits, human visits, and unique human visitors
- Search Counter - Track total searches performed
- Bot Detection - Automatically filters bot traffic from human statistics
Performance
- 2,196x faster page loads - Optimized from ~3000ms to ~1.4ms
- Indexed Data System - Pre-generated indexes split Bible data by book
- Lazy Loading - Only loads required book data for each search
- Memory Efficient - Loads 1-2MB per book instead of entire 37MB file
Requirements
- PHP 7.0 or higher
- Web server (Apache, Nginx, or similar)
- File write permissions for counters directory
- 37MB disk space for Bible data
- 29MB disk space for generated indexes
Installation
- Upload files to your web server directory
- Generate Bible indexes (required for first-time setup):
bash
php generate_indexes.php
This creates the
bible_index/ directory with 51 index files for fast lookups.
Set permissions for the counters directory:
bash
chmod 755 counters/
Access the application via your web browser
Usage
Searching for Verses
Select "Verse Reference" query type
Choose a book from the dropdown menu
Enter the chapter and verse numbers
Optionally set context verses (verses before/after)
Select one or more translations to display
Click Query
Keyword Searching
Select "Keyword Search" query type
Enter your search term (e.g., "faith", "love", "beginning")
Select one or more translations to search
Click Query
Using Study Notes
The Study Notes panel appears on the right side (desktop only)
Type notes directly - they auto-save to your browser
Drag the panel by the header to reposition it
Resize by dragging the bottom-right corner
Download notes as a text file with timestamp
Save to Server to get a shareable link (anonymous)
View Saved Notes to see all server-saved notes
Filtering Results
Use the filter box to narrow down results
Choose to filter all columns or specific ones
Matching text is highlighted in yellow
Result count updates to show filtered/total results
Exporting Data
Copy URL - Share your exact search with others
Download CSV - Export results to spreadsheet software
Download Notes - Save study notes as timestamped .txt files
Technical Details
Architecture
Frontend: Vanilla JavaScript, responsive CSS
Backend: PHP 7+ with efficient file handling
Data Storage: CSV format with JSON indexes
Session Management: LocalStorage for notes, file-based counters
File Structure
bib/
├── index.php # Main application
├── bible_loader.php # Efficient data loading class
├── generate_indexes.php # Index generation script
├── notes_save.php # Server-side note saving
├── notes_list.php # View all saved notes
├── notes_view.php # View individual notes
├── changelog.php # Version history viewer
├── styles.css # Application styles
├── bibles.csv # Main Bible data (37MB)
├── bible_index/ # Generated index files (29MB)
│ ├── translations.json
│ ├── book_index.json
│ └── book_*.json # Individual book indexes (66 files)
├── counters/ # Hit tracking data
└── CHANGELOG.md # Version history
Performance Optimization
Version 4.0 introduced a major performance overhaul:
Before: Loading entire 37MB file on every page load (~3000ms)
After: Loading only metadata on page load (~1.4ms)
Method: Pre-generated JSON indexes split by book
Memory: Reduced from 37MB to 1-2MB per search
Result: 2,196x performance improvement
Browser Compatibility
Modern browsers (Chrome, Firefox, Safari, Edge)
LocalStorage support required for notes feature
Clipboard API for copy/share features
Responsive design for mobile and desktop
Development
Generating Indexes
After modifying the Bible data file, regenerate indexes:
bash
php generate_indexes.php
This creates:
bible_index/translations.json - List of all translations
bibleindex/bookindex.json - Book metadata
bibleindex/book*.json - Individual book data (66 files)
Testing Performance
Run the performance test script:
bash
php test_performance.php
Changelog
See
CHANGELOG.md for version history and updates.
Current version:
v1.36 (4.0)
Credits
Developer: Jason Page
Organization:
Amfile.org
Version: 1.36
License: Open source
Support
For questions, issues, or feature requests, please contact
Amfile.org.
---
Bib v1.36 - Fast, efficient Bible study for everyone.