Commit Graph

81 Commits

Author SHA1 Message Date
fee36dfdad feat: improve Bible reader UX with dropdown menu and enhanced offline features
- Replace three separate verse action icons with compact three-dot dropdown menu
  - Bookmark, Copy Verse, and Ask AI now in a single menu
  - Better space utilization on mobile, tablet, and desktop

- Enhance offline Bible downloads UI
  - Move downloaded versions list to top for better visibility
  - Add inline progress bars during downloads
  - Show real-time download progress with chapter counts
  - Add refresh button for downloaded versions list
  - Remove duplicate header, keep only main header with online/offline status

- Improve build performance
  - Add .eslintignore to speed up linting phase
  - Already excludes large directories (bibles/, scripts/, csv_bibles/)

- Add debug logging for offline storage operations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 08:23:22 +00:00
44831a096f fix: improve Bible reader loading UX with skeleton states
- Remove full-screen loading backdrop that hides entire UI
- Add skeleton loading components for chapter headers and verses
- Implement smooth content transitions without UI disappearance
- Change initial loading state to prevent immediate UI hide
- Enhance Suspense fallbacks with better loading messages
- Keep Bible reader interface visible during all loading states

Fixes issue where:
- Entire reader disappeared during chapter changes
- Users saw only header/footer during loading
- Poor perceived performance with jarring transitions

Now provides professional skeleton loading within the reader
interface for a smooth, responsive user experience.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 20:14:51 +00:00
b337b82fde fix: resolve race conditions in Bible reader SEO URLs
- Add request cancellation with AbortController for books and verses fetching
- Implement debouncing (300ms) for version changes to prevent rapid API calls
- Fix conflicting useEffect hooks that caused incorrect Bible text display
- Add enhanced error handling and loading state management
- Prevent empty states when switching Bible versions quickly
- Improve user experience with immediate loading feedback

Fixes issue where selecting Bible versions rapidly would cause:
- 500 API errors from concurrent requests
- Wrong Bible text being displayed
- Empty content states
- Poor user experience during filtering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 19:46:19 +00:00
61a5180e2f feat: implement SEO-friendly URLs for Bible reader
- Add dynamic route structure /[locale]/bible/[version]/[book]/[chapter]
- Convert UUID-based URLs to readable format (e.g., /en/bible/eng-kjv/genesis/1)
- Implement automatic redirects from old URLs to new SEO-friendly format
- Add SEO metadata generation with proper titles, descriptions, and OpenGraph tags
- Create API endpoint for URL conversion between formats
- Update navigation in search results, bookmarks, and internal links
- Fix PWA manifest icons to correct dimensions (192x192, 512x512)
- Resolve JavaScript parameter passing issues between server and client components
- Maintain backward compatibility with existing bookmark and search functionality

Benefits:
- Improved SEO with descriptive URLs
- Better user experience with readable URLs
- Enhanced social media sharing
- Maintained full backward compatibility
2025-09-28 23:17:58 +00:00
a01b2490dc Implement comprehensive PWA with offline Bible reading capabilities
- Add Web App Manifest with app metadata, icons, and installation support
- Create Service Worker with intelligent caching strategies for Bible content, static assets, and dynamic content
- Implement IndexedDB-based offline storage system for Bible versions, books, chapters, and verses
- Add offline download manager component for browsing and downloading Bible versions
- Create offline Bible reader component for seamless offline reading experience
- Integrate PWA install prompt with platform-specific instructions
- Add offline reading interface to existing Bible reader with download buttons
- Create dedicated offline page with tabbed interface for reading and downloading
- Add PWA and offline-related translations for English and Romanian locales
- Implement background sync for Bible downloads and cache management
- Add storage usage monitoring and management utilities
- Ensure SSR-safe implementation with dynamic imports for client-side components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 22:20:44 +00:00
83a981cabc Require user authentication for AI chat functionality
- Update chat API to require valid authentication tokens for all requests
- Add authentication requirement screens to both chat components
- Show "Create Account / Sign In" prompts for unauthenticated users
- Hide chat input and functionality until user is logged in
- Return 401 errors with clear messages when authentication is missing
- Maintain bilingual support (Romanian/English) for auth prompts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 20:22:57 +00:00
e4b815cb40 Add Ollama embedding support and improve prayer system with public/private visibility
- Add Ollama fallback support in vector search with Azure OpenAI as primary
- Enhance prayer system with public/private visibility options and language filtering
- Update OG image to use new biblical-guide-og-image.png
- Improve prayer request management with better categorization
- Remove deprecated ingest_json_pgvector.py script

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 19:25:49 +00:00
2d27eae756 Enhance RAG system to support multiple vector databases and improve AI chat functionality
- Update vector-search.ts to query all available vector tables per language instead of single table
- Add getAllVectorTables() function to discover all language-specific vector tables
- Enhance searchBibleHybrid() to query multiple tables and merge results by relevance score
- Enhance searchBibleSemantic() to combine results from all available vector databases
- Add comprehensive error handling and logging for vector search operations
- Improve Azure OpenAI content filtering detection and error handling
- Add test-vector API endpoint for database diagnostics and debugging
- Fix environment configuration with complete Azure OpenAI settings
- Enable multi-translation biblical context from diverse Bible versions simultaneously

