chore: sync in-progress work across marketing, admin, API and tests

Snapshot of uncommitted work that had accumulated in the tree alongside
the Turnstile changes:

- marketing pages, SEO helpers (lib/seo.ts, lib/marketing/) and
  structured data
- admin billing actions and a per-user portfolio view, plus an admin
  error boundary
- rate limiting (lib/rate-limit.ts) applied across the /api/v1 surface
- CSP and proxy adjustments, accounting/webhook lib updates
- Playwright config and an e2e/unit test suite
- next bumped to ^16.3.4 with the lockfile regenerated
- generated AGENTS.md / CLAUDE.md

Authored by other sessions working in this tree; committed here so the
Turnstile work could be pushed without leaving the tree dirty.
Typecheck passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-09-05 16:27:16 -04:00
co-authored by Claude Opus 5
parent 8f90347659
commit 1d02598786
71 changed files with 3641 additions and 819 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Acceptable Use Policy",
description: `The rules that govern acceptable use of the ${LEGAL.service} platform and the activities that are prohibited.`,
alternates: { canonical: "/acceptable-use" },
}
path: "/acceptable-use",
})
export default function Page() {
return (
+6 -4
View File
@@ -1,12 +1,14 @@
import Link from "next/link"
import { Code2, Lock, Zap, BookOpen, Webhook } from "lucide-react"
import { WEBHOOK_EVENTS } from "@/lib/webhooks/events"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "API Docs",
description: "Property Management Network REST API documentation for developers.",
alternates: { canonical: "/api-docs" },
}
description:
"REST API reference for Property Management Network — endpoints for properties, tenants, rent payments, maintenance and webhooks, with API key auth.",
path: "/api-docs",
})
// The real, deployed origin. Falls back to a placeholder only when the env var
// isn't set (e.g. local docs previews).
+5 -5
View File
@@ -1,12 +1,12 @@
import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Cookie Policy",
description:
"How we use cookies and similar technologies, what we deliberately avoid, and how to manage them in your browser.",
alternates: { canonical: "/cookie-policy" },
}
description: "How we use cookies and similar technologies, what we deliberately avoid, and how to manage them in your browser.",
path: "/cookie-policy",
})
const COOKIE_ROWS: { name: string; type: string; purpose: string; expires: string }[] = [
{
+5 -5
View File
@@ -1,12 +1,12 @@
import { LegalPage, Section, Callout, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Disclaimer",
description:
"Important limitations on the information and outputs provided by the Service, including AI-generated content and financial reports.",
alternates: { canonical: "/disclaimer" },
}
description: "Important limitations on the information and outputs provided by the Service, including AI-generated content and financial reports.",
path: "/disclaimer",
})
export default function Page() {
return (
+4 -3
View File
@@ -1,12 +1,13 @@
import Link from "next/link"
import { LegalPage, Section, Callout, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Data Processing Addendum",
description: `The Data Processing Addendum governing how ${LEGAL.entity} processes personal data on behalf of Customers using ${LEGAL.service}.`,
alternates: { canonical: "/dpa" },
}
path: "/dpa",
})
export default function DpaPage() {
return (
+4 -3
View File
@@ -1,12 +1,13 @@
import Link from "next/link"
import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "GDPR & Data Rights",
description: `How ${LEGAL.entity} complies with the GDPR and UK GDPR, and the data rights available to you as a data subject.`,
alternates: { canonical: "/gdpr" },
}
path: "/gdpr",
})
export default function GdprPage() {
return (
+2 -2
View File
@@ -1,6 +1,6 @@
import { Navbar } from "@/components/marketing/navbar"
import { Footer } from "@/components/marketing/footer"
import { StructuredData } from "@/components/marketing/structured-data"
import { SiteStructuredData } from "@/components/marketing/structured-data"
import { getSession, isAdminUser } from "@/lib/session"
import { getMaintenanceMode } from "@/lib/settings"
import { MaintenanceScreen } from "@/components/shared/maintenance-screen"
@@ -17,7 +17,7 @@ export default async function MarketingLayout({ children }: { children: React.Re
return (
<div className="min-h-screen bg-[#09090b] text-white">
<StructuredData />
<SiteStructuredData />
<Navbar />
{children}
<Footer />
+11 -11
View File
@@ -7,23 +7,23 @@ import { Testimonials } from "@/components/marketing/testimonials"
import { PricingSection } from "@/components/marketing/pricing-section"
import { FAQ } from "@/components/marketing/faq"
import { CtaBanner } from "@/components/marketing/cta-banner"
import { HomeStructuredData } from "@/components/marketing/structured-data"
import { annualEnabled } from "@/lib/stripe/plans"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
title: { absolute: "Property Management Software for Independent Landlords" },
description: "Track rent, manage maintenance, monitor leases, and keep expenses organised — all in one dashboard built for independent landlords. Free to start.",
alternates: { canonical: "/" },
openGraph: {
title: "Property management without the chaos",
description: "Track rent, manage maintenance, monitor leases, and keep expenses organised — all in one dashboard built for independent landlords. Free to start.",
url: "/",
type: "website",
},
}
export const metadata = pageMetadata({
title: "Property Management Software for Independent Landlords",
absoluteTitle: true,
description:
"Track rent, manage maintenance, monitor leases, and keep expenses organised — all in one dashboard built for independent landlords. Free to start.",
path: "/",
socialTitle: "Property management without the chaos",
})
export default function LandingPage() {
return (
<>
<HomeStructuredData />
<Hero />
<Marquee />
<Problem />
+5 -5
View File
@@ -1,12 +1,12 @@
import { LegalPage, Section, Callout, LegalContact } from "@/components/marketing/legal"
import { LEGAL, SUBPROCESSORS } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Privacy Policy",
description:
"How we collect, use, share, and protect personal data, and the privacy rights available to you under the GDPR and California law.",
alternates: { canonical: "/privacy" },
}
description: "How we collect, use, share, and protect personal data, and the privacy rights available to you under the GDPR and California law.",
path: "/privacy",
})
export default function Page() {
return (
+5 -4
View File
@@ -1,11 +1,12 @@
import { LegalPage, Section, Callout, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
title: "Refund & Cancellation Policy",
export const metadata = pageMetadata({
title: "Refund & Cancellation",
description: `How subscriptions, cancellations, and refunds work for the ${LEGAL.service} platform.`,
alternates: { canonical: "/refund-policy" },
}
path: "/refund-policy",
})
export default function Page() {
return (
+4 -3
View File
@@ -1,12 +1,13 @@
import Link from "next/link"
import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL, SUBPROCESSORS } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Sub-processors",
description: `The third-party sub-processors that ${LEGAL.entity} engages to process personal data on behalf of Customers of ${LEGAL.service}.`,
alternates: { canonical: "/subprocessors" },
}
path: "/subprocessors",
})
export default function SubprocessorsPage() {
return (
+6 -4
View File
@@ -1,11 +1,13 @@
import Link from "next/link"
import { Building2, CheckCircle2, Smartphone, Bell, FileText, ArrowRight } from "lucide-react"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Tenant Portal",
description: "Give your tenants a dedicated portal to pay rent, submit maintenance requests, and view lease details.",
alternates: { canonical: "/tenant-portal-info" },
}
description:
"Give your tenants a dedicated portal to pay rent, submit maintenance requests, and view lease details.",
path: "/tenant-portal-info",
})
const FEATURES = [
{ icon: CheckCircle2, color: "text-emerald-400", bg: "bg-emerald-500/10 border-emerald-500/20", title: "Online Rent Payment", desc: "Tenants pay rent securely via Stripe — card or bank transfer. Auto-receipts sent by email." },
+4 -3
View File
@@ -1,11 +1,12 @@
import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"
import { pageMetadata } from "@/lib/seo"
export const metadata = {
export const metadata = pageMetadata({
title: "Terms of Service",
description: `The terms and conditions that govern your access to and use of the ${LEGAL.service} platform.`,
alternates: { canonical: "/terms" },
}
path: "/terms",
})
export default function Page() {
return (