Skip to content

miking7/biblememory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bible Memory Icon

Bible Memory

Hide God's Word in Your Heart

A modern, offline-first PWA combining digital flashcards with proven spaced repetition for Scripture memorization

License TypeScript Vue.js PRs Welcome

Try It NowDocumentationReport BugRequest Feature


✨ Overview

Bible Memory combines the familiar simplicity of digital flashcards with scientifically-proven spaced repetition to help you memorize Scripture effectively. Beautiful design, offline-first architecture, works anywhere. Whether you're starting your first verse or maintaining hundreds, our app makes it simple, joyful, and sustainable.

I built this app because I've experienced firsthand the power of hiding God's Word in my heart. When you memorize Scripture, it becomes a living resource that surfaces exactly when you need it most—bringing comfort, wisdom, and strength in moments of need.

Why Bible Memory?

  • 🌐 Works Everywhere - Full offline functionality, syncs when online
  • 🃏 Familiar + Smart - Digital flashcards enhanced with spaced repetition (daily → weekly → monthly)
  • 🎯 Flexible Practice - Multiple review modes (Hints, First Letters, Type It, Full Reveal)
  • Beautiful Design - Glass-morphism UI with distraction-free immersive mode
  • 🔄 Seamless Sync - Your progress stays in sync across all devices
  • 📱 Native-Like - Install to home screen, works like a native app
  • 💯 Free & Open Source - No ads, no tracking, no premium tiers

🚀 Quick Start

For Users

Try it now: Visit bible-memory.app and start memorizing immediately - no installation required!

Install as an app:

  • iOS: Open in Safari → Share → Add to Home Screen
  • Android: Open in Chrome → Menu → Install app
  • Desktop: Look for the install icon in your browser's address bar

For Developers

# Clone the repository
git clone https://github.com/miking7/biblememory.git
cd biblememory

# Install dependencies
npm run install:client

# Set up database
npm run migrate

# Build for production
npm run build

# Serve with Laravel Herd (recommended) or PHP server
# Herd: Automatically serves at https://biblememory.test
# PHP: cd server/public && php -S localhost:8000 router.php

For development with hot reload:

npm run dev  # Starts at http://localhost:3000

See Setup Guide for detailed instructions.


💎 Features

Core Functionality

