A React Progressive Web App (PWA) that helps users manage their screen time by requiring Bible verse memorization before unlocking device access.
The Bible ScreenTime Manager is a PWA that combines digital wellness with spiritual growth. Users set time limits for their device usage, and when those limits are reached, the app locks the screen and requires users to correctly type a Bible verse multiple times before regaining access.
bible-screentime-manager/
├── public/
│ ├── manifest.json # PWA manifest configuration
│ ├── service-worker.js # Service worker for offline/caching
│ ├── icons/ # PWA icons (various sizes)
│ │ ├── icon-192x192.png
│ │ ├── icon-512x512.png
│ │ └── apple-touch-icon.png
│ └── index.html # Main HTML entry point
├── src/
│ ├── components/ # React components
│ │ ├── core/ # Core application components
│ │ │ ├── VerseLibrary/ # Verse management interface
│ │ │ │ ├── VerseLibrary.jsx
│ │ │ │ ├── VerseCard.jsx
│ │ │ │ ├── VerseForm.jsx
│ │ │ │ └── VerseLibrary.css
│ │ │ ├── VerseInput/ # Verse typing interface
│ │ │ │ ├── VerseInput.jsx
│ │ │ │ ├── TypingArea.jsx
│ │ │ │ ├── ProgressIndicator.jsx
│ │ │ │ └── VerseInput.css
│ │ │ ├── UsageTimer/ # Time tracking component
│ │ │ │ ├── UsageTimer.jsx
│ │ │ │ ├── TimerDisplay.jsx
│ │ │ │ ├── TimeProgress.jsx
│ │ │ │ └── UsageTimer.css
│ │ │ ├── LockScreen/ # Screen lock overlay
│ │ │ │ ├── LockScreen.jsx
│ │ │ │ ├── LockOverlay.jsx
│ │ │ │ ├── UnlockPrompt.jsx
│ │ │ │ └── LockScreen.css
│ │ │ └── Settings/ # App configuration
│ │ │ ├── Settings.jsx
│ │ │ ├── TimeLimits.jsx
│ │ │ ├── EnforcementMode.jsx
│ │ │ ├── VerseSettings.jsx
│ │ │ └── Settings.css
│ │ ├── layout/ # Layout components
│ │ │ ├── Header.jsx
│ │ │ ├── Navigation.jsx
│ │ │ ├── Sidebar.jsx
│ │ │ └── Footer.jsx
│ │ └── common/ # Reusable UI components
│ │ ├── Button.jsx
│ │ ├── Modal.jsx
│ │ ├── Card.jsx
│ │ ├── Input.jsx
│ │ └── Loading.jsx
│ ├── services/ # Business logic and data management
│ │ ├── VerseService.js # CRUD operations for verses
│ │ ├── StorageService.js # IndexedDB persistence layer
│ │ ├── TimeService.js # Time tracking and management
│ │ ├── NotificationService.js # Browser notifications
│ │ └── PWAInstallService.js # PWA installation handling
│ ├── hooks/ # Custom React hooks
│ │ ├── useVerseLibrary.js # Verse management hook
│ │ ├── useUsageTimer.js # Timer functionality hook
│ │ ├── useLockScreen.js # Lock screen state hook
│ │ ├── useSettings.js # Settings management hook
│ │ └── usePWAInstall.js # PWA installation hook
│ ├── utils/ # Utility functions
│ │ ├── constants.js # App constants
│ │ ├── helpers.js # Helper functions
│ │ ├── validators.js # Input validation
│ │ └── formatters.js # Data formatting
│ ├── styles/ # Global styles and themes
│ │ ├── globals.css # Global CSS
│ │ ├── variables.css # CSS custom properties
│ │ ├── components.css # Component-specific styles
│ │ └── themes/ # Theme variations
│ │ ├── light.css
│ │ └── dark.css
│ ├── data/ # Static data and presets
│ │ ├── presetVerses.js # Default Bible verses
│ │ ├── categories.js # Verse categories
│ │ └── translations.js # Bible translations
│ ├── context/ # React context providers
│ │ ├── AppContext.js # Main app state
│ │ ├── SettingsContext.js # Settings state
│ │ └── TimerContext.js # Timer state
│ ├── pages/ # Page components
│ │ ├── Home.jsx # Main dashboard
│ │ ├── Library.jsx # Verse library page
│ │ ├── Timer.jsx # Timer page
│ │ ├── Settings.jsx # Settings page
│ │ └── About.jsx # About page
│ ├── App.jsx # Main app component
│ ├── index.js # App entry point
│ └── registerSW.js # Service worker registration
├── package.json # Dependencies and scripts
├── tailwind.config.js # Tailwind CSS configuration
├── vite.config.js # Vite build configuration
├── .gitignore # Git ignore rules
├── .eslintrc.js # ESLint configuration
└── README.md # This file
- Purpose: Manages preset and custom Bible verses
- Features:
- Browse preset verses by category (encouragement, wisdom, etc.)
- Add custom verses with reference and text
- Edit and delete custom verses
- Search and filter functionality
- Verse difficulty ratings
- Purpose: Requires users to type verses correctly multiple times
- Features:
- Real-time typing validation
- Progress tracking (X/Y correct attempts)
- Error highlighting and correction suggestions
- Configurable repetition count
- Success celebration animation
- Purpose: Tracks device usage time and triggers locks
- Features:
- Real-time usage tracking
- Visual progress indicators
- Configurable time limits (daily, session)
- Break reminders
- Usage statistics and reports
- Purpose: Overlay that blocks access until verse task completion
- Features:
- Full-screen overlay blocking all interactions
- Verse selection interface
- Integration with VerseInput component
- Emergency override options
- Lock screen customization
- Purpose: UI for app configuration and preferences
- Features:
- Enforcement mode selection (strict/gentle)
- Time limit configuration
- Verse repetition count settings
- Notification preferences
- Theme selection (light/dark)
- CRUD Operations: Create, read, update, delete verses
- Features:
- Preset verse management
- Custom verse storage
- Verse categorization
- Search and filtering
- Import/export functionality
- Persistence: Local data storage using IndexedDB (Dexie.js)
- Features:
- Verse database management
- Settings persistence
- Usage statistics storage
- Offline data access
- Data migration handling
- Time Management: Track elapsed time and manage thresholds
- Features:
- Usage time tracking
- Reset logic (daily, weekly)
- Threshold management
- Break scheduling
- Time zone handling
- App name and short name
- Icons (192x192, 512x512, Apple touch icon)
- Theme colors and background
- Display mode (standalone)
- Start URL and scope
- Orientation preferences
- Workbox integration for caching
- Offline functionality
- Background sync
- Push notifications
- Cache strategies
- Install prompt handling
- Beforeinstallprompt event
- Installation instructions
- App icon placement
- Splash screen configuration
- React 18+: Component library
- Vite: Build tool and dev server
- Dexie.js: IndexedDB wrapper for data persistence
- Workbox: Service worker and caching utilities
- Tailwind CSS: Utility-first CSS framework
- Headless UI: Unstyled accessible components
- React Icons: Icon library
- Framer Motion: Animation library
- date-fns: Date manipulation
- uuid: Unique identifier generation
- localforage: Enhanced local storage
- react-hot-toast: Toast notifications
- ESLint: Code linting
- Prettier: Code formatting
- Husky: Git hooks
- Lint-staged: Pre-commit linting
- Initialize React project with Vite
- Set up PWA configuration
- Configure Tailwind CSS
- Create basic project structure
- Set up development environment
- Create all component directories
- Add placeholder components
- Set up routing structure
- Create basic layouts
- Add navigation components
- Define verse data structure
- Design settings schema
- Plan usage tracking schema
- Set up IndexedDB tables
- Create data migration strategy
- Build verse library interface
- Implement verse CRUD operations
- Create typing validation system
- Add progress tracking
- Implement error handling
- Build usage timer component
- Implement lock screen overlay
- Create timer-lock integration
- Add break reminder system
- Implement emergency override
- Create settings interface
- Implement data persistence
- Add configuration validation
- Create backup/restore functionality
- Add data export/import
- Apply consistent styling
- Add animations and transitions
- Implement responsive design
- Create loading states
- Add accessibility features
- Test offline functionality
- Implement push notifications
- Add install prompts
- Performance optimization
- Cross-browser testing
- Clone the repository
- Install dependencies:
npm install - Start development server:
npm run dev - Build for production:
npm run build - Test PWA features:
npm run preview
Please read the contributing guidelines before submitting pull requests.
This project is licensed under the MIT License.