Initial import: property management SaaS + security hardening + admin dashboard

Property Management Network — Next.js 16 (App Router), Better Auth,
Drizzle ORM over PostgreSQL, Stripe, OpenAI, Resend.

Includes:
- Security hardening: access-control/IDOR fixes, TLS-by-default DB layer,
  constant-time cron auth, strict security headers, atomic AI quota gating,
  HTML/email output encoding, demo-backdoor disabled in production.
- Superadmin dashboard at /admin (overview/MRR, server-paginated users with
  ban/impersonate/plan/delete, billing, platform activity + admin audit log,
  AI usage, system health) via the Better Auth admin plugin.
- Seed/migration utility scripts under scripts/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-06-23 20:36:07 -04:00
co-authored by Claude Opus 4.8
commit 857b9a7811
291 changed files with 38996 additions and 0 deletions
+104
View File
@@ -0,0 +1,104 @@
"use client"
import { useState, useEffect } from "react"
import Link from "next/link"
import { motion, AnimatePresence } from "framer-motion"
import { Building2, Menu, X, ArrowRight } from "lucide-react"
const NAV_LINKS = [
{ label: "Features", href: "#features" },
{ label: "How it works", href: "#how-it-works" },
{ label: "Pricing", href: "#pricing" },
{ label: "FAQ", href: "#faq" },
]
export function Navbar() {
const [scrolled, setScrolled] = useState(false)
const [open, setOpen] = useState(false)
useEffect(() => {
const handler = () => setScrolled(window.scrollY > 24)
window.addEventListener("scroll", handler, { passive: true })
return () => window.removeEventListener("scroll", handler)
}, [])
return (
<>
<motion.nav
initial={{ y: -20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.5, ease: "easeOut" }}
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${
scrolled
? "bg-[#09090b]/80 backdrop-blur-2xl border-b border-white/[0.06] shadow-2xl shadow-black/30"
: "bg-transparent"
}`}
>
<div className="mx-auto flex h-16 max-w-7xl items-center justify-between px-6">
<Link href="/" className="flex items-center gap-2 group">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500 to-violet-600 shadow-lg shadow-indigo-500/30 group-hover:shadow-indigo-500/50 transition-shadow">
<Building2 className="h-4 w-4 text-white" />
</div>
<span className="font-bold text-white tracking-tight">Property Management Network</span>
</Link>
<div className="hidden md:flex items-center gap-1">
{NAV_LINKS.map((l) => (
<Link
key={l.label}
href={l.href}
className="px-4 py-2 text-sm text-white/60 hover:text-white hover:bg-white/[0.06] rounded-lg transition-all"
>
{l.label}
</Link>
))}
</div>
<div className="hidden md:flex items-center gap-3">
<Link href="/login" className="text-sm text-white/60 hover:text-white transition px-3 py-2">
Sign in
</Link>
<Link
href="/signup"
className="flex items-center gap-1.5 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-500 transition-all hover:shadow-lg hover:shadow-indigo-500/25"
>
Get started free <ArrowRight className="h-3.5 w-3.5" />
</Link>
</div>
<button onClick={() => setOpen(!open)} className="md:hidden p-2 rounded-lg text-white/70 hover:text-white hover:bg-white/[0.06] transition">
{open ? <X className="h-5 w-5" /> : <Menu className="h-5 w-5" />}
</button>
</div>
</motion.nav>
<AnimatePresence>
{open && (
<motion.div
initial={{ opacity: 0, y: -8 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -8 }}
transition={{ duration: 0.2 }}
className="fixed inset-x-0 top-16 z-40 bg-[#09090b]/95 backdrop-blur-2xl border-b border-white/[0.06] md:hidden"
>
<div className="flex flex-col px-6 py-5 gap-1">
{NAV_LINKS.map((l) => (
<Link key={l.label} href={l.href} onClick={() => setOpen(false)}
className="text-sm text-white/70 hover:text-white hover:bg-white/[0.04] rounded-lg px-3 py-2.5 transition">
{l.label}
</Link>
))}
<div className="flex flex-col gap-2 pt-3 mt-2 border-t border-white/[0.06]">
<Link href="/login" onClick={() => setOpen(false)} className="text-sm text-white/60 px-3 py-2">Sign in</Link>
<Link href="/signup" onClick={() => setOpen(false)}
className="rounded-lg bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white text-center hover:bg-indigo-500 transition">
Get started free
</Link>
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</>
)
}