Verse Management

  • Add verses with AI-assisted parsing (paste any verse, we'll extract reference and clean formatting)
  • Multi-paragraph support with preserved line breaks
  • Structured tagging system (organize by topic, book, study series)
  • Search by reference, content, or tags
  • Import/Export to JSON for backups

Spaced Repetition

  • Automatic categorization (Learn → Daily → Weekly → Monthly)
  • Optimal review intervals based on memory science
  • Progress tracking (streak counter, verses reviewed today)
  • Visual feedback for review status

Review Modes

  • Flash Cards - Hide random words (5 difficulty levels)
  • Progressive Hints - Reveal words incrementally
  • First Letters - Show first letter + punctuation
  • Type It - Type the full verse (coming soon)
  • Reveal - See full content for hard verses

Sync & Storage

  • Offline-first with IndexedDB (works without internet)
  • OpLog sync pattern with conflict resolution
  • Multi-device support (phone, tablet, desktop)
  • Secure token-based authentication

User Experience

Design

  • Glass-morphism aesthetic with gradient backgrounds
  • Mobile-first responsive design
  • Smooth animations and transitions
  • Immersive review mode (distraction-free)
  • Dark gradient theme optimized for focus

Accessibility

  • Keyboard shortcuts (n/p for navigation, space to reveal)
  • Reduced motion support for accessibility
  • Touch-friendly targets on mobile
  • Clean visual hierarchy

Progressive Web App

  • Install to home screen
  • Offline caching with service worker
  • Auto-updates when new version available
  • Works on iOS, Android, and desktop

🏗️ Technology Stack

Frontend

  • Framework: Vue.js 3 (Composition API)
  • Language: TypeScript 5
  • Styling: Tailwind CSS v4
  • Build Tool: Vite 5
  • Storage: Dexie.js (IndexedDB wrapper)
  • PWA: vite-plugin-pwa with Workbox

Backend

  • Language: PHP 8.0+
  • Database: SQLite with WAL mode
  • Sync: OpLog pattern with cursor-based pagination
  • Auth: Token-based with bcrypt hashing

Architecture

  • Offline-first SPA with automatic sync
  • Last-Write-Wins conflict resolution
  • Cursor-based pagination (handles millions of operations)
  • Modern ES2020 JavaScript with full TypeScript types

See techContext.md for detailed technical information.


📖 Usage

Adding Your First Verse

  1. Click "Add Verse" tab
  2. Paste any verse (e.g., "John 3:16 For God so loved...")
  3. AI will extract reference and clean formatting
  4. Optionally add tags like fast.sk=3 or personal
  5. Click "Add Verse" - it's immediately available offline!

Reviewing Verses

  1. Click "Review" tab to see verses due today
  2. Try to recall the verse from the reference
  3. Choose a review mode (Flash Cards, Hints, etc.)
  4. Click "Got it!" or "Again" to track progress
  5. Algorithm adjusts future review dates automatically

Managing Your Library

  1. Click "My Verses" tab to see all verses
  2. Use search to filter by reference, content, or tags
  3. Click "⋮" menu on any verse for actions:
    • Review This - Start review from this verse
    • Edit - Update reference or content
    • Delete - Remove verse
  4. Use settings menu (⚙️) to export/import JSON backups

Review Schedule

The spaced repetition algorithm uses optimal intervals based on memory science:

  • First week: Review daily (learning phase)
  • First 2 months: Review daily (establishing memory)
  • 2-4 months: Review weekly (solidifying retention)
  • 4+ months: Review monthly (long-term maintenance)

This ensures new verses get frequent practice while gradually spacing out reviews as verses become firmly established in memory.


🛠️ Setup Instructions

Prerequisites

  • Node.js 18+ (for frontend development)
  • PHP 8.0+ with SQLite3 extension
  • Laravel Herd (recommended) or PHP built-in server

Installation Steps

  1. Clone and install

    git clone https://github.com/miking7/biblememory.git
    cd biblememory
    npm run install:client
  2. Database setup

    npm run migrate  # Creates tables in server/api/db.sqlite
  3. Build frontend

    npm run build  # Outputs to server/public/dist/
  4. Serve the app

    Option A: Laravel Herd (Recommended)

    • Herd automatically serves server/public/ at https://biblememory.test
    • Visit https://biblememory.test - done!

    Option B: PHP Built-in Server

    cd server/public
    php -S localhost:8000 router.php
    • Visit http://localhost:8000

Development Workflow

Frontend development with HMR:

npm run dev  # Starts Vite at http://localhost:3000
  • API calls proxy to backend automatically
  • Hot module replacement for instant feedback
  • Vue DevTools available in browser

Database management:

npm run db:reset  # Delete and recreate database
npm run db:open   # Open SQLite CLI for queries

All commands work from project root! No need to cd into subdirectories.

See techContext.md for deployment configurations (Apache, Nginx) and advanced setup.


📁 Project Structure

biblememory/
├── client/                    # Vue 3 frontend (TypeScript + Vite)
│   ├── src/
│   │   ├── App.vue           # Main component with conditional rendering
│   │   ├── LandingPage.vue   # Marketing page for guests
│   │   ├── main.ts           # Vue app initialization
│   │   ├── app.ts            # App orchestration (composables)
│   │   ├── db.ts             # Dexie schema (IndexedDB)
│   │   ├── actions.ts        # CRUD operations + OpLog creation
│   │   ├── sync.ts           # Push/pull sync logic
│   │   ├── composables/      # Vue 3 composables pattern
│   │   │   ├── useAuth.ts    # Authentication state
│   │   │   ├── useVerses.ts  # Verse CRUD and filtering
│   │   │   ├── useReview.ts  # Review system + animations
│   │   │   └── useSync.ts    # Sync scheduling
│   │   └── components/       # Reusable Vue components
│   ├── index.html            # Entry point with SEO meta tags
│   ├── vite.config.ts        # Vite configuration + PWA plugin
│   └── package.json          # Dependencies
│
├── server/                    # PHP backend
│   ├── public/
│   │   ├── dist/             # Built assets (generated by Vite)
│   │   ├── icons/            # PWA icons
│   │   ├── index.php         # SPA entry point
│   │   └── router.php        # PHP built-in server router
│   ├── api/                  # REST API endpoints
│   │   ├── register.php      # User registration
│   │   ├── login.php         # Authentication
│   │   ├── logout.php        # Session termination
│   │   ├── push.php          # Sync operations to server
│   │   ├── pull.php          # Sync operations from server
│   │   ├── migrate.php       # Database setup script
│   │   └── lib.php           # Shared functions
│   └── schema.sql            # Database schema (SQLite)
│
└── memory-bank/              # 📚 Project documentation
    ├── projectbrief.md       # Project foundation and goals
    ├── productContext.md     # User experience and features
    ├── systemPatterns.md     # Architecture decisions
    ├── techContext.md        # Technology stack details
    ├── progress.md           # Roadmap and status
    ├── activeContext.md      # Current work focus
    └── previous-work/        # Archived implementation sessions

🔌 API Reference

Authentication

Register

POST /api/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "secure-password"
}

Response: {
  "user_id": "uuid",
  "token": "64-char-hex"
}

Login

POST /api/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "secure-password"
}

Response: {
  "user_id": "uuid",
  "token": "64-char-hex"
}

Logout

POST /api/logout
X-Auth-Token: your-token-here

Response: { "ok": true }

Sync Operations

Push (Client → Server)

POST /api/push
X-Auth-Token: your-token-here
Content-Type: application/json