Tested: Romanian chat works excellently with rich biblical context and verse citations
Issue: English requires vector table creation - 47 English Bible versions exist but no vector tables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 07:21:59 +00:00
3ae9733805 Add sitemap and robots.txt, update home page stats to static values, and fix prayer language detection
- Create sitemap.xml with internationalized routes and proper SEO attributes
- Create robots.txt with appropriate crawling rules for public/private content
- Update home page stats to show static values (1,416 Bible versions, 17M+ verses)
- Remove live stats API calls to eliminate loading delays
- Add /api/stats endpoint for potential future use
- Fix Romanian prayers incorrectly tagged as English in database
- Add missing AZURE_OPENAI_DEPLOYMENT to .env.example
- Update translation keys for Bible versions stat
- Add sample English prayer requests to populate prayer wall

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 06:41:02 +00:00
14c4ec2edc Fix full-screen mode usability issues and enhance reading experience
Full-Screen Mode Improvements:
- Fix navigation controls background transparency issue in reading mode
- Add semi-transparent backgrounds with backdrop blur for better visibility
- Implement theme-aware colors matching user's selected theme (light/dark/sepia)
- Add subtle borders for better visual definition without distraction

Verse Action Buttons Enhancement:
- Enable bookmark, copy, and chat buttons in full-screen reading mode
- Remove reading mode restriction that was hiding essential verse-level functionality
- Add theme-aware hover effects for better integration in reading mode
- Implement adaptive opacity (0.2 in reading mode, 0.3 in normal mode)
- Smooth hover transitions that reveal buttons when needed

Smart Chat Integration:
- Automatically exit full-screen mode when chat icon is clicked from reading mode
- Add smooth transition timing to allow exit animation to complete
- Preserve verse context and pre-filled AI messages through mode transitions
- Prevent chat from opening hidden behind full-screen overlay
- Maintain authentication flow and redirect logic

User Experience Enhancements:
- Professional navigation bar with backdrop blur effect (modern glass morphism)
- Non-intrusive verse actions that don't distract from reading
- Intelligent behavior that adapts based on current reading mode
- Seamless transition from immersive reading to AI conversations
- Consistent visual experience across all themes and modes

Technical Implementation:
- Theme-aware styling for dark, light, and sepia modes
- CSS backdrop-filter for modern blur effects
- Smart timing with setTimeout for smooth transitions
- Preserved functionality while improving visual integration
- Enhanced hover states with custom theme-matching colors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 20:50:55 +00:00
218d94107d Fix Bible reader page jumping and layout stability issues
Layout Stability Improvements:
- Add consistent minHeight (60vh) to content containers to prevent layout shifts
- Implement sticky navigation bar with smooth transitions
- Position loading spinner absolutely to prevent content jumping
- Add smooth opacity transitions during content loading

Content Loading Enhancements:
- Preserve previous verses during loading to prevent content flashing
- Display previous verse count during transitions for visual continuity
- Use requestAnimationFrame and setTimeout for smoother state transitions
- Implement content fade-in effects with reduced opacity during loading

Scroll Position Management:
- Store scroll position before loading new content
- Restore scroll position after content loads (maintains reading flow)
- Smart scroll restoration that only applies when not navigating to specific verse
- Prevent scroll jumping during chapter transitions

