Add Prayer Times, Dhikr counter, Quran tracker with mobile UI overhaul

- Prayer times page: arc progress ring, next-prayer countdown, clean prayer list
- Dhikr counter: SVG ring with glow, 3-phase sequence (SubhanAllah/Alhamdulillah/AllahuAkbar), streak tracking
- Daily Quran reading tracker API routes (GET/POST)
- Bottom nav updated: Prayer + Dhikr tabs, Repeat2 icon for dhikr, Moon for prayer
- Home page redirects to /prayer as primary entry point
- Dockerfile: openssl added to builder stage, explicit prisma schema path fixes build
- Schema: dhikrStreak, quranStreak on User; DhikrSession and QuranReading models
- Stub wallet top-up checkout to fix TypeScript build error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
FalahMobile
2026-06-15 08:05:51 +01:00
commit e2365e29fe
60 changed files with 5591 additions and 0 deletions
+107
View File
@@ -0,0 +1,107 @@
'use client'
import { useState } from 'react'
import { useAuth } from '@/lib/AuthContext'
import { useRouter } from 'next/navigation'
import Link from 'next/link'
import { Eye, EyeOff } from 'lucide-react'
export default function LoginPage() {
const { login } = useAuth()
const router = useRouter()
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [showPass, setShowPass] = useState(false)
const [error, setError] = useState('')
const [loading, setLoading] = useState(false)
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault()
setLoading(true)
setError('')
try {
await login(email, password)
router.push('/nur')
} catch (err: any) {
setError(err.message || 'Invalid email or password')
} finally {
setLoading(false)
}
}
return (
<div className="min-h-dvh flex flex-col bg-[#0a0a0f] px-6">
{/* Brand */}
<div className="flex flex-col items-center pt-16 pb-10">
<div className="w-20 h-20 rounded-3xl bg-[#D4AF37]/10 border border-[#D4AF37]/25 flex items-center justify-center mb-5">
<span className="text-3xl font-bold text-[#D4AF37]">ف</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight">Welcome back</h1>
<p className="text-gray-500 text-sm mt-1">Sign in to your Falah account</p>
</div>
{/* Form */}
<form onSubmit={handleSubmit} className="space-y-4 flex-1">
<div className="space-y-1.5">
<label className="text-xs font-semibold text-gray-500 uppercase tracking-widest">Email</label>
<input
type="email"
placeholder="you@example.com"
value={email}
onChange={e => setEmail(e.target.value)}
required
autoComplete="email"
inputMode="email"
className="w-full bg-[#111118] border border-gray-800 rounded-2xl px-4 py-4 text-white placeholder-gray-700 focus:border-[#D4AF37]/60 focus:outline-none transition"
/>
</div>
<div className="space-y-1.5">
<label className="text-xs font-semibold text-gray-500 uppercase tracking-widest">Password</label>
<div className="relative">
<input
type={showPass ? 'text' : 'password'}
placeholder="••••••••"
value={password}
onChange={e => setPassword(e.target.value)}
required
autoComplete="current-password"
className="w-full bg-[#111118] border border-gray-800 rounded-2xl px-4 py-4 pr-14 text-white placeholder-gray-700 focus:border-[#D4AF37]/60 focus:outline-none transition"
/>
<button
type="button"
onClick={() => setShowPass(v => !v)}
className="absolute right-4 top-1/2 -translate-y-1/2 text-gray-600 p-1"
>
{showPass ? <EyeOff size={20} /> : <Eye size={20} />}
</button>
</div>
</div>
{error && (
<div className="bg-red-500/10 border border-red-500/20 rounded-2xl px-4 py-3">
<p className="text-red-400 text-sm">{error}</p>
</div>
)}
<button
type="submit"
disabled={loading}
className="w-full bg-[#D4AF37] text-[#0a0a0f] py-4 rounded-2xl font-bold text-base disabled:opacity-50 active:scale-[0.98] transition-all mt-2"
>
{loading ? 'Signing in...' : 'Sign In'}
</button>
</form>
<div className="py-8 space-y-4 text-center">
<p className="text-sm text-gray-500">
No account?{' '}
<Link href="/register" className="text-[#D4AF37] font-semibold">
Create one free
</Link>
</p>
<p className="text-xs text-gray-800">بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ</p>
</div>
</div>
)
}