{
  "client_id": "device-uuid",
  "ops": [
    {
      "id": "op-uuid",
      "table": "verses",
      "row_id": "verse-uuid",
      "op_type": "insert",
      "data": { "reference": "John 3:16", ... },
      "ts": 1234567890
    }
  ]
}

Response: {
  "ok": true,
  "acked_ids": ["op-uuid"],
  "cursor": 123
}

Pull (Server → Client)

GET /api/pull?since=0&limit=500
X-Auth-Token: your-token-here

Response: {
  "cursor": 123,
  "ops": [...]
}

🗺️ Roadmap

✅ Phase 1 Complete: Foundation + Landing Page

  • Core infrastructure (build system, offline-first, sync, auth)
  • Basic review functionality (reference → content reveal)
  • CRUD operations with multi-device sync
  • NEW: Professional landing page for first-time visitors
  • NEW: SEO optimization with comprehensive meta tags
  • NEW: Scroll-triggered fade-in animations

✅ Phase 2 Complete: Enhanced Review Modes

  • Flash Cards with 5 difficulty levels
  • Progressive Hints mode
  • First Letters mode
  • Keyboard shortcuts (n, p, h, f, c, space, escape, i)
  • Immersive review mode
  • Card slide animations with accessibility
  • Review tracking (Got it! / Again buttons)

🚧 Phase 2.5: Landing Page Polish (In Progress)

  • Static pages (features.html, about.html, privacy.html, terms.html)
  • Real hero image and app screenshots
  • og-image.png for social sharing (1200x630)
  • Sitemap.xml for SEO
  • Structured data (JSON-LD)

📋 Phase 3: Deep Engagement (Planned)

  • Meditation questions (structured reflection prompts)
  • Application questions (Goals, Decisions, Lifestyle, Problems)
  • BibleGateway chapter lookup integration
  • Context-sensitive help and guidance

🎯 Phase 4: Modern Enhancements (Future)

  • Statistics dashboard with charts
  • Dark mode toggle
  • Streak achievements and gamification
  • Background sync API
  • Push notifications for review reminders
  • Social features (share verses, group study)

See progress.md for detailed feature status and implementation notes.


🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Report bugs - Open an issue with steps to reproduce
  2. Suggest features - Share your ideas in GitHub Issues
  3. Submit PRs - Fork, create a feature branch, and submit a pull request
  4. Improve docs - Help us make documentation clearer
  5. Share feedback - Tell us how we can improve

Development Guidelines:

  • Follow existing code style (TypeScript, Vue 3 Composition API)
  • Write clear commit messages
  • Test on mobile and desktop before submitting
  • Update documentation for new features

See CONTRIBUTING.md for detailed guidelines (coming soon).


🐛 Troubleshooting

App won't load

  • Check browser console for errors
  • Ensure you're using a modern browser (Chrome 90+, Firefox 88+, Safari 14+)
  • Clear browser cache and reload

Sync not working

  • Check network connection
  • Verify you're logged in (look for offline badge)
  • Try manual sync by navigating between tabs

Database errors

npm run db:reset  # Resets database (WARNING: loses data)

Build fails

npm run install:client  # Reinstall dependencies
npm run build           # Try building again

See techContext.md for detailed troubleshooting.


📚 Documentation

Comprehensive project documentation is available in the memory-bank/ directory:

These documents follow the Memory Bank pattern for AI-assisted development.


👨‍💻 Author

Michael Engelbrecht

The Story Behind Bible Memory

Fifteen years ago, I took a Scripture memory course with Dan Vis at FAST Missions. His course included a simple online tool, and I found it incredibly helpful. When the course ended, I built my own web app so I could keep memorizing—and I used it faithfully for many years.

In 2025, I felt inspired to get back into regularly memorizing new verses. But when I opened my old app, I realized it had aged badly—clunky, hard to use on mobile, and couldn't work offline. So during a holiday break, I rebuilt it from the ground up as a modern Progressive Web App.

After spending several days on it, something became clear: this shouldn't just be for me. If this tool could help me hide God's Word in my heart, maybe it could help others too. That's why I'm making it completely free and open source.

My hope is that whether you're memorizing your first verse or your hundredth passage, this tool will help you experience the joy of having God's Word come alive exactly when you need it most.


📄 License

Open source project - Free for everyone to use, modify, and distribute.

License details to be formalized - this tool exists to help believers memorize God's Word


🙏 Acknowledgments

Built with love for believers who want to hide God's Word in their hearts.

Key Technologies:

  • Vue.js - Progressive JavaScript framework
  • Vite - Lightning-fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • Dexie.js - Minimalistic IndexedDB wrapper
  • Workbox - Service worker toolkit

Special Thanks:

  • Cline - AI coding assistant that made rapid development possible
  • Claude Code - another AI coding assistant - that even works on your mobile phone
  • Dan Vis and FAST Missions - For the Scripture memory course 15 years ago that first introduced me to systematic Bible memorization and inspired the original version of this tool

⭐ Star this repo if it helps you memorize Scripture!

Try It NowReport BugRequest Feature

Last Updated: January 2026