User Experience Improvements:
- Eliminate page "jumping" between chapter transitions
- Remove container resizing issues that disrupted reading flow
- Provide professional, book-like reading experience
- Maintain visual continuity during all navigation actions
- Smooth loading states with professional transitions

Technical Implementation:
- Add previousVerses state for content continuity
- Implement position: sticky for navigation stability
- Use CSS transitions for smooth visual effects
- Optimize loading timing with requestAnimationFrame
- Maintain consistent container dimensions throughout app lifecycle

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 20:31:34 +00:00
274f57f95d Major performance optimization for Bible versions loading
Database Optimizations:
- Add composite index [language, isDefault] for optimized filtering + sorting
- Add search indexes on [name] and [abbreviation] fields
- Improves query performance from 85ms to ~15ms for large datasets

API Enhancements:
- Add smart limiting: default 200 versions when showing all (vs 1,416 total)
- Add search functionality by name and abbreviation with case-insensitive matching
- Optimize field selection: only fetch essential fields (id, name, abbreviation, language, isDefault)
- Add HTTP caching headers: 1-hour cache with 2-hour stale-while-revalidate
- Add pagination metadata: total count and hasMore flag

Frontend Optimizations:
- Limit "Show All" versions to 200 for better performance
- Maintain backward compatibility with existing language filtering
- Preserve all existing search and filtering functionality

Performance Results:
- All versions query: 85ms → ~15ms (82% faster)
- Language-filtered queries: ~6ms (already optimized)
- Reduced data transfer with selective field fetching
- Better user experience with faster loading times

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 20:23:53 +00:00
68528eec73 Add AI chat feature for verse explanations and fix login redirect handling
Bible Reader Enhancements:
- Add chat icon to each verse for AI explanations
- Implement handleVerseChat function with pre-filled contextual messages
- Chat opens with message: "Explain in depth this verse [text] from [version], [book] [chapter:verse] and its meaning"
- Visible to all users, redirects to login for unauthenticated users
- Fix copy message translation from 'bible.copied' to 'copied'

Login System Improvements:
- Fix redirect parameter handling in login pages
- Users are now properly redirected to /bible page after successful login
- Preserve redirect URL parameters through login flow
- Add Suspense boundaries for useSearchParams compliance
- Ensure verse/chapter context is maintained after login

Technical Changes:
- Add Chat icon import from Material-UI
- Implement floating chat event dispatch system
- Fix Next.js 15 build warnings with proper Suspense wrapping
- Maintain existing UX patterns (visible to all, functional for authenticated users)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 20:11:35 +00:00
6913206560 Make verse-level bookmark buttons visible to all users and fix copy message translation
- Remove user authentication check from verse bookmark button rendering
- Verse bookmark buttons now visible to all users (logged-in and logged-out)
- Unauthenticated users are redirected to login when clicking bookmark buttons
- Fix copy success message translation from 'verseCopied' to 'bible.copied'
- Chapter bookmark and share buttons already visible to all users
- Improve handleShare function with proper error handling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 19:54:46 +00:00
1054f5d817 Add Mailgun admin tools and contact API 2025-09-24 13:59:26 +00:00
6329ad0618 Add search functionality to version and book dropdowns
- Replace Select components with Autocomplete for enhanced UX
- Add real-time search for bible versions (1400+ options)
- Enable book search by name or testament
- Improve version display format: "Name - Abbreviation"
- Add rich option rendering with metadata (language, chapters)
- Include smart filtering across multiple fields
- Maintain keyboard navigation and accessibility
- Fix header visibility issue in full screen mode

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 13:05:22 +00:00
ebd2519974 Improve bible reader navigation layout and alignment
- Reorganize controls into two logical rows: filters and settings
- Fix alignment issues with version selector and toggle button
- Center font size controls with other action buttons
- Remove version count caption that caused height differences
- Maintain full functionality in both normal and reading modes
- Improve visual hierarchy and user experience

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 12:54:08 +00:00
920798966a Fix bible reader version filtering and improve UI
- Fix API to show all 1416+ bible versions with language filtering toggle
- Add default language-specific filtering with option to show all versions
- Fix books API to work with cross-language version selection
- Add toggle button with visual feedback and version count display
- Improve dropdown scrolling and add language indicators
- Maintain backward compatibility while fixing core functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 12:27:21 +00:00
4adf1d286e Add comprehensive social media management system and improve admin pages
## Social Media Management System
- Add SocialMediaLink database model with platform, URL, icon, and ordering
- Create complete CRUD API endpoints for admin social media management
- Implement admin social media management page with Material-UI DataGrid
- Add "Social Media" menu item to admin navigation
- Update footer to dynamically load and display enabled social media links
- Support multiple platforms: Facebook, Twitter, Instagram, YouTube, LinkedIn, GitHub, TikTok
- Include proper icon mapping and fallback handling

