feat: Apple-style donation-focused landing page + Azure OpenAI fixes

Major updates:
- Replace homepage with clean, minimalist Apple-style landing page
- Focus on donation messaging and mission statement
- Add comprehensive AI chat analysis documentation
- Fix Azure OpenAI configuration with correct endpoints
- Update embedding API to use text-embedding-ada-002 (1536 dims)

Landing Page Features:
- Hero section with tagline "Every Scripture. Every Language. Forever Free"
- Mission statement emphasizing free access
- Matthew 10:8 verse highlight
- 6 feature cards (Global Library, Multilingual, Prayer Wall, AI Chat, Privacy, Offline)
- Donation CTA sections with PayPal and card options
- "Why It Matters" section with dark background
- Clean footer with navigation links

Technical Changes:
- Updated .env.local with new Azure credentials
- Fixed vector-search.ts to support separate embed API version
- Integrated AuthModal into Bible reader and prayers page
- Made prayer filters collapsible and mobile-responsive
- Changed language picker to single-select

Documentation Created:
- AI_CHAT_FIX_PLAN.md - Comprehensive implementation plan
- AI_CHAT_VERIFICATION_FINDINGS.md - Database analysis
- AI_CHAT_ANALYSIS_SUMMARY.md - Executive summary
- AI_CHAT_STATUS_UPDATE.md - Current status and next steps
- logo.svg - App logo (MenuBook icon)

Build:  Successful (Next.js 15.5.3)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-10 22:38:19 +00:00
parent 71047c85cc
commit 79f1512f3a
17 changed files with 4066 additions and 666 deletions

View File

@@ -45,6 +45,7 @@ import {
import { useState, useRef, useEffect, useCallback } from 'react'
import { useTranslations, useLocale } from 'next-intl'
import ReactMarkdown from 'react-markdown'
import { AuthModal } from '@/components/auth/auth-modal'
interface ChatMessage {
id: string
@@ -95,6 +96,7 @@ export default function FloatingChat() {
const [showRenameDialog, setShowRenameDialog] = useState(false)
const [showDeleteDialog, setShowDeleteDialog] = useState(false)
const [newTitle, setNewTitle] = useState('')
const [authModalOpen, setAuthModalOpen] = useState(false)
const messagesEndRef = useRef<HTMLDivElement>(null)
const scrollToBottom = () => {
@@ -123,6 +125,15 @@ export default function FloatingChat() {
return () => window.removeEventListener('floating-chat:open', handler as EventListener)
}, [])
// Listen for auth sign-in required events
useEffect(() => {
const handler = () => {
setAuthModalOpen(true)
}
window.addEventListener('auth:sign-in-required', handler as EventListener)
return () => window.removeEventListener('auth:sign-in-required', handler as EventListener)
}, [])
// Check authentication status
useEffect(() => {
checkAuthStatus()
@@ -429,6 +440,12 @@ export default function FloatingChat() {
const toggleFullscreen = () => setIsFullscreen(prev => !prev)
const handleAuthSuccess = () => {
setAuthModalOpen(false)
// Re-check auth status to update the UI
checkAuthStatus()
}
return (
<>
{/* Floating Action Button */}
@@ -999,6 +1016,17 @@ export default function FloatingChat() {
)}
</Paper>
</Slide>
{/* Auth Modal */}
<AuthModal
open={authModalOpen}
onClose={() => setAuthModalOpen(false)}
onSuccess={handleAuthSuccess}
message={locale === 'ro'
? 'Vă rugăm să vă autentificați pentru a accesa chat-ul AI și a salva conversațiile.'
: 'Please sign in to access the AI chat and save your conversations.'}
defaultTab="login"
/>
</>
)
}