Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
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
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
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