## Admin Pages Improvements
- Replace broken TinyMCE editor with working WYSIWYG rich text editor
- Create SimpleRichEditor component with toolbar for formatting
- Fix admin authentication to use cookies instead of localStorage tokens
- Update all admin API calls to use credentials: 'include'
- Increase content editor height to 800px for better editing experience
- Add Lexical editor component as alternative (not currently used)

## Footer Pages System
- Create 8 comprehensive footer pages: About, Blog, Support, API Docs, Terms, Privacy, Cookies, GDPR
- Implement dynamic footer link management with smart categorization
- Separate Quick Links and Legal sections with automatic filtering
- Remove duplicate hardcoded links and use database-driven system
- All footer pages are fully written with professional content

## Database & Dependencies
- Add uuid package for ID generation
- Update Prisma schema with new SocialMediaLink model and relations
- Seed default social media links for Facebook, Twitter, Instagram, YouTube
- Add Lexical rich text editor packages (@lexical/react, etc.)

## Technical Improvements
- Fix async params compatibility for Next.js 15
- Update MUI DataGrid deprecated props
- Improve admin layout navigation structure
- Add proper TypeScript interfaces for all new components
- Implement proper error handling and user feedback

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 12:08:01 +00:00
3b34d7518b Fix admin authentication cookie handling
- Updated verifyAdminAuth to check for adminToken cookie in addition to Bearer token
- Added fallback to parse cookie from request headers when cookies() API fails
- This fixes admin dashboard login issues where authentication was failing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 10:06:29 +00:00
4303e48fac Fix Next.js 15 compatibility and TypeScript errors
- Update API route handlers to use async params for Next.js 15 compatibility
- Fix MUI DataGrid deprecated props (pageSize -> initialState.pagination)
- Replace Material-UI Grid components with Box for better compatibility
- Fix admin authentication system with proper request parameters
- Update permission constants to match available AdminPermission enum values
- Add missing properties to Page interface for type safety
- Update .gitignore to exclude venv/, import logs, and large data directories
- Optimize Next.js config to reduce memory usage during builds

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 09:54:13 +00:00
b0dd6c1a4b Remove deprecated swcMinify option from Next.js 15+ config
- SWC is now the default minifier in Next.js 15+
- Removes configuration warning during builds
- Maintains all other build optimizations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 08:27:08 +00:00
6c3943ffa3 Fix Next.js config and confirm build optimizations working
- Fix swcMinify configuration location (moved from experimental to root)
- Confirmed build time reduced from >2min timeout to 41 seconds
- Memory usage should be significantly lower with directory exclusions
- Build warnings are expected from existing admin auth imports

Build performance improvements achieved:
✓ 7GB+ bibles/ directory excluded from webpack processing
✓ scripts/ directory excluded from processing
✓ SWC minifier enabled for faster builds
✓ Webpack build worker enabled for parallel processing
✓ Memory limit reduced from unlimited to 2GB for fast builds

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 08:19:08 +00:00
fb4959a550 Exclude /bibles/ and /scripts/ folders from Next.js builds
Major performance optimization:
- Completely exclude /bibles/ (7GB+) and /scripts/ directories from webpack processing
- Add watchOptions to ignore these directories during development
- Install ignore-loader to skip large data files
- Update .nextignore with comprehensive exclusion patterns
- This should reduce build memory usage from 15GB to ~2-4GB

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 08:16:22 +00:00
cce9016e22 Add Google Analytics tracking code
- Added GA4 tracking code (G-KDVCM5G4H1) to head section
- Configured dataLayer and gtag for comprehensive analytics
- Applied to all localized pages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 08:10:18 +00:00
95070e5369 Add comprehensive page management system to admin dashboard
Features added:
- Database schema for pages and media files with content types (Rich Text, HTML, Markdown)
- Admin API routes for full page CRUD operations
- Image upload functionality with file management
- Rich text editor using TinyMCE with image insertion
- Admin interface for creating/editing pages with SEO options
- Dynamic navigation and footer integration
- Public page display routes with proper SEO metadata
- Support for featured images and content excerpts

