Add member accounts, follow-based leaderboard, and dedicated Postgres
Members register via email+password (scrypt) or Google OAuth — same signed-cookie + scrypt pattern as LokiLab (lib/auth.ts, member-password.ts, member-auth.ts, google-oauth.ts), own AUTH_SECRET and own OAuth client, own dedicated Postgres database (lokiloto-db on Coolify), fully isolated from LokiLab's own DB and auth. Leaderboard tracks who follows Loki's picks most accurately — members star a pick from the results panel (FollowButton), resolution reuses LokiLab's own lastDraw.won, no money or pooled play involved anywhere. Leaderboard page renders a horizontal bar chart (recharts) plus a ranked list. Profile page: public nickname (required to appear on the leaderboard), list of followed picks. Header now carries nav + a user menu (avatar dropdown when signed in, "Connexion" button otherwise). Dockerfile runs prisma migrate deploy at container start via docker-entrypoint.sh, same pattern as LokiLab. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
fc69d4a668
commit
c3a0a7b765
@@ -0,0 +1,33 @@
|
||||
import Link from "next/link"
|
||||
import { Suspense } from "react"
|
||||
import { LokiMark } from "@/components/loki-mark"
|
||||
import { UserMenu } from "@/components/user-menu"
|
||||
import { Skeleton } from "@/components/ui/skeleton"
|
||||
|
||||
export function AppHeader() {
|
||||
return (
|
||||
<div className="h-14 border-b border-border/60 bg-card">
|
||||
<div className="mx-auto flex h-full max-w-6xl items-center gap-5 px-4 sm:px-6">
|
||||
<Link href="/" className="flex shrink-0 items-center gap-2">
|
||||
<LokiMark className="h-8 w-8 text-accent" />
|
||||
<span className="text-base font-bold tracking-tight">LokiLoto</span>
|
||||
</Link>
|
||||
|
||||
<nav className="hidden items-center gap-4 text-sm text-muted-foreground sm:flex">
|
||||
<Link href="/" className="hover:text-foreground">
|
||||
Résultats
|
||||
</Link>
|
||||
<Link href="/classement" className="hover:text-foreground">
|
||||
Classement
|
||||
</Link>
|
||||
</nav>
|
||||
|
||||
<div className="ml-auto">
|
||||
<Suspense fallback={<Skeleton className="h-8 w-8 rounded-full" />}>
|
||||
<UserMenu />
|
||||
</Suspense>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user