feat: setup admin JSON generation and pdf viewer for free plan DPPs

This commit is contained in:
2026-07-27 14:56:25 +05:30
parent c214ca41b6
commit a5bb2d867c
74 changed files with 8546 additions and 915 deletions

View File

@@ -5,10 +5,24 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
import { ArrowLeft, Eye, EyeOff } from "lucide-react"
import Link from "next/link"
import { useState } from "react"
import { useRouter } from "next/navigation"
import { Logo } from "@/components/Logo"
export default function LoginPage() {
const [showPassword, setShowPassword] = useState(false)
const [email, setEmail] = useState("demo@pragativeer.com")
const [password, setPassword] = useState("PragatiVeer@Secure2026!")
const [error, setError] = useState("")
const router = useRouter()
const handleLogin = (e: React.FormEvent) => {
e.preventDefault()
if (email === "demo@pragativeer.com" && password === "PragatiVeer@Secure2026!") {
router.push("/dashboard")
} else {
setError("Invalid credentials. Please use the demo account.")
}
}
return (
<div className="min-h-screen bg-background flex flex-col items-center justify-center p-6 selection:bg-[#00F0FF]/20">
<Link href="/" className="absolute top-8 left-8 text-muted-foreground hover:text-foreground flex items-center gap-2 transition-colors font-medium">
@@ -26,12 +40,14 @@ export default function LoginPage() {
<CardDescription className="text-muted-foreground">Enter your credentials to access your dashboard.</CardDescription>
</CardHeader>
<CardContent className="space-y-6 pt-4">
<div className="space-y-4">
<form onSubmit={handleLogin} className="space-y-6">
<div className="space-y-4">
<div className="space-y-2">
<label className="text-sm font-bold text-foreground">Email</label>
<input
type="email"
defaultValue="demo@pragativeer.com"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="student@example.com"
suppressHydrationWarning
className="w-full bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF] focus:border-transparent transition-all"
@@ -45,7 +61,8 @@ export default function LoginPage() {
<div className="relative">
<input
type={showPassword ? "text" : "password"}
defaultValue="pragativeer2026"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
suppressHydrationWarning
className="w-full bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[#00F0FF] focus:border-transparent transition-all pr-10"
@@ -59,29 +76,19 @@ export default function LoginPage() {
</button>
</div>
</div>
</div>
</div>
<Link href="/dashboard" className="block">
<Button className="w-full rounded-xl h-12 font-bold text-base bg-foreground text-background hover:bg-foreground/90 transition-all shadow-[0_0_15px_-5px_#00F0FF]">
{error && (
<div className="p-3 bg-red-500/10 border border-red-500/20 rounded-xl text-red-500 text-sm font-medium text-center">
{error}
</div>
)}
<Button type="submit" className="w-full rounded-xl h-12 font-bold text-base bg-foreground text-background hover:bg-foreground/90 transition-all shadow-[0_0_15px_-5px_#00F0FF]">
Sign In
</Button>
</Link>
</form>
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t border-border"></span>
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background/80 px-2 text-muted-foreground font-bold tracking-widest backdrop-blur-md">Or continue with</span>
</div>
</div>
<Link href="/dashboard" className="block">
<Button variant="outline" className="w-full rounded-xl h-12 font-bold bg-background border-border hover:bg-secondary/50 transition-all flex items-center justify-center gap-2">
<svg viewBox="0 0 24 24" className="h-5 w-5"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/><path d="M1 1h22v22H1z" fill="none"/></svg>
Google
</Button>
</Link>
</CardContent>
</Card>