Admin features:
- Create/edit/delete pages with rich content editor
- Upload and manage images through media library
- Configure pages to appear in navigation or footer
- Set page status (Draft, Published, Archived)
- SEO title and description management
- Real-time preview of content changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 07:26:25 +00:00
f81886a851 Fix logo branding: update from Romanian to English
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 07:06:44 +00:00
39b6899315 Complete admin dashboard implementation with comprehensive features
🚀 Major Update: v2.0.0 - Complete Administrative Dashboard

## Phase 1: Dashboard Overview & Authentication 
- Secure admin authentication with JWT tokens
- Beautiful overview dashboard with key metrics
- Role-based access control (admin, moderator permissions)
- Professional MUI design with responsive layout

## Phase 2: User Management & Content Moderation 
- Complete user management with advanced data grid
- Prayer request content moderation system
- User actions: view, suspend, activate, promote, delete
- Content approval/rejection workflows

## Phase 3: Analytics Dashboard 
- Comprehensive analytics with interactive charts (Recharts)
- User activity analytics with retention tracking
- Content engagement metrics and trends
- Real-time statistics and performance monitoring

## Phase 4: Chat Monitoring & System Administration 
- Advanced conversation monitoring with content analysis
- System health monitoring and backup management
- Security oversight and automated alerts
- Complete administrative control panel

## Key Features Added:
 **32 new API endpoints** for complete admin functionality
 **Material-UI DataGrid** with advanced filtering and pagination
 **Interactive Charts** using Recharts library
 **Real-time Monitoring** with auto-refresh capabilities
 **System Health Dashboard** with performance metrics
 **Database Backup System** with automated scheduling
 **Content Filtering** with automated moderation alerts
 **Role-based Permissions** with granular access control
 **Professional UI/UX** with consistent MUI design
 **Visit Website Button** in admin header for easy navigation

## Technical Implementation:
- **Frontend**: Material-UI components with responsive design
- **Backend**: 32 new API routes with proper authentication
- **Database**: Optimized queries with proper indexing
- **Security**: Admin-specific JWT authentication
- **Performance**: Efficient data loading with pagination
- **Charts**: Interactive visualizations with Recharts

The Biblical Guide application now provides world-class administrative capabilities for complete platform management!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 12:01:34 +00:00
Claude Assistant
ee99e93ec2 Implement dynamic daily verse system with rotating Biblical content
- Add daily-verse API endpoint with 7 rotating verses in Romanian and English
- Replace static homepage verse with dynamic fetch from API
- Ensure consistent daily rotation using day-of-year calculation
- Support both ro and en locales for verse content

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 19:22:34 +00:00
Claude Assistant
d4b0062521 Implement comprehensive homepage improvements and SEO optimization
Major homepage and SEO enhancements based on optimization document:

**Homepage Content Updates:**
- Updated H1 titles with SEO-optimized text for both RO/EN
- Enhanced hero descriptions with targeted keywords
- Improved feature descriptions for better clarity
- Updated daily verse section with keyword-rich titles
- Added new footer description with SEO focus

**SEO Implementation:**
- Added dynamic metadata generation with locale-specific SEO
- Implemented Open Graph tags for social media sharing
- Added Twitter Card metadata for enhanced sharing
- Integrated Schema.org JSON-LD structured data
- Set up hreflang tags for international SEO
- Added canonical URLs to prevent duplicate content
- Included targeted keywords for both languages

**Technical Improvements:**
- Migrated from Docker to PM2 deployment
- Removed Docker files and updated deployment scripts
- Updated README with PM2 instructions
- Fixed console log cleanup for production
- Added proper favicon with Next.js app directory
- Increased memory limit to 4GB for better performance
- Updated port configuration to 0.0.0.0:3010
- Set Romanian (/ro) as default locale with proper redirects

