Skip to content

Officialsammy2701/bibleflash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✦ BibleFlash

A Progressive Web App delivering daily Bible verses, motivational quotes, and affirmations as beautiful swipeable flashcards β€” with push notifications and full offline support.

Live Demo Backend React Vite Node.js PWA


πŸ“Έ Screenshots

Desktop

BibleFlash Desktop

Mobile

Bible Verse Card
Bible Verse Card
Daily Quote Card
Daily Quote Card
Reflection Card
Reflection Card

✨ Features

  • πŸ“– Daily Bible Verses β€” Curated uplifting verses powered by API.Bible (KJV)
  • πŸ’¬ Motivational Quotes β€” Hand-picked daily quotes from great thinkers
  • ✨ Affirmations β€” Positive daily affirmations to start your day
  • πŸƒ Swipeable Flashcards β€” Swipe left/right or use buttons to navigate cards
  • πŸ”„ Card Flip β€” Tap any card to flip and reveal the reflection side
  • πŸ”” Push Notifications β€” Daily verse delivered to your device even when the app is closed
  • πŸ“± PWA Installable β€” Add to Home Screen on any device, works like a native app
  • 🌐 Offline Support β€” Cached content loads without an internet connection
  • 🌟 Animated UI β€” Midnight blue background with twinkling stars and glowing card borders

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React 19 UI framework
Vite 6 Build tool & dev server
Framer Motion Card animations
react-swipeable Touch/swipe gestures
vite-plugin-pwa PWA manifest & service worker
Playfair Display + DM Sans Typography

Backend

Technology Purpose
Node.js + Express REST API server
node-cron Daily push notification scheduler
web-push Web Push API (VAPID)
API.Bible Full Bible content (KJV)
dotenv Environment variable management

Deployment

Service Purpose
GitHub Pages Frontend hosting
Render Backend hosting

πŸš€ Getting Started

Prerequisites

  • Node.js v18+
  • npm v9+

Installation

# Clone the repository
git clone https://github.com/Officialsammy2701/bibleflash.git
cd bibleflash

# Install root dependencies
npm install

# Install all dependencies
npm install --prefix client
npm install --prefix server

Environment Setup

Create server/.env:

PORT=5000
VAPID_PUBLIC_KEY=your_vapid_public_key
VAPID_PRIVATE_KEY=your_vapid_private_key
VAPID_EMAIL=mailto:you@example.com
BIBLE_API_KEY=your_api_bible_key

Generate VAPID keys:

cd server
node -e "const wp = require('web-push'); const k = wp.generateVAPIDKeys(); console.log(k);"

Get a free Bible API key at scripture.api.bible

Development

# Run both frontend and backend simultaneously
npm run dev
  • Frontend: http://localhost:5173/bibleflash/
  • Backend: http://localhost:5000

Production Build & Deploy

# Deploy frontend to GitHub Pages
npm run build --prefix client
cd client && npm run deploy

# Backend deploys automatically via Render on git push
git push origin main

πŸ“ Project Structure

bibleflash/
β”œβ”€β”€ client/                  # React + Vite PWA frontend
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── icons/           # PWA icons
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ FlashCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”‚   └── NotificationToggle.jsx
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   └── vite.config.js
β”œβ”€β”€ server/                  # Node.js + Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ verse.js     # API.Bible integration
β”‚   β”‚   β”‚   β”œβ”€β”€ quote.js
β”‚   β”‚   β”‚   β”œβ”€β”€ date.js
β”‚   β”‚   β”‚   └── push.js      # Push notification endpoints
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── cron.js      # Daily notification scheduler
β”‚   β”‚   └── index.js
β”‚   └── db/
β”‚       └── subscriptions.json
└── data/
    β”œβ”€β”€ bibleVerses.json     # Fallback verse collection
    └── quotes.json          # Motivational quotes

πŸ”” Push Notifications

BibleFlash uses the Web Push API with VAPID keys to deliver daily notifications at 8:00 AM. Subscriptions are stored server-side and notifications are sent via node-cron.

To test notifications manually:

cd server
node -e "import('./src/services/cron.js').then(m => m.startCron())"

πŸ“– Bible API

Verses are fetched from API.Bible using the King James Version (KJV). The app uses a curated list of 50 uplifting verses from Psalms, Proverbs, John, Romans, Isaiah, and more.

Bible ID used: de4e12af7f28f599-01 (KJV)


🌐 Live Demo

β†’ Open BibleFlash

Scan to install on mobile:

Visit the link on your phone and tap "Add to Home Screen" in your browser menu.


πŸ‘€ Author

Ismail Adewale Akande


πŸ“„ License

This project is open source and available under the MIT License.

Bible content provided by API.Bible β€” King James Version (KJV), Public Domain.

About

Flashcard Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors