Commit Graph

127 Commits

Author SHA1 Message Date
andupetcu
1e9e8712f9 Fix search results navigation and Material-UI deprecation issues
- Fix search API to include bookId, verseId, and bookKey in response for proper navigation
- Update Bible reader to handle both book ID and bookKey matching for robust navigation
- Replace deprecated ListItem button prop with ListItemButton for Material-UI v5+ compatibility
- Add fallback logic in search result navigation to handle missing book identifiers
- Ensure "Go to" button takes users to exact verse with proper highlighting and scrolling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 21:32:56 +03:00
andupetcu
4cd9b406ad Redesign search page with modern UX and user-specific features
- Complete redesign of search interface with auto-suggestions, advanced filtering, and professional result display
- Implement user-specific search history (stored per user ID) for privacy
- Move popular searches from sidebar to filters modal for better organization
- Make all page sections full width by removing container constraints
- Add comprehensive search functionality with context display, bookmarks integration, and result navigation
- Include proper Romanian translations for search types ("Căutare generală", "Căutare exactă")
- Enhance UX with skeleton loading, empty states, mobile responsiveness, and keyboard shortcuts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 21:23:05 +03:00
andupetcu
40c2df3b41 Update Romanian translations and improve chapter dropdown
- Change "Bookmark-uri" to "Favorite" throughout Romanian translations
- Update chapter dropdown to show full "Chapter X" labels instead of truncated text
- Add improved MenuProps for better dropdown UX with scrollable menu
- Enhance navigation clarity with non-truncated chapter selection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 21:10:25 +03:00
andupetcu
6eade8df49 Fix missing translation keys for Bible reader settings dialog
- Add theme button translations: light, dark, sepia
- Add close button translation for settings dialog
- Complete internationalization for Romanian and English locales

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 14:31:07 +03:00
andupetcu
a2380efadd Create enhanced Bible reader with modern UX and compact navigation
- Replace old Bible page with comprehensive reader component
- Add customizable reading preferences (font size, themes, line height)
- Implement in-page navigation instead of sidebar layout
- Add quick font size controls (A- / A+) in navigation bar
- Create fullscreen reading mode with distraction-free experience
- Include verse-level bookmarking and copy functionality
- Add keyboard shortcuts for navigation and settings
- Support URL parameters for bookmark navigation
- Responsive design optimized for mobile and desktop
- Complete internationalization for Romanian and English
- Center navigation controls for better visual balance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 14:20:05 +03:00
andupetcu
686f498300 Create comprehensive bookmarks management page
Add complete bookmarks page with navigation functionality:

Features:
- Dedicated /bookmarks page for viewing all saved bookmarks
- Support for both chapter and verse bookmarks in unified view
- Statistics dashboard showing total, chapter, and verse bookmark counts
- Tabbed filtering (All, Chapters, Verses) for easy organization
- Direct navigation to Bible reading page with URL parameters
- Delete functionality for individual bookmarks
- Empty state with call-to-action to start reading

Navigation Integration:
- Add Bookmarks to main navigation menu (authenticated users only)
- Add Bookmarks to user profile dropdown menu
- Dynamic navigation based on authentication state

Bible Page Enhancements:
- URL parameter support for bookmark navigation (book, chapter, verse)
- Verse highlighting when navigating from bookmarks
- Auto-clear highlight after 3 seconds for better UX

API Endpoints:
- /api/bookmarks/all - Unified endpoint for all user bookmarks
- Returns transformed data optimized for frontend consumption

Multilingual Support:
- Full Romanian and English translations
- Consistent messaging across all bookmark interfaces

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 01:29:46 +03:00
andupetcu
1b43b4e1e3 Implement complete bookmark functionality for Bible reading
Add both chapter-level and verse-level bookmarking capabilities:

Database Changes:
- Add ChapterBookmark table for chapter-level bookmarks
- Update schema with proper relationships to User and BibleBook models
- Maintain existing Bookmark table for verse-level bookmarks

API Endpoints:
- /api/bookmarks/chapter (GET, POST, DELETE) with check endpoint
- /api/bookmarks/verse (GET, POST, DELETE) with check and bulk-check endpoints
- JWT authentication required for all bookmark operations
- Multilingual error messages (Romanian/English)