**Translation Updates:**
- Enhanced Romanian translations with SEO-optimized content
- Updated English translations with matching SEO improvements
- Added new 'seo' namespace for metadata translations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 18:40:21 +00:00
Claude Assistant
b24251eb2d Add simple Docker deployment setup without nginx/postgres
- Add docker-compose.yml with single app service on port 3010
- Add deploy.sh script to fetch latest production branch code
- Uses external PostgreSQL database via DATABASE_URL
- No nginx container - app exposed directly on port 3010
- Supports automated deployment from production branch

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:41:18 +00:00
Claude Assistant
5542a9d6a7 Prepare production branch: remove test files and add Dockerfile
- Remove all test files (__tests__, *.test.*, *.spec.*)
- Remove Jest configuration files (jest.config.js, jest.setup.js)
- Remove test-related scripts from package.json
- Remove Jest dependencies from package.json
- Add production Dockerfile for standalone Next.js app
- Update tsconfig.json exclusions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:38:19 +00:00
Claude Assistant
19d29032ae Fix TypeScript configuration by excluding test files
- Exclude __tests__ directory from TypeScript compilation
- Resolves Jest type definition errors in test files
- TypeScript now compiles cleanly without errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:33:06 +00:00
Claude Assistant
1257e9bdf7 Fix Next.js 15 Suspense boundary errors and remove Docker files
- Add Suspense boundaries for useSearchParams in bible and search pages
- Extract search page content to separate component for proper client-side rendering
- Remove all Docker configuration files and temp documentation
- Build now passes successfully without TypeScript or Suspense errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 14:26:23 +00:00
andupetcu
98c17d69bc Build fixes: offline-safe fonts, Next.js API route type updates, TS strict errors resolved, MUI import cleanup, chat markdown wrapper, Azure OpenAI typing, caching key + chapter API id types, and misc error-logging typings. 2025-09-22 17:07:31 +03:00
andupetcu
c82b3007fd Restructure chat interface to display history side-by-side with live chat
- Change chat layout from vertical stacking to horizontal side-by-side layout
- History panel (300px width) displays on left with conversation list
- Main chat area takes remaining space on right with messages and input
- Improves UX by making chat history visible alongside active conversation
- Fix JSX structure and nesting for proper component rendering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 12:57:09 +03:00
andupetcu
24c0577f44 Fix chat history authentication and conversation saving
- Fix critical async/await bug in chat API token verification
- Add comprehensive authentication debugging logs
- Fix conversations API Zod schema validation for query parameters
- Remove problematic CircularProgress import causing build warnings
- Improve error handling and user feedback in chat component

The main issue was that verifyToken() was called without await, causing
the chat API to receive a Promise object instead of the user payload,
resulting in undefined userId and failed conversation persistence.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 12:47:59 +03:00
andupetcu
6295c15755 Fix AI chat conversation errors and history loading issues
- Fix CircularProgress import from correct MUI package
- Fix conversationId validation by omitting null values instead of sending them
- Fix conversations API Zod schema default values (string vs number mismatch)
- Remove debug logging from chat error handling
- AI chat conversations now work properly with authentication
- Chat history loading no longer fails with validation errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 12:20:35 +03:00
andupetcu
382fb93de2 Complete Phase 3: Add conversation management capabilities to AI chat
- Add conversation delete functionality with confirmation dialog
- Add conversation rename functionality with input modal
- Implement three-dot menu for each conversation item
- Add proper authentication token key consistency
- Fix JSX structure issues in floating chat component
- Integrate full CRUD operations with conversation API

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 12:05:03 +03:00
andupetcu
86b7ff377b Implement AI chat history system with enhanced memory (Phases 1 & 2)
Phase 1 - Database Schema & Basic API:
- Add ChatConversation and ChatMessage tables with proper relationships
- Create conversation CRUD API endpoints with authentication
- Update chat API to support persistent conversations
- Implement auto-generated conversation titles and language separation
- Add conversation soft delete and user-specific access control

Phase 2 - Enhanced Memory System:
- Implement intelligent context selection beyond simple chronological order
- Add relevance scoring for older messages based on keyword overlap and biblical references
- Create automatic message summarization for very long conversations
- Optimize token usage with smart context management (1500 token budget)
- Add biblical awareness with Romanian/English book name detection
- Implement time-based relevance decay for better context prioritization

Frontend Improvements:
- Add chat history button to floating chat header
- Create basic history panel UI with placeholder content
- Maintain backward compatibility for anonymous users

Database Changes:
- Enhanced schema with conversation relationships and message roles
- Proper indexing for performance and user-specific queries
- Migration completed successfully with prisma db push

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 11:33:36 +03:00
andupetcu
73a8b44f76 Fix Discuss this verse functionality and update live counter to static text
- Replace dynamic live counter with static "thousands of believers" text in both languages
- Fix Discuss this verse feature with proper timing and quote escaping
- Add setTimeout delay to ensure chat input is set after component renders
- Remove unescaped quotes from English daily verse text
- Merge duplicate hero translation objects in both language files
- Clean up debug console.log statements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 10:57:45 +03:00
andupetcu
e2c7e21967 Implement comprehensive homepage enhancements and floating chat improvements
- Add dynamic date and year generation replacing static 2024 values
- Implement "Discuss this verse" feature with AI chat integration
- Fix translation key conflicts by merging duplicate hero objects
- Update Romanian translations with improved messaging
- Enhance floating chat to support initial messages via events
- Fix FORMATTING_ERROR for liveCounter with proper next-intl syntax

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 10:39:07 +03:00
andupetcu
72d39e74c8 Implement comprehensive homepage enhancements with 8 new sections
Features implemented:
1. Enhanced Hero Section with live user counter (simulated)
2. Interactive Demo Section with chat preview
3. Daily Verse Section with actions (discuss, save, share)
4. How It Works 3-step process visualization
5. Community Prayer Wall with live prayer examples
6. Testimonials Section with 4 realistic testimonials
7. FAQ Section with 6 common questions and expandable answers
8. Enhanced Footer with newsletter signup, quick links, legal, and social

Additional improvements:
- Added live counter showing active users studying
- Interactive demo showing AI chat conversation
- Newsletter subscription form
- Social media links and language indicators
- Comprehensive translations in English and Romanian
- Mobile-responsive design with flexbox layouts
- Modern Material-UI components with animations
- Enhanced visual hierarchy and user engagement
2025-09-22 09:48:11 +03:00
andupetcu
4fac06e94b Fix relativeTime API usage correctly
- Changed from incorrect f.relativeTime(number, unit, options) to correct f.relativeTime(date, now)
- The function expects two Date objects, not a number and unit string
- This properly eliminates the ENVIRONMENT_FALLBACK warning
- Simplified the implementation to use next-intl's built-in formatting
2025-09-22 09:25:58 +03:00
andupetcu
019e64d2ac Fix relativeTime warning in prayers page
- Added 'now' parameter to all relativeTime calls to prevent ENVIRONMENT_FALLBACK warning
- Ensures proper time reference for relative time calculations
- Maintains existing fallback for older browsers
2025-09-22 09:23:02 +03:00
andupetcu
30e5c8d931 Fix keyboard shortcuts conflict between bible reader and AI chat
- Added data-floating-chat attribute to chat component for easy detection
- Updated bible reader keyboard event handler to check if chat is open
- Prevent shortcuts from triggering when user is typing in input fields
- Check for dialogs, modals, and the floating chat before processing shortcuts
2025-09-22 09:21:56 +03:00
andupetcu
414876ec49 Fix JSX comment syntax errors in bible reader
- Fixed malformed comment closing tags (*/>  to */)
2025-09-22 08:58:01 +03:00
andupetcu
82ace8d145 Migrate all pages from Grid to Box components using flexbox layout
- Migrated search page to use Box with flexbox for responsive layout
- Updated bible reader controls to use Box instead of Grid
- Converted home page hero, features, and stats sections to flexbox
- Removed Grid imports and replaced with Box components across all pages
- Maintained responsive behavior using sx breakpoints and flex properties
2025-09-22 08:57:13 +03:00
andupetcu
5cbb20e96f Fix prayers page layout using flexbox instead of Grid
- Replaced Grid components with Box components using flexbox
- Sidebar now takes 25% width on desktop, 100% on mobile
- Prayer list takes remaining space with flex: 1
- Responsive layout switches to column on mobile
- Fixed side-by-side layout issue

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 23:24:33 +03:00
andupetcu
8cdb3b03bf Fix relativeTime warning by removing now parameter and adding fallback
- Removed 'now' parameter from relativeTime calls to avoid next-intl warning
- Added try-catch with fallback formatting for better error handling
- Provides manual time formatting if relativeTime fails

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 23:20:02 +03:00