Frontend Implementation:
- Chapter bookmark button in Bible page header with visual state feedback
- Individual verse bookmark icons with hover-to-reveal UI
- Highlighted background for bookmarked verses
- Efficient bulk checking for verse bookmarks per chapter
- Real-time UI updates without page refresh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 01:25:50 +03:00
andupetcu
e4acac270e Fix profile name update persistence
Replace placeholder implementation with proper API integration:
- Create /api/user/profile PUT endpoint with JWT validation
- Update profile page to call actual API instead of setTimeout
- Use refreshUser() to update UI immediately after changes
- Ensure name changes persist to database and across page refreshes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 01:13:32 +03:00
andupetcu
196ca00194 Fix authentication state persistence and admin role display
- Implement complete authentication system with JWT token validation
- Add auth provider with persistent login state across page refreshes
- Create multilingual login/register forms with Material-UI components
- Fix token validation using raw SQL queries to bypass Prisma sync issues
- Add comprehensive error handling for expired/invalid tokens
- Create profile and settings pages with full i18n support
- Add proper user role management (admin/user) with database sync
- Implement secure middleware with CSRF protection and auth checks
- Add debug endpoints for troubleshooting authentication issues
- Fix Zustand store persistence for authentication state

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 01:06:30 +03:00
andupetcu
62ca73b2ac Fix relativeTime calls in prayers page by adding required now parameter
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 23:48:05 +03:00
andupetcu
e1146d39e0 Add rate-limited api.bible fetcher for English Bible (configurable Bible ID/abbr); outputs OT/NT JSON compatible with versioned import; resumable per-chapter cache. 2025-09-20 20:54:13 +03:00
andupetcu
5ddf62e5cf Vector schema per version: add ai_bible schema with per-version tables (bv_<lang>_<abbr>) in Python ingest; dynamic table resolution in vector-search with fallback to legacy table; sample pgAdmin queries printed. 2025-09-20 19:08:11 +03:00
andupetcu
8b26d72c1c Remove standalone /[locale]/chat page; enhance FloatingChat with fullscreen toggle via Launch icon; add global event to open chat (optionally fullscreen); wire home buttons/cards to open modal instead of routing. 2025-09-20 19:03:40 +03:00
andupetcu
3f2407b704 Localize chat UI with next-intl; send locale + serialized history to /api/chat; use locale for timestamps; suggestions from messages; rely on API prompts per locale. 2025-09-20 18:57:07 +03:00
andupetcu
75476a85c9 Fix clearFilters to reset bookKeys instead of books to avoid undefined includes error. 2025-09-20 18:15:48 +03:00
andupetcu
810fa9293e Move version selector to be the first filter on /[locale]/search sidebar. 2025-09-20 18:13:53 +03:00
andupetcu
df0eb6661f Add version selector to /[locale]/search: new /api/bible/versions endpoint; fetch versions per locale; refetch books on version change; pass version to search API; localized label. 2025-09-20 18:13:13 +03:00
andupetcu
a1b92be2a5 Search filters now backed by DB per locale/version: fetch books from /api/bible/books; send bookKeys + locale to API; API constrains by versionId and bookKey/name; keeps testament filter. 2025-09-20 18:10:50 +03:00
andupetcu
0f31dfca8e Localize /[locale]/search page via next-intl; translate UI strings, filters, statuses; use bookTranslations to render book labels by locale; keep DB filters steady; support popular searches per locale. 2025-09-20 18:08:43 +03:00
andupetcu
71447d32c3 Localize prayers page via next-intl messages (titles, categories, stats, buttons, dialog, samples); use Intl relative time; scalable for more locales. 2025-09-20 18:06:27 +03:00
andupetcu
ddfc2b673f Localize /[locale]/prayers page: use locale-aware labels, sample data, and timestamps; ensure /en/prayers renders in English. 2025-09-20 18:04:07 +03:00
andupetcu
88b251c100 Fix Edge-incompatible middleware; set Node runtime on Prisma/pg routes; add full Romanian Bible import + converter; import data JSON; resync RO bookKeys; stabilize /api/bible/books locale fallback; restart dev server. 2025-09-20 18:01:04 +03:00
andupetcu
500066450d Improve home page layout and typography
- Fix feature cards layout: 2 columns desktop, 1 mobile with consistent sizing
- Add Google Fonts: Merriweather for headings, Lato for body text
- Improve card content structure and spacing
- Center feature cards and stats section for better alignment
- Group all card content (icon, title, description) in single container
- Set fixed card dimensions (400px max width, 280px height)
- Add text overflow handling for descriptions (3 lines max)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 16:23:34 +03:00
andupetcu
51248b24f7 Update color palette and improve UI aesthetics
- Apply new teal-based color palette (#009688, #00796B, #B2DFDB)
- Update secondary color to accent yellow (#FFC107)
- Replace Material-UI loading states with proper animations and skeletons
- Remove ugly gradient background, replace with clean white
- Update all gradients to use new color scheme
- Improve text colors for better readability (#212121, #757575)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 16:04:02 +03:00
andupetcu
a0969e88df Implement complete multi-language support with Romanian/English
- Added next-intl for internationalization with Romanian as default locale
- Restructured app directory with [locale] routing (/ro, /en)
- Created comprehensive translation files for both languages
- Fixed Next.js 15 async params compatibility in layout components
- Updated all components to use proper i18n hooks and translations
- Configured middleware for locale routing and fallbacks
- Fixed FloatingChat component translation array handling
- Restored complete home page with internationalized content
- Fixed Material-UI Slide component prop error (mountOnExit → unmountOnExit)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 15:43:51 +03:00
andupetcu
dd5e1102eb Implement Azure OpenAI vector embeddings for Romanian Bible
- Add pgvector support with bible_passages table for vector search
- Create Python ingestion script for Azure OpenAI embed-3 embeddings
- Implement hybrid search combining vector similarity and full-text search
- Update AI chat to use vector search with Azure OpenAI gpt-4o
- Add floating chat component with Material UI design
- Import complete Romanian Bible (FIDELA) with 30K+ verses
- Add vector search library for semantic Bible search
- Create multi-language implementation plan for future expansion

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 15:18:00 +03:00
andupetcu
3b375c869b Add complete Biblical Guide web application with Material UI
Implemented comprehensive Romanian Biblical Guide web app:
- Next.js 15 with App Router and TypeScript
- Material UI 7.3.2 for modern, responsive design
- PostgreSQL database with Prisma ORM
- Complete Bible reader with book/chapter navigation
- AI-powered biblical chat with Romanian responses
- Prayer wall for community prayer requests
- Advanced Bible search with filters and highlighting
- Sample Bible data imported from API.Bible
- All API endpoints created and working
- Professional Material UI components throughout
- Responsive layout with navigation and theme

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 14:10:28 +03:00