Skip to content

Open-source status page, incident response and uptime monitoring

chore: init status page app (#1333)

Maximilian Kaskeef54f12dd375
diff --git a/apps/dashboard/src/app/(dashboard)/status-pages/[id]/sidebar.tsx b/apps/dashboard/src/app/(dashboard)/status-pages/[id]/sidebar.tsx
index db4c64058..27f72a203 100644
--- a/apps/dashboard/src/app/(dashboard)/status-pages/[id]/sidebar.tsx
+++ b/apps/dashboard/src/app/(dashboard)/status-pages/[id]/sidebar.tsx
@@ -67,7 +67,7 @@ export function Sidebar() {
<Tooltip>
<TooltipTrigger className="align-middle">
<img
- className="h-5 border rounded-sm"
+ className="h-5 rounded-sm border"
src={BADGE_URL}
alt="badge"
/>
diff --git a/apps/dashboard/src/app/(public)/login/layout.tsx b/apps/dashboard/src/app/(public)/login/layout.tsx
index 3a0f825b0..9d91d11d4 100644
--- a/apps/dashboard/src/app/(public)/login/layout.tsx
+++ b/apps/dashboard/src/app/(public)/login/layout.tsx
@@ -13,7 +13,7 @@ export default async function AuthLayout({
return (
<div className="grid min-h-screen grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-5">
- <aside className="col-span-1 flex w-full flex-col gap-4 border border-border p-4 backdrop-blur-[2px] md:p-8 xl:col-span-2 bg-sidebar">
+ <aside className="col-span-1 flex w-full flex-col gap-4 border border-border bg-sidebar p-4 backdrop-blur-[2px] md:p-8 xl:col-span-2">
<a href="https://openstatus.dev" className="relative h-8 w-8">
<Image
src="https://openstatus.dev/icon.png"
diff --git a/apps/status-page/.gitignore b/apps/status-page/.gitignore
new file mode 100644
index 000000000..e985853ed
--- /dev/null
+++ b/apps/status-page/.gitignore
@@ -0,0 +1 @@
+.vercel
diff --git a/apps/status-page/components.json b/apps/status-page/components.json
new file mode 100644
index 000000000..3289f237a
--- /dev/null
+++ b/apps/status-page/components.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "new-york",
+ "rsc": true,
+ "tsx": true,
+ "tailwind": {
+ "config": "",
+ "css": "src/app/globals.css",
+ "baseColor": "neutral",
+ "cssVariables": true,
+ "prefix": ""
+ },
+ "aliases": {
+ "components": "@/components",
+ "utils": "@/lib/utils",
+ "ui": "@/components/ui",
+ "lib": "@/lib",
+ "hooks": "@/hooks"
+ },
+ "iconLibrary": "lucide"
+}
diff --git a/apps/status-page/next-env.d.ts b/apps/status-page/next-env.d.ts
new file mode 100644
index 000000000..1b3be0840
--- /dev/null
+++ b/apps/status-page/next-env.d.ts
@@ -0,0 +1,5 @@
+/// <reference types="next" />
+/// <reference types="next/image-types/global" />
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/status-page/next.config.ts b/apps/status-page/next.config.ts
new file mode 100644
index 000000000..113a50310
--- /dev/null
+++ b/apps/status-page/next.config.ts
@@ -0,0 +1,17 @@
+import type { NextConfig } from "next";
+
+const nextConfig: NextConfig = {
+ images: {
+ remotePatterns: [
+ new URL("https://openstatus.dev/**"),
+ new URL("https://**.public.blob.vercel-storage.com/**"),
+ ],
+ },
+ logging: {
+ fetches: {
+ fullUrl: true,
+ },
+ },
+};
+
+export default nextConfig;
diff --git a/apps/status-page/package.json b/apps/status-page/package.json
new file mode 100644
index 000000000..830b83547
--- /dev/null
+++ b/apps/status-page/package.json
@@ -0,0 +1,102 @@
+{
+ "name": "@openstatus/status-page",
+ "version": "1.0.0",
+ "private": true,
+ "scripts": {
+ "dev": "next dev --turbopack",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint",
+ "tsc": "tsc --noEmit"
+ },
+ "dependencies": {
+ "@date-fns/tz": "1.2.0",
+ "@date-fns/utc": "2.1.0",
+ "@dnd-kit/core": "6.3.1",
+ "@dnd-kit/modifiers": "9.0.0",
+ "@dnd-kit/sortable": "10.0.0",
+ "@dnd-kit/utilities": "3.2.2",
+ "@hookform/devtools": "4.4.0",
+ "@hookform/resolvers": "3.9.1",
+ "@libsql/client": "0.15.9",
+ "@openpanel/nextjs": "1.0.8",
+ "@openstatus/analytics": "workspace:*",
+ "@openstatus/api": "workspace:*",
+ "@openstatus/assertions": "workspace:*",
+ "@openstatus/db": "workspace:*",
+ "@openstatus/emails": "workspace:*",
+ "@openstatus/error": "workspace:*",
+ "@openstatus/header-analysis": "workspace:*",
+ "@openstatus/notification-discord": "workspace:*",
+ "@openstatus/notification-emails": "workspace:*",
+ "@openstatus/notification-ntfy": "workspace:*",
+ "@openstatus/notification-opsgenie": "workspace:*",
+ "@openstatus/notification-pagerduty": "workspace:*",
+ "@openstatus/notification-slack": "workspace:*",
+ "@openstatus/notification-webhook": "workspace:*",
+ "@openstatus/react": "workspace:*",
+ "@openstatus/tinybird": "workspace:*",
+ "@openstatus/tracker": "workspace:*",
+ "@openstatus/upstash": "workspace:*",
+ "@openstatus/utils": "workspace:*",
+ "@radix-ui/react-alert-dialog": "1.1.14",
+ "@radix-ui/react-avatar": "1.1.10",
+ "@radix-ui/react-checkbox": "1.3.2",
+ "@radix-ui/react-collapsible": "1.1.11",
+ "@radix-ui/react-dialog": "1.1.14",
+ "@radix-ui/react-dropdown-menu": "2.1.15",
+ "@radix-ui/react-hover-card": "1.1.14",
+ "@radix-ui/react-label": "2.1.7",
+ "@radix-ui/react-popover": "1.1.14",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-progress": "1.1.7",
+ "@radix-ui/react-radio-group": "1.3.7",
+ "@radix-ui/react-select": "2.2.5",
+ "@radix-ui/react-separator": "1.1.7",
+ "@radix-ui/react-slider": "1.3.5",
+ "@radix-ui/react-slot": "1.2.3",
+ "@radix-ui/react-switch": "1.2.5",
+ "@radix-ui/react-tabs": "1.1.12",
+ "@radix-ui/react-tooltip": "1.2.7",
+ "@sentry/nextjs": "8.46.0",
+ "@tanstack/react-query": "5.81.5",
+ "@tanstack/react-table": "8.21.3",
+ "@trpc/client": "11.4.4",
+ "@trpc/next": "11.4.4",
+ "@trpc/react-query": "11.4.4",
+ "@trpc/server": "11.4.4",
+ "@trpc/tanstack-react-query": "11.4.4",
+ "class-variance-authority": "0.7.1",
+ "clsx": "2.1.1",
+ "cmdk": "1.1.1",
+ "date-fns": "4.1.0",
+ "lucide-react": "0.525.0",
+ "next": "15.4.7",
+ "next-themes": "0.4.6",
+ "nuqs": "2.4.3",
+ "react": "19.1.1",
+ "react-day-picker": "8.10.1",
+ "react-dom": "19.1.1",
+ "react-hook-form": "7.54.1",
+ "recharts": "2.15.0",
+ "rehype-react": "8.0.0",
+ "remark-gfm": "4.0.1",
+ "remark-parse": "11.0.0",
+ "remark-rehype": "11.1.2",
+ "sonner": "2.0.5",
+ "superjson": "2.2.2",
+ "tailwind-merge": "3.3.1",
+ "unified": "11.0.5",
+ "zod": "3.24.1"
+ },
+ "devDependencies": {
+ "@tailwindcss/postcss": "4.1.11",
+ "@types/node": "24.0.8",
+ "@types/react": "19.1.10",
+ "@types/react-dom": "19.1.7",
+ "shadcn": "2.7.0",
+ "tailwindcss": "4.1.11",
+ "tw-animate-css": "1.3.4",
+ "typescript": "5.7.2"
+ }
+}
diff --git a/apps/status-page/postcss.config.mjs b/apps/status-page/postcss.config.mjs
new file mode 100644
index 000000000..c7bcb4b1e
--- /dev/null
+++ b/apps/status-page/postcss.config.mjs
@@ -0,0 +1,5 @@
+const config = {
+ plugins: ["@tailwindcss/postcss"],
+};
+
+export default config;
diff --git a/apps/status-page/public/fonts/CalSans-SemiBold.ttf b/apps/status-page/public/fonts/CalSans-SemiBold.ttf
new file mode 100644
index 000000000..4a2950a04
Binary files /dev/null and b/apps/status-page/public/fonts/CalSans-SemiBold.ttf differ
diff --git a/apps/status-page/sentry.client.config.ts b/apps/status-page/sentry.client.config.ts
new file mode 100644
index 000000000..c30964939
--- /dev/null
+++ b/apps/status-page/sentry.client.config.ts
@@ -0,0 +1,27 @@
+// This file configures the initialization of Sentry on the client.
+// The config you add here will be used whenever a users loads a page in their browser.
+// https://docs.sentry.io/platforms/javascript/guides/nextjs/
+
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
+
+ // Adjust this value in production, or use tracesSampler for greater control
+ tracesSampleRate: 0.5,
+
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
+ debug: false,
+
+ replaysOnErrorSampleRate: 1.0,
+
+ // This sets the sample rate to be 10%. You may want this to be 100% while
+ // in development and sample at a lower rate in production
+ replaysSessionSampleRate: 0.1,
+
+ // You can remove this option if you're not planning to use the Sentry Session Replay feature:
+ integrations: [
+ Sentry.replayIntegration({ maskAllText: true, blockAllMedia: true }),
+ Sentry.captureConsoleIntegration({ levels: ["error"] }),
+ ],
+});
diff --git a/apps/status-page/sentry.edge.config.ts b/apps/status-page/sentry.edge.config.ts
new file mode 100644
index 000000000..0d4fd1acb
--- /dev/null
+++ b/apps/status-page/sentry.edge.config.ts
@@ -0,0 +1,16 @@
+// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).
+// The config you add here will be used whenever one of the edge features is loaded.
+// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
+// https://docs.sentry.io/platforms/javascript/guides/nextjs/
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
+
+ // Adjust this value in production, or use tracesSampler for greater control
+ tracesSampleRate: 0,
+
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
+ debug: false,
+ integrations: [Sentry.captureConsoleIntegration({ levels: ["error"] })],
+});
diff --git a/apps/status-page/sentry.server.config.ts b/apps/status-page/sentry.server.config.ts
new file mode 100644
index 000000000..b0e1adde7
--- /dev/null
+++ b/apps/status-page/sentry.server.config.ts
@@ -0,0 +1,16 @@
+// This file configures the initialization of Sentry on the server.
+// The config you add here will be used whenever the server handles a request.
+// https://docs.sentry.io/platforms/javascript/guides/nextjs/
+
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
+
+ // Adjust this value in production, or use tracesSampler for greater control
+ tracesSampleRate: 0.2,
+
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
+ debug: false,
+ integrations: [Sentry.captureConsoleIntegration({ levels: ["error"] })],
+});
diff --git a/apps/status-page/src/app/(public)/page.tsx b/apps/status-page/src/app/(public)/page.tsx
new file mode 100644
index 000000000..b2060a6be
--- /dev/null
+++ b/apps/status-page/src/app/(public)/page.tsx
@@ -0,0 +1,3 @@
+export default function Page() {
+ return <div>Status Page</div>;
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/events/(list)/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/events/(list)/page.tsx
new file mode 100644
index 000000000..a20d4c463
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/events/(list)/page.tsx
@@ -0,0 +1,7 @@
+"use client";
+
+import { StatusEventsTabs } from "@/components/status-page/status-events";
+
+export default function Page() {
+ return <StatusEventsTabs />;
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/events/(view)/maintenance/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/events/(view)/maintenance/page.tsx
new file mode 100644
index 000000000..bfa482455
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/events/(view)/maintenance/page.tsx
@@ -0,0 +1,98 @@
+"use client";
+
+import { formatDate } from "@/lib/formatter";
+
+import {
+ StatusEvent,
+ StatusEventAffected,
+ StatusEventAside,
+ StatusEventContent,
+ StatusEventTimelineMaintenance,
+ StatusEventTitle,
+} from "@/components/status-page/status-events";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import { maintenances } from "@/data/maintenances";
+import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard";
+import { cn } from "@/lib/utils";
+import { ArrowLeft, Check, Copy } from "lucide-react";
+import Link from "next/link";
+
+const maintenance = maintenances[0];
+
+export default function EventPage() {
+ const isFuture = maintenance.startDate > new Date();
+ return (
+ <div className="flex flex-col gap-4">
+ <div className="flex w-full flex-row items-center justify-between gap-2 py-0.5">
+ <BackButton />
+ <CopyButton />
+ </div>
+ <StatusEvent>
+ <StatusEventAside>
+ <span className="font-medium text-foreground/80">
+ {formatDate(maintenance.startDate, { month: "short" })}
+ </span>
+ {isFuture ? (
+ <span className="text-info text-sm">Upcoming</span>
+ ) : null}
+ </StatusEventAside>
+ <StatusEventContent hoverable={false}>
+ <StatusEventTitle>{maintenance.title}</StatusEventTitle>
+ <StatusEventAffected className="flex flex-wrap gap-1">
+ {maintenance.affected.map((affected) => (
+ <Badge key={affected} variant="outline" className="text-[10px]">
+ {affected}
+ </Badge>
+ ))}
+ </StatusEventAffected>
+ <StatusEventTimelineMaintenance maintenance={maintenance} />
+ </StatusEventContent>
+ </StatusEvent>
+ </div>
+ );
+}
+
+function BackButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ return (
+ <Button
+ variant="ghost"
+ size="sm"
+ className={cn("text-muted-foreground", className)}
+ asChild
+ {...props}
+ >
+ <Link href="/status-page/events">
+ <ArrowLeft />
+ Back
+ </Link>
+ </Button>
+ );
+}
+
+function CopyButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ const { copy, isCopied } = useCopyToClipboard();
+
+ return (
+ <Button
+ variant="outline"
+ size="icon"
+ onClick={() =>
+ copy(window.location.href, {
+ successMessage: "Link copied to clipboard",
+ })
+ }
+ className={cn("size-8", className)}
+ {...props}
+ >
+ {isCopied ? <Check /> : <Copy />}
+ <span className="sr-only">Copy Link</span>
+ </Button>
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/events/(view)/report/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/events/(view)/report/page.tsx
new file mode 100644
index 000000000..081785b59
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/events/(view)/report/page.tsx
@@ -0,0 +1,95 @@
+"use client";
+
+import { formatDate } from "@/lib/formatter";
+
+import {
+ StatusEvent,
+ StatusEventAffected,
+ StatusEventAside,
+ StatusEventContent,
+ StatusEventTimelineReport,
+ StatusEventTitle,
+} from "@/components/status-page/status-events";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import { statusReports } from "@/data/status-reports";
+import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard";
+import { cn } from "@/lib/utils";
+import { ArrowLeft, Check, Copy } from "lucide-react";
+import Link from "next/link";
+
+const report = statusReports[1];
+
+export default function EventPage() {
+ return (
+ <div className="flex flex-col gap-4">
+ <div className="flex w-full flex-row items-center justify-between gap-2 py-0.5">
+ <BackButton />
+ <CopyButton />
+ </div>
+ <StatusEvent>
+ <StatusEventAside>
+ <span className="font-medium text-foreground/80">
+ {formatDate(report.startedAt, { month: "short" })}
+ </span>
+ </StatusEventAside>
+ <StatusEventContent hoverable={false}>
+ <StatusEventTitle>{report.name}</StatusEventTitle>
+ <StatusEventAffected className="flex flex-wrap gap-1">
+ {report.affected.map((affected) => (
+ // TODO: use StatusEventAffectedBadge component
+ <Badge key={affected} variant="outline" className="text-[10px]">
+ {affected}
+ </Badge>
+ ))}
+ </StatusEventAffected>
+ <StatusEventTimelineReport updates={report.updates} />
+ </StatusEventContent>
+ </StatusEvent>
+ </div>
+ );
+}
+
+function BackButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ return (
+ <Button
+ variant="ghost"
+ size="sm"
+ className={cn("text-muted-foreground", className)}
+ asChild
+ {...props}
+ >
+ <Link href="/status-page/events">
+ <ArrowLeft />
+ Back
+ </Link>
+ </Button>
+ );
+}
+
+function CopyButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ const { copy, isCopied } = useCopyToClipboard();
+
+ return (
+ <Button
+ variant="outline"
+ size="icon"
+ onClick={() =>
+ copy(window.location.href, {
+ successMessage: "Link copied to clipboard",
+ })
+ }
+ className={cn("size-8", className)}
+ {...props}
+ >
+ {isCopied ? <Check /> : <Copy />}
+ <span className="sr-only">Copy Link</span>
+ </Button>
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/events/layout.tsx b/apps/status-page/src/app/(status-page)/[domain]/events/layout.tsx
new file mode 100644
index 000000000..efe38cb1c
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/events/layout.tsx
@@ -0,0 +1,27 @@
+"use client";
+
+import { useStatusPage } from "@/components/status-page/floating-button";
+import {
+ Status,
+ StatusContent,
+ StatusDescription,
+ StatusHeader,
+ StatusTitle,
+} from "@/components/status-page/status";
+
+export default function EventLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const { variant } = useStatusPage();
+ return (
+ <Status variant={variant}>
+ <StatusHeader>
+ <StatusTitle>Craft</StatusTitle>
+ <StatusDescription>Stay informed about the stability</StatusDescription>
+ </StatusHeader>
+ <StatusContent>{children}</StatusContent>
+ </Status>
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/layout.tsx b/apps/status-page/src/app/(status-page)/[domain]/layout.tsx
new file mode 100644
index 000000000..292c339de
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/layout.tsx
@@ -0,0 +1,149 @@
+"use client";
+
+/**
+ * TODO:
+ * - add different header
+ * - add different chart/tracker
+ * - add subscription popover (choose which one you'd like to allow)
+ * - use the '@/components/status-page` for the components
+ */
+
+import { Link } from "@/components/common/link";
+import {
+ FloatingButton,
+ StatusPageProvider,
+} from "@/components/status-page/floating-button";
+import { StatusUpdates } from "@/components/status-page/status-updates";
+import { Button } from "@/components/ui/button";
+import {
+ Sheet,
+ SheetContent,
+ SheetHeader,
+ SheetTitle,
+ SheetTrigger,
+} from "@/components/ui/sheet";
+import { cn } from "@/lib/utils";
+import { Menu } from "lucide-react";
+import NextLink from "next/link";
+import { usePathname } from "next/navigation";
+import { useState } from "react";
+const nav = [
+ { label: "Status", href: "/status-page" },
+ { label: "Events", href: "/status-page/events" },
+ { label: "Monitors", href: "/status-page/monitors" },
+];
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+ <StatusPageProvider>
+ <div className="flex min-h-screen flex-col gap-4">
+ <header className="w-full border-b">
+ <nav className="mx-auto flex max-w-2xl items-center justify-between gap-3 px-3 py-2">
+ {/* NOTE: same width as the `StatusUpdates` button */}
+ <div className="w-[105px] shrink-0">
+ <Link href="/">
+ <img
+ src="https://www.openstatus.dev/icon.png"
+ alt="Craft"
+ className="size-8 rounded-full border"
+ />
+ </Link>
+ </div>
+ <NavDesktop className="hidden md:flex" />
+ <StatusUpdates className="hidden md:block" />
+ <div className="flex gap-3 md:hidden">
+ <NavMobile />
+ <StatusUpdates />
+ </div>
+ </nav>
+ </header>
+ <main className="mx-auto w-full max-w-2xl flex-1 px-3 py-2">
+ {children}
+ </main>
+ <footer className="w-full border-t">
+ <div className="mx-auto max-w-2xl px-3 py-2">
+ <p className="text-center text-muted-foreground">
+ Powered by <Link href="#">OpenStatus</Link>
+ </p>
+ </div>
+ </footer>
+ </div>
+ <FloatingButton />
+ </StatusPageProvider>
+ );
+}
+
+function NavDesktop({ className, ...props }: React.ComponentProps<"ul">) {
+ const pathname = usePathname();
+ return (
+ <ul className={cn("flex flex-row gap-2", className)} {...props}>
+ {nav.map((item) => {
+ const isActive =
+ item.href === "/status-page"
+ ? pathname === item.href
+ : pathname.startsWith(item.href);
+ return (
+ <li key={item.label}>
+ <Button
+ variant={isActive ? "secondary" : "ghost"}
+ size="sm"
+ asChild
+ >
+ <NextLink href={item.href}>{item.label}</NextLink>
+ </Button>
+ </li>
+ );
+ })}
+ </ul>
+ );
+}
+
+function NavMobile({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ const pathname = usePathname();
+ const [open, setOpen] = useState(false);
+ return (
+ <Sheet open={open} onOpenChange={setOpen}>
+ <SheetTrigger asChild>
+ <Button
+ variant="secondary"
+ size="sm"
+ className={cn("size-8", className)}
+ {...props}
+ >
+ <Menu />
+ </Button>
+ </SheetTrigger>
+ <SheetContent side="top">
+ <SheetHeader className="border-b">
+ <SheetTitle>Menu</SheetTitle>
+ </SheetHeader>
+ <div className="px-1 pb-4">
+ <ul className="flex flex-col gap-1">
+ {nav.map((item) => {
+ const isActive =
+ item.href === "/status-page"
+ ? pathname === item.href
+ : pathname.startsWith(item.href);
+ return (
+ <li key={item.label} className="w-full">
+ <Button
+ variant={isActive ? "secondary" : "ghost"}
+ onClick={() => setOpen(false)}
+ className="w-full justify-start"
+ size="sm"
+ asChild
+ >
+ <NextLink href={item.href}>{item.label}</NextLink>
+ </Button>
+ </li>
+ );
+ })}
+ </ul>
+ </div>
+ </SheetContent>
+ </Sheet>
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/monitors/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/monitors/page.tsx
new file mode 100644
index 000000000..a014270b8
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/monitors/page.tsx
@@ -0,0 +1,53 @@
+"use client";
+
+import { ChartAreaPercentiles } from "@/components/chart/chart-area-percentiles";
+import { useStatusPage } from "@/components/status-page/floating-button";
+import {
+ Status,
+ StatusContent,
+ StatusDescription,
+ StatusHeader,
+ StatusTitle,
+} from "@/components/status-page/status";
+import { StatusMonitorTitle } from "@/components/status-page/status-monitor";
+import { StatusMonitorDescription } from "@/components/status-page/status-monitor";
+import { monitors } from "@/data/monitors";
+import Link from "next/link";
+
+export default function Page() {
+ const { variant } = useStatusPage();
+ return (
+ <Status variant={variant}>
+ <StatusHeader>
+ <StatusTitle>Craft</StatusTitle>
+ <StatusDescription>Stay informed about the stability</StatusDescription>
+ </StatusHeader>
+ {/* TODO: create components */}
+ <StatusContent className="flex flex-col gap-6">
+ {monitors
+ .filter((monitor) => monitor.public)
+ .map((monitor) => (
+ <Link
+ key={monitor.id}
+ href="/status-page/monitors/view"
+ className="rounded-lg"
+ >
+ <div className="group -mx-3 -my-2 flex flex-col gap-2 rounded-lg border border-transparent px-3 py-2 hover:border-border/50 hover:bg-muted/50">
+ <div className="flex flex-row items-center gap-2">
+ <StatusMonitorTitle>{monitor.name}</StatusMonitorTitle>
+ <StatusMonitorDescription>
+ {monitor.description}
+ </StatusMonitorDescription>
+ </div>
+ <ChartAreaPercentiles
+ className="h-[80px]"
+ legendClassName="pb-1"
+ singleSeries
+ />
+ </div>
+ </Link>
+ ))}
+ </StatusContent>
+ </Status>
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/monitors/view/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/monitors/view/page.tsx
new file mode 100644
index 000000000..faf5ffa72
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/monitors/view/page.tsx
@@ -0,0 +1,370 @@
+"use client";
+
+import { ChartAreaPercentiles } from "@/components/chart/chart-area-percentiles";
+import { ChartLineRegions } from "@/components/chart/chart-line-regions";
+import {
+ MetricCard,
+ MetricCardGroup,
+ MetricCardHeader,
+ MetricCardTitle,
+ MetricCardValue,
+} from "@/components/content/metric-card";
+import {
+ Status,
+ StatusContent,
+ StatusDescription,
+ StatusHeader,
+ StatusTitle,
+} from "@/components/status-page/status";
+import {
+ StatusChartContent,
+ StatusChartDescription,
+ StatusChartHeader,
+ StatusChartTitle,
+} from "@/components/status-page/status-charts";
+import { StatusMonitor } from "@/components/status-page/status-monitor";
+import { chartData } from "@/components/status-page/utils";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { Separator } from "@/components/ui/separator";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { monitors } from "@/data/monitors";
+import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard";
+import { formatNumber } from "@/lib/formatter";
+import { cn } from "@/lib/utils";
+import { Check, Copy, TrendingUp } from "lucide-react";
+import { useState } from "react";
+
+// TODO: add error range on ChartAreaLatency
+// TODO: add timerange (1d, 7d, 14d) or leave as is and have 7d default?
+// TODO: how to deal with the latency by region percentiles + interval/resolution
+
+const metrics = [
+ {
+ label: "UPTIME",
+ value: "99.99%",
+ variant: "success" as const,
+ },
+ {
+ label: "FAILS",
+ value: "3",
+ variant: "destructive" as const,
+ },
+ {
+ label: "DEGRADED",
+ value: "0",
+ variant: "warning" as const,
+ },
+ {
+ label: "CHECKS",
+ value: "5.102",
+ variant: "ghost" as const,
+ },
+];
+
+export default function Page() {
+ return (
+ <Status>
+ <StatusHeader>
+ <StatusTitle>OpenStatus 418</StatusTitle>
+ <StatusDescription>
+ I&apos;m a teapot - Just random values
+ </StatusDescription>
+ </StatusHeader>
+ <StatusContent className="flex flex-col gap-6">
+ <div className="flex w-full flex-row items-center justify-between gap-2 py-0.5">
+ <DropdownPeriod />
+ <CopyButton />
+ </div>
+ <StatusMonitorTabs defaultValue="global">
+ <StatusMonitorTabsList className="grid grid-cols-3">
+ <StatusMonitorTabsTrigger value="global">
+ <StatusMonitorTabsTriggerLabel>
+ Global Latency
+ </StatusMonitorTabsTriggerLabel>
+ <StatusMonitorTabsTriggerValue>
+ 287 - 568ms{" "}
+ <Badge variant="outline" className="py-px text-[10px]">
+ p75
+ </Badge>
+ </StatusMonitorTabsTriggerValue>
+ </StatusMonitorTabsTrigger>
+ <StatusMonitorTabsTrigger value="region">
+ <StatusMonitorTabsTriggerLabel>
+ Region Latency
+ </StatusMonitorTabsTriggerLabel>
+ <StatusMonitorTabsTriggerValue>
+ 7 regions{" "}
+ <Badge
+ variant="outline"
+ className="py-px font-mono text-[10px]"
+ >
+ arn <TrendingUp className="size-3" />
+ </Badge>
+ </StatusMonitorTabsTriggerValue>
+ </StatusMonitorTabsTrigger>
+ <StatusMonitorTabsTrigger value="uptime">
+ <StatusMonitorTabsTriggerLabel>
+ Uptime
+ </StatusMonitorTabsTriggerLabel>
+ <StatusMonitorTabsTriggerValue>
+ 99.99%{" "}
+ <Badge variant="outline" className="py-px text-[10px]">
+ {formatNumber(5102, {
+ notation: "compact",
+ compactDisplay: "short",
+ }).replace("K", "k")}{" "}
+ checks
+ </Badge>
+ </StatusMonitorTabsTriggerValue>
+ </StatusMonitorTabsTrigger>
+ </StatusMonitorTabsList>
+ <StatusMonitorTabsContent value="global">
+ <StatusChartContent>
+ <StatusChartHeader>
+ <StatusChartTitle>Global Latency</StatusChartTitle>
+ <StatusChartDescription>
+ The aggregated latency from all active regions based on
+ different <PopoverQuantile>quantiles</PopoverQuantile>.
+ </StatusChartDescription>
+ </StatusChartHeader>
+ <ChartAreaPercentiles
+ className="h-[250px]"
+ legendClassName="justify-start pt-1 ps-1"
+ legendVerticalAlign="top"
+ xAxisHide={false}
+ yAxisDomain={[0, "dataMax"]}
+ />
+ </StatusChartContent>
+ </StatusMonitorTabsContent>
+ <StatusMonitorTabsContent value="region">
+ <StatusChartContent>
+ <StatusChartHeader>
+ <StatusChartTitle>Latency by Region</StatusChartTitle>
+ <StatusChartDescription>
+ {/* TODO: we could add an information to p95 that it takes the highest selected global latency percentile */}
+ Region latency per{" "}
+ <code className="font-medium text-foreground">p75</code>{" "}
+ <PopoverQuantile>quantile</PopoverQuantile>, sorted by slowest
+ region. Compare up to{" "}
+ <code className="font-medium text-foreground">3</code>{" "}
+ regions.
+ </StatusChartDescription>
+ </StatusChartHeader>
+ <ChartLineRegions className="h-[250px]" />
+ </StatusChartContent>
+ </StatusMonitorTabsContent>
+ <StatusMonitorTabsContent value="uptime">
+ <StatusChartContent>
+ <StatusChartHeader>
+ <StatusChartTitle>Total Uptime</StatusChartTitle>
+ <StatusChartDescription>
+ Main values of uptime and availability, transparent.
+ </StatusChartDescription>
+ </StatusChartHeader>
+ <MetricCardGroup className="sm:grid-cols-4 lg:grid-cols-4">
+ {metrics.map((metric) => {
+ if (metric === null)
+ return <div key={metric} className="hidden lg:block" />;
+ return (
+ <MetricCard key={metric.label} variant={metric.variant}>
+ <MetricCardHeader>
+ <MetricCardTitle className="truncate">
+ {metric.label}
+ </MetricCardTitle>
+ </MetricCardHeader>
+ <MetricCardValue>{metric.value}</MetricCardValue>
+ </MetricCard>
+ );
+ })}
+ </MetricCardGroup>
+ <StatusMonitor
+ barType="absolute"
+ cardType="requests"
+ data={chartData}
+ monitor={monitors[1]}
+ />
+ </StatusChartContent>
+ </StatusMonitorTabsContent>
+ </StatusMonitorTabs>
+ </StatusContent>
+ </Status>
+ );
+}
+
+// Use Link instead of copy (same for reports and maintenance)
+function CopyButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ const { copy, isCopied } = useCopyToClipboard();
+
+ return (
+ <Button
+ variant="outline"
+ size="icon"
+ onClick={() =>
+ copy(window.location.href, {
+ successMessage: "Link copied to clipboard",
+ })
+ }
+ className={cn("size-8", className)}
+ {...props}
+ >
+ {isCopied ? <Check /> : <Copy />}
+ <span className="sr-only">Copy Link</span>
+ </Button>
+ );
+}
+
+const PERIOD_VALUES = [
+ {
+ value: "1d",
+ label: "Last day",
+ },
+ {
+ value: "7d",
+ label: "Last 7 days",
+ },
+ {
+ value: "14d",
+ label: "Last 14 days",
+ },
+];
+
+function DropdownPeriod() {
+ const [period, setPeriod] = useState("1d");
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm">
+ {PERIOD_VALUES.find(({ value }) => value === period)?.label}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Period
+ </DropdownMenuLabel>
+ {PERIOD_VALUES.map(({ value, label }) => (
+ <DropdownMenuItem key={value} onSelect={() => setPeriod(value)}>
+ {label}
+ {period === value ? <Check className="ml-auto shrink-0" /> : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
+
+function PopoverQuantile({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<typeof PopoverTrigger>) {
+ return (
+ <Popover>
+ <PopoverTrigger
+ className={cn(
+ "shrink-0 rounded-md p-0 underline decoration-muted-foreground/70 decoration-dotted underline-offset-2 outline-none transition-all hover:decoration-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=open]:decoration-foreground dark:aria-invalid:ring-destructive/40",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </PopoverTrigger>
+ <PopoverContent side="top" className="p-0 text-sm">
+ <p className="px-3 py-2 font-medium">
+ A quantile represents a specific percentile in your dataset.
+ </p>
+ <Separator />
+ <p className="px-3 py-2 text-muted-foreground">
+ For example, p50 is the 50th percentile - the point below which 50% of
+ data falls. Higher percentiles include more data and highlight the
+ upper range.
+ </p>
+ </PopoverContent>
+ </Popover>
+ );
+}
+
+function StatusMonitorTabs({
+ className,
+ ...props
+}: React.ComponentProps<typeof Tabs>) {
+ return <Tabs className={cn("gap-6", className)} {...props} />;
+}
+
+function StatusMonitorTabsList({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsList>) {
+ return (
+ <TabsList
+ className={cn("flex h-auto min-h-fit w-full", className)}
+ {...props}
+ />
+ );
+}
+
+function StatusMonitorTabsTrigger({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsTrigger>) {
+ return (
+ <TabsTrigger
+ className={cn(
+ "min-w-0 flex-1 flex-col items-start gap-0.5 text-foreground dark:text-foreground",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function StatusMonitorTabsTriggerLabel({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("w-full truncate text-left", className)} {...props} />
+ );
+}
+
+function StatusMonitorTabsTriggerValue({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "text-wrap text-left text-muted-foreground text-xs",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function StatusMonitorTabsContent({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsContent>) {
+ return (
+ <TabsContent className={cn("flex flex-col gap-2", className)} {...props} />
+ );
+}
diff --git a/apps/status-page/src/app/(status-page)/[domain]/page.tsx b/apps/status-page/src/app/(status-page)/[domain]/page.tsx
new file mode 100644
index 000000000..1390a45f8
--- /dev/null
+++ b/apps/status-page/src/app/(status-page)/[domain]/page.tsx
@@ -0,0 +1,92 @@
+"use client";
+
+import { useStatusPage } from "@/components/status-page/floating-button";
+import {
+ Status,
+ StatusBanner,
+ StatusContent,
+ StatusDescription,
+ StatusEmptyState,
+ StatusEmptyStateDescription,
+ StatusEmptyStateTitle,
+ StatusHeader,
+ StatusTitle,
+} from "@/components/status-page/status";
+import { StatusMonitor } from "@/components/status-page/status-monitor";
+import { StatusTrackerGroup } from "@/components/status-page/status-tracker-group";
+import { chartData } from "@/components/status-page/utils";
+import { monitors } from "@/data/monitors";
+import { Newspaper } from "lucide-react";
+
+export default function Page() {
+ const { variant, cardType, barType, showUptime } = useStatusPage();
+
+ return (
+ <div className="flex flex-col gap-6">
+ <Status variant={variant}>
+ <StatusHeader>
+ <StatusTitle>Craft</StatusTitle>
+ <StatusDescription>
+ Stay informed about the stability
+ </StatusDescription>
+ </StatusHeader>
+ <StatusBanner />
+ <StatusContent>
+ <StatusMonitor
+ variant={variant}
+ cardType={cardType}
+ barType={barType}
+ data={chartData}
+ monitor={monitors[1]}
+ showUptime={showUptime}
+ />
+ <StatusTrackerGroup title="US Endpoints" variant={variant}>
+ <StatusMonitor
+ variant={variant}
+ cardType={cardType}
+ barType={barType}
+ data={chartData}
+ monitor={monitors[0]}
+ showUptime={showUptime}
+ />
+ <StatusMonitor
+ variant={variant}
+ cardType={cardType}
+ barType={barType}
+ data={chartData}
+ monitor={monitors[1]}
+ showUptime={showUptime}
+ />
+ </StatusTrackerGroup>
+ <StatusTrackerGroup title="EU Endpoints" variant={variant}>
+ <StatusMonitor
+ variant={variant}
+ cardType={cardType}
+ barType={barType}
+ data={chartData}
+ monitor={monitors[0]}
+ showUptime={showUptime}
+ />
+ <StatusMonitor
+ variant={variant}
+ cardType={cardType}
+ barType={barType}
+ data={chartData}
+ monitor={monitors[1]}
+ showUptime={showUptime}
+ />
+ </StatusTrackerGroup>
+ </StatusContent>
+ <StatusContent>
+ <StatusEmptyState>
+ <Newspaper className="size-4 text-muted-foreground" />
+ <StatusEmptyStateTitle>No recent reports</StatusEmptyStateTitle>
+ <StatusEmptyStateDescription>
+ There have been no reports within the last 7 days.
+ </StatusEmptyStateDescription>
+ </StatusEmptyState>
+ </StatusContent>
+ </Status>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/app/api/trpc/edge/[trpc]/route.ts b/apps/status-page/src/app/api/trpc/edge/[trpc]/route.ts
new file mode 100644
index 000000000..2c1fc5285
--- /dev/null
+++ b/apps/status-page/src/app/api/trpc/edge/[trpc]/route.ts
@@ -0,0 +1,21 @@
+import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
+import type { NextRequest } from "next/server";
+
+import { createTRPCContext } from "@openstatus/api";
+import { edgeRouter } from "@openstatus/api/src/edge";
+
+export const runtime = "edge";
+
+const handler = (req: NextRequest) =>
+ fetchRequestHandler({
+ endpoint: "/api/trpc/edge",
+ router: edgeRouter,
+ req: req,
+ createContext: () => createTRPCContext({ req }),
+ onError: ({ error }) => {
+ console.log("Error in tRPC handler (edge)");
+ console.error(error);
+ },
+ });
+
+export { handler as GET, handler as POST };
diff --git a/apps/status-page/src/app/api/trpc/lambda/[trpc]/route.ts b/apps/status-page/src/app/api/trpc/lambda/[trpc]/route.ts
new file mode 100644
index 000000000..b36568088
--- /dev/null
+++ b/apps/status-page/src/app/api/trpc/lambda/[trpc]/route.ts
@@ -0,0 +1,22 @@
+import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
+import type { NextRequest } from "next/server";
+
+import { createTRPCContext } from "@openstatus/api";
+import { lambdaRouter } from "@openstatus/api/src/lambda";
+
+// Stripe is incompatible with Edge runtimes due to using Node.js events
+// export const runtime = "edge";
+
+const handler = (req: NextRequest) =>
+ fetchRequestHandler({
+ endpoint: "/api/trpc/lambda",
+ router: lambdaRouter,
+ req: req,
+ createContext: () => createTRPCContext({ req }),
+ onError: ({ error }) => {
+ console.log("Error in tRPC handler (lambda)");
+ console.error(error);
+ },
+ });
+
+export { handler as GET, handler as POST };
diff --git a/apps/status-page/src/app/apple.ico b/apps/status-page/src/app/apple.ico
new file mode 100644
index 000000000..511817033
Binary files /dev/null and b/apps/status-page/src/app/apple.ico differ
diff --git a/apps/status-page/src/app/favicon.ico b/apps/status-page/src/app/favicon.ico
new file mode 100644
index 000000000..511817033
Binary files /dev/null and b/apps/status-page/src/app/favicon.ico differ
diff --git a/apps/status-page/src/app/global-error.tsx b/apps/status-page/src/app/global-error.tsx
new file mode 100644
index 000000000..f9babe1cf
--- /dev/null
+++ b/apps/status-page/src/app/global-error.tsx
@@ -0,0 +1,25 @@
+"use client";
+
+import * as Sentry from "@sentry/nextjs";
+import NextError from "next/error";
+import { useEffect } from "react";
+
+export default function GlobalError({
+ error,
+}: {
+ error: Error & { digest?: string };
+}) {
+ useEffect(() => {
+ Sentry.captureException(error);
+ }, [error]);
+
+ return (
+ <html lang="en">
+ <body>
+ {/* This is the default Next.js error component but it doesn't allow omitting the statusCode property yet. */}
+ {/* biome-ignore lint/suspicious/noExplicitAny: <explanation> */}
+ <NextError statusCode={undefined as any} />
+ </body>
+ </html>
+ );
+}
diff --git a/apps/status-page/src/app/globals.css b/apps/status-page/src/app/globals.css
new file mode 100644
index 000000000..8711e0f91
--- /dev/null
+++ b/apps/status-page/src/app/globals.css
@@ -0,0 +1,177 @@
+@import "tailwindcss";
+@import "tw-animate-css";
+
+/* safelist */
+@source inline("has-data-[slot=slider-range]:bg-red-500");
+
+@custom-variant dark (&:is(.dark *));
+
+@theme {
+ --breakpoint-xs: 30rem;
+}
+
+@theme inline {
+ --color-background: var(--background);
+ --color-foreground: var(--foreground);
+ --font-sans: var(--font-geist-sans);
+ --font-mono: var(--font-geist-mono);
+ --color-sidebar-ring: var(--sidebar-ring);
+ --color-sidebar-border: var(--sidebar-border);
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
+ --color-sidebar-accent: var(--sidebar-accent);
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
+ --color-sidebar-primary: var(--sidebar-primary);
+ --color-sidebar-foreground: var(--sidebar-foreground);
+ --color-sidebar: var(--sidebar);
+ --color-chart-5: var(--chart-5);
+ --color-chart-4: var(--chart-4);
+ --color-chart-3: var(--chart-3);
+ --color-chart-2: var(--chart-2);
+ --color-chart-1: var(--chart-1);
+ --color-ring: var(--ring);
+ --color-input: var(--input);
+ --color-border: var(--border);
+ --color-destructive: var(--destructive);
+ --color-accent-foreground: var(--accent-foreground);
+ --color-accent: var(--accent);
+ --color-muted-foreground: var(--muted-foreground);
+ --color-muted: var(--muted);
+ --color-secondary-foreground: var(--secondary-foreground);
+ --color-secondary: var(--secondary);
+ --color-primary-foreground: var(--primary-foreground);
+ --color-primary: var(--primary);
+ --color-popover-foreground: var(--popover-foreground);
+ --color-popover: var(--popover);
+ --color-card-foreground: var(--card-foreground);
+ --color-card: var(--card);
+ --radius-sm: calc(var(--radius) - 4px);
+ --radius-md: calc(var(--radius) - 2px);
+ --radius-lg: var(--radius);
+ --radius-xl: calc(var(--radius) + 4px);
+
+ --color-success: var(--success);
+ --color-warning: var(--warning);
+ --color-info: var(--info);
+}
+
+:root {
+ --radius: 0.625rem;
+ --background: oklch(1 0 0);
+ --foreground: oklch(0.145 0 0);
+ --card: oklch(1 0 0);
+ --card-foreground: oklch(0.145 0 0);
+ --popover: oklch(1 0 0);
+ --popover-foreground: oklch(0.145 0 0);
+ --primary: oklch(0.205 0 0);
+ --primary-foreground: oklch(0.985 0 0);
+ --secondary: oklch(0.97 0 0);
+ --secondary-foreground: oklch(0.205 0 0);
+ --muted: oklch(0.97 0 0);
+ --muted-foreground: oklch(0.556 0 0);
+ --accent: oklch(0.97 0 0);
+ --accent-foreground: oklch(0.205 0 0);
+ --destructive: oklch(0.577 0.245 27.325);
+ --border: oklch(0.922 0 0);
+ --input: oklch(0.922 0 0);
+ --ring: oklch(0.708 0 0);
+ --chart-1: oklch(0.646 0.222 41.116);
+ --chart-2: oklch(0.6 0.118 184.704);
+ --chart-3: oklch(0.398 0.07 227.392);
+ --chart-4: oklch(0.828 0.189 84.429);
+ --chart-5: oklch(0.769 0.188 70.08);
+ --sidebar: oklch(0.985 0 0);
+ --sidebar-foreground: oklch(0.145 0 0);
+ --sidebar-primary: oklch(0.205 0 0);
+ --sidebar-primary-foreground: oklch(0.985 0 0);
+ --sidebar-accent: oklch(0.97 0 0);
+ --sidebar-accent-foreground: oklch(0.205 0 0);
+ --sidebar-border: oklch(0.922 0 0);
+ --sidebar-ring: oklch(0.708 0 0);
+
+ --success: oklch(0.72 0.19 150);
+ --warning: oklch(0.77 0.16 70);
+ --info: oklch(0.62 0.19 260);
+
+ --rainbow-1: oklch(0.64 0.21 25);
+ --rainbow-2: oklch(0.70 0.19 48);
+ --rainbow-3: oklch(0.77 0.16 70);
+ --rainbow-4: oklch(0.80 0.16 86);
+ --rainbow-5: oklch(0.77 0.20 131);
+ --rainbow-6: oklch(0.72 0.19 150);
+ --rainbow-7: oklch(0.70 0.15 162);
+ --rainbow-8: oklch(0.70 0.12 183);
+ --rainbow-9: oklch(0.71 0.13 215);
+ --rainbow-10: oklch(0.68 0.15 237);
+ --rainbow-11: oklch(0.62 0.19 260);
+ --rainbow-12: oklch(0.59 0.20 277);
+ --rainbow-13: oklch(0.61 0.22 293);
+ --rainbow-14: oklch(0.63 0.23 304);
+ --rainbow-15: oklch(0.67 0.26 322);
+ --rainbow-16: oklch(0.66 0.21 354);
+ --rainbow-17: oklch(0.65 0.22 16);
+}
+
+.dark {
+ --background: oklch(0.145 0 0);
+ --foreground: oklch(0.985 0 0);
+ --card: oklch(0.205 0 0);
+ --card-foreground: oklch(0.985 0 0);
+ --popover: oklch(0.205 0 0);
+ --popover-foreground: oklch(0.985 0 0);
+ --primary: oklch(0.922 0 0);
+ --primary-foreground: oklch(0.205 0 0);
+ --secondary: oklch(0.269 0 0);
+ --secondary-foreground: oklch(0.985 0 0);
+ --muted: oklch(0.269 0 0);
+ --muted-foreground: oklch(0.708 0 0);
+ --accent: oklch(0.269 0 0);
+ --accent-foreground: oklch(0.985 0 0);
+ --destructive: oklch(0.704 0.191 22.216);
+ --border: oklch(1 0 0 / 10%);
+ --input: oklch(1 0 0 / 15%);
+ --ring: oklch(0.556 0 0);
+ --chart-1: oklch(0.488 0.243 264.376);
+ --chart-2: oklch(0.696 0.17 162.48);
+ --chart-3: oklch(0.769 0.188 70.08);
+ --chart-4: oklch(0.627 0.265 303.9);
+ --chart-5: oklch(0.645 0.246 16.439);
+ --sidebar: oklch(0.205 0 0);
+ --sidebar-foreground: oklch(0.985 0 0);
+ --sidebar-primary: oklch(0.488 0.243 264.376);
+ --sidebar-primary-foreground: oklch(0.985 0 0);
+ --sidebar-accent: oklch(0.269 0 0);
+ --sidebar-accent-foreground: oklch(0.985 0 0);
+ --sidebar-border: oklch(1 0 0 / 10%);
+ --sidebar-ring: oklch(0.556 0 0);
+
+ --success: oklch(0.72 0.19 150);
+ --warning: oklch(0.77 0.16 70);
+ --info: oklch(0.62 0.19 260);
+
+ --rainbow-1: oklch(0.64 0.21 25);
+ --rainbow-2: oklch(0.70 0.19 48);
+ --rainbow-3: oklch(0.77 0.16 70);
+ --rainbow-4: oklch(0.80 0.16 86);
+ --rainbow-5: oklch(0.77 0.20 131);
+ --rainbow-6: oklch(0.72 0.19 150);
+ --rainbow-7: oklch(0.70 0.15 162);
+ --rainbow-8: oklch(0.70 0.12 183);
+ --rainbow-9: oklch(0.71 0.13 215);
+ --rainbow-10: oklch(0.68 0.15 237);
+ --rainbow-11: oklch(0.62 0.19 260);
+ --rainbow-12: oklch(0.59 0.20 277);
+ --rainbow-13: oklch(0.61 0.22 293);
+ --rainbow-14: oklch(0.63 0.23 304);
+ --rainbow-15: oklch(0.67 0.26 322);
+ --rainbow-16: oklch(0.66 0.21 354);
+ --rainbow-17: oklch(0.65 0.22 16);
+}
+
+@layer base {
+ * {
+ @apply border-border outline-ring/50;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
diff --git a/apps/status-page/src/app/layout.tsx b/apps/status-page/src/app/layout.tsx
new file mode 100644
index 000000000..61af0e969
--- /dev/null
+++ b/apps/status-page/src/app/layout.tsx
@@ -0,0 +1,73 @@
+import type { Metadata } from "next";
+import { Geist, Geist_Mono } from "next/font/google";
+import "./globals.css";
+import { TailwindIndicator } from "@/components/tailwind-indicator";
+import { ThemeProvider } from "@/components/theme-provider";
+import { Toaster } from "@/components/ui/sonner";
+import { TRPCReactProvider } from "@/lib/trpc/client";
+import { cn } from "@/lib/utils";
+import LocalFont from "next/font/local";
+import { NuqsAdapter } from "nuqs/adapters/next/app";
+import { ogMetadata, twitterMetadata } from "./metadata";
+import { defaultMetadata } from "./metadata";
+
+const cal = LocalFont({
+ src: "../../public/fonts/CalSans-SemiBold.ttf",
+ variable: "--font-cal-sans",
+});
+
+const geistSans = Geist({
+ variable: "--font-geist-sans",
+ subsets: ["latin"],
+});
+
+const geistMono = Geist_Mono({
+ variable: "--font-geist-mono",
+ subsets: ["latin"],
+});
+
+export const metadata: Metadata = {
+ ...defaultMetadata,
+ twitter: {
+ ...twitterMetadata,
+ },
+ openGraph: {
+ ...ogMetadata,
+ },
+};
+
+// export const dynamic = "error";
+
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode;
+}>) {
+ return (
+ <html lang="en" suppressHydrationWarning>
+ <body
+ className={cn(
+ geistSans.variable,
+ geistMono.variable,
+ cal.variable,
+ "antialiased",
+ )}
+ >
+ <NuqsAdapter>
+ <ThemeProvider
+ attribute="class"
+ defaultTheme="system"
+ enableSystem
+ disableTransitionOnChange
+ >
+ <TRPCReactProvider>
+ {children}
+ <TailwindIndicator />
+ <Toaster richColors expand />
+ </TRPCReactProvider>
+ </ThemeProvider>
+ </NuqsAdapter>
+ </body>
+ </html>
+ );
+}
diff --git a/apps/status-page/src/app/metadata.ts b/apps/status-page/src/app/metadata.ts
new file mode 100644
index 000000000..fd9971e17
--- /dev/null
+++ b/apps/status-page/src/app/metadata.ts
@@ -0,0 +1,37 @@
+import type { Metadata } from "next";
+
+export const TITLE = "OpenStatus";
+export const DESCRIPTION =
+ "OpenStatus is an open-source platform to monitor your services and keep your users informed.";
+
+const OG_TITLE = "OpenStatus";
+const OG_DESCRIPTION = "Monitor your services and keep your users informed.";
+const FOOTER = "app.openstatus.dev";
+const IMAGE = "assets/og/dashboard-v2.png";
+
+export const defaultMetadata: Metadata = {
+ title: {
+ template: `%s | ${TITLE}`,
+ default: TITLE,
+ },
+ description: DESCRIPTION,
+ metadataBase: new URL("https://www.openstatus.dev"),
+};
+
+export const twitterMetadata: Metadata["twitter"] = {
+ title: TITLE,
+ description: DESCRIPTION,
+ card: "summary_large_image",
+ images: [
+ `/api/og?title=${OG_TITLE}&description=${OG_DESCRIPTION}&footer=${FOOTER}&image=${IMAGE}`,
+ ],
+};
+
+export const ogMetadata: Metadata["openGraph"] = {
+ title: TITLE,
+ description: DESCRIPTION,
+ type: "website",
+ images: [
+ `/api/og?title=${OG_TITLE}&description=${OG_DESCRIPTION}&footer=${FOOTER}&image=${IMAGE}`,
+ ],
+};
diff --git a/apps/status-page/src/app/react-table.d.ts b/apps/status-page/src/app/react-table.d.ts
new file mode 100644
index 000000000..3e6ce4ab1
--- /dev/null
+++ b/apps/status-page/src/app/react-table.d.ts
@@ -0,0 +1,8 @@
+import "@tanstack/react-table";
+
+declare module "@tanstack/react-table" {
+ interface ColumnMeta {
+ headerClassName?: string;
+ cellClassName?: string;
+ }
+}
diff --git a/apps/status-page/src/components/chart/chart-area-percentiles.tsx b/apps/status-page/src/components/chart/chart-area-percentiles.tsx
new file mode 100644
index 000000000..eed90deef
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-area-percentiles.tsx
@@ -0,0 +1,239 @@
+"use client";
+
+import {
+ type ChartConfig,
+ ChartContainer,
+ ChartLegend,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart";
+import { regionPercentile } from "@/data/region-percentile";
+import { formatMilliseconds } from "@/lib/formatter";
+import { cn } from "@/lib/utils";
+import { useState } from "react";
+import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
+import type { AxisDomain } from "recharts/types/util/types";
+import { ChartLegendBadge } from "./chart-legend-badge";
+import { ChartTooltipNumber } from "./chart-tooltip-number";
+
+const chartConfig = {
+ p50: {
+ label: "p50",
+ color: "var(--chart-1)",
+ },
+ p75: {
+ label: "p75",
+ color: "var(--chart-2)",
+ },
+ p90: {
+ label: "p90",
+ color: "var(--chart-4)",
+ },
+ p95: {
+ label: "p95",
+ color: "var(--chart-3)",
+ },
+ p99: {
+ label: "p99",
+ color: "var(--chart-5)",
+ },
+ error: {
+ label: "error",
+ color: "var(--destructive)",
+ },
+} satisfies ChartConfig;
+
+function avg(values: number[]) {
+ return Math.round(
+ values.reduce((acc, curr) => acc + curr, 0) / values.length,
+ );
+}
+
+const chartData = regionPercentile;
+
+export function ChartAreaPercentiles({
+ className,
+ singleSeries,
+ xAxisHide = true,
+ legendVerticalAlign = "bottom",
+ legendClassName,
+ withError = false,
+ yAxisDomain = ["dataMin", "dataMax"],
+}: {
+ className?: string;
+ singleSeries?: boolean;
+ xAxisHide?: boolean;
+ legendVerticalAlign?: "top" | "bottom";
+ legendClassName?: string;
+ withError?: boolean;
+ yAxisDomain?: AxisDomain;
+}) {
+ const [activeSeries, setActiveSeries] = useState<
+ Array<keyof typeof chartConfig>
+ >(["p75"]);
+
+ return (
+ <ChartContainer
+ config={chartConfig}
+ className={cn("h-[100px] w-full", className)}
+ >
+ <AreaChart
+ accessibilityLayer
+ data={chartData}
+ margin={{
+ left: 0,
+ right: 0,
+ // NOTE: otherwise the line is cut off
+ top: 2,
+ bottom: 2,
+ }}
+ >
+ <ChartLegend
+ verticalAlign={legendVerticalAlign}
+ content={
+ <ChartLegendBadge
+ handleActive={(item) => {
+ setActiveSeries((prev) => {
+ if (item.dataKey) {
+ const key = item.dataKey as keyof typeof chartConfig;
+ if (singleSeries) {
+ return [key];
+ }
+ if (prev.includes(key)) {
+ return prev.filter((item) => item !== key);
+ }
+ return [...prev, key];
+ }
+ return prev;
+ });
+ }}
+ active={activeSeries}
+ annotation={{
+ p50: formatMilliseconds(avg(chartData.map((item) => item.p50))),
+ p75: formatMilliseconds(avg(chartData.map((item) => item.p75))),
+ p90: formatMilliseconds(avg(chartData.map((item) => item.p90))),
+ p95: formatMilliseconds(avg(chartData.map((item) => item.p95))),
+ p99: formatMilliseconds(avg(chartData.map((item) => item.p99))),
+ }}
+ className={cn("overflow-x-scroll", legendClassName)}
+ />
+ }
+ />
+ <CartesianGrid vertical={false} />
+ <XAxis dataKey="timestamp" hide={xAxisHide} />
+ <ChartTooltip
+ cursor={false}
+ content={
+ <ChartTooltipContent
+ className="w-[180px]"
+ formatter={(value, name) => (
+ <ChartTooltipNumber
+ chartConfig={chartConfig}
+ value={value}
+ name={name}
+ />
+ )}
+ />
+ }
+ />
+ <defs>
+ <linearGradient id="fillP50" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="var(--color-p50)" stopOpacity={0.8} />
+ <stop offset="95%" stopColor="var(--color-p50)" stopOpacity={0.1} />
+ </linearGradient>
+ <linearGradient id="fillP75" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="var(--color-p75)" stopOpacity={0.8} />
+ <stop offset="95%" stopColor="var(--color-p75)" stopOpacity={0.1} />
+ </linearGradient>
+ <linearGradient id="fillP90" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="var(--color-p90)" stopOpacity={0.8} />
+ <stop offset="95%" stopColor="var(--color-p90)" stopOpacity={0.1} />
+ </linearGradient>
+ <linearGradient id="fillP95" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="var(--color-p95)" stopOpacity={0.8} />
+ <stop offset="95%" stopColor="var(--color-p95)" stopOpacity={0.1} />
+ </linearGradient>
+ <linearGradient id="fillP99" x1="0" y1="0" x2="0" y2="1">
+ <stop offset="5%" stopColor="var(--color-p99)" stopOpacity={0.8} />
+ <stop offset="95%" stopColor="var(--color-p99)" stopOpacity={0.1} />
+ </linearGradient>
+ </defs>
+ {withError ? (
+ <Area
+ dataKey="error"
+ type="monotone"
+ stroke="var(--color-error)"
+ strokeWidth={1}
+ fill="var(--color-error)"
+ fillOpacity={0.5}
+ legendType="none"
+ tooltipType="none"
+ yAxisId="error"
+ dot={false}
+ activeDot={false}
+ />
+ ) : null}
+ <Area
+ hide={!activeSeries.includes("p50")}
+ dataKey="p50"
+ type="monotone"
+ stroke="var(--color-p50)"
+ fill="url(#fillP50)"
+ fillOpacity={0.4}
+ dot={false}
+ yAxisId="percentile"
+ />
+ <Area
+ hide={!activeSeries.includes("p75")}
+ dataKey="p75"
+ type="monotone"
+ stroke="var(--color-p75)"
+ fill="url(#fillP75)"
+ fillOpacity={0.4}
+ dot={false}
+ yAxisId="percentile"
+ />
+ {/* <Area
+ hide={!activeSeries.includes("p90")}
+ dataKey="p90"
+ type="monotone"
+ stroke="var(--color-p90)"
+ fill="url(#fillP90)"
+ fillOpacity={0.4}
+ dot={false}
+ yAxisId="percentile"
+ /> */}
+ <Area
+ hide={!activeSeries.includes("p95")}
+ dataKey="p95"
+ type="monotone"
+ stroke="var(--color-p95)"
+ fill="url(#fillP95)"
+ fillOpacity={0.4}
+ dot={false}
+ yAxisId="percentile"
+ />
+ <Area
+ hide={!activeSeries.includes("p99")}
+ dataKey="p99"
+ type="monotone"
+ stroke="var(--color-p99)"
+ fill="url(#fillP99)"
+ fillOpacity={0.4}
+ dot={false}
+ yAxisId="percentile"
+ />
+ <YAxis
+ domain={yAxisDomain}
+ tickLine={false}
+ axisLine={false}
+ tickMargin={8}
+ orientation="right"
+ yAxisId="percentile"
+ tickFormatter={(value) => `${value}ms`}
+ />
+ <YAxis orientation="left" yAxisId="error" hide />
+ </AreaChart>
+ </ChartContainer>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-bar-uptime-light.tsx b/apps/status-page/src/components/chart/chart-bar-uptime-light.tsx
new file mode 100644
index 000000000..dc45166c0
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-bar-uptime-light.tsx
@@ -0,0 +1,88 @@
+"use client";
+
+import { Skeleton } from "@/components/ui/skeleton";
+import { Bar, BarChart, XAxis } from "recharts";
+
+import {
+ type ChartConfig,
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart";
+import { mapUptime } from "@/data/metrics.client";
+import { useTRPC } from "@/lib/trpc/client";
+import type { Region } from "@openstatus/db/src/schema/constants";
+import { useQuery } from "@tanstack/react-query";
+// import { startOfDay, subDays } from "date-fns";
+
+const chartConfig = {
+ ok: {
+ label: "Success",
+ color: "var(--color-success)",
+ },
+ degraded: {
+ label: "Degraded",
+ color: "var(--color-warning)",
+ },
+ error: {
+ label: "Error",
+ color: "var(--color-destructive)",
+ },
+} satisfies ChartConfig;
+
+export function ChartBarUptimeLight({
+ monitorId,
+ type,
+ regions,
+}: {
+ monitorId: string;
+ type: "http" | "tcp";
+ regions?: Region[];
+}) {
+ const trpc = useTRPC();
+
+ const { data: uptime, isLoading } = useQuery(
+ trpc.tinybird.uptime.queryOptions({
+ interval: 60 * 24,
+ // fromDate: startOfDay(subDays(new Date(), 7)).toISOString(), // FIXME:
+ period: "7d",
+ monitorId,
+ regions,
+ type,
+ }),
+ );
+
+ if (isLoading) {
+ return <Skeleton className=" my-auto h-5 w-full" />;
+ }
+
+ const refinedUptime = uptime ? mapUptime(uptime) : [];
+
+ if (refinedUptime.length === 0) {
+ return <span className="text-muted-foreground">-</span>;
+ }
+
+ return (
+ <ChartContainer config={chartConfig} className="h-[28px] w-full">
+ <BarChart accessibilityLayer data={refinedUptime} barCategoryGap={1}>
+ <ChartTooltip
+ cursor={false}
+ allowEscapeViewBox={{ x: false, y: true }}
+ wrapperStyle={{ zIndex: 1 }}
+ content={<ChartTooltipContent indicator="dot" />}
+ />
+ <Bar dataKey="ok" stackId="a" fill="var(--color-ok)" />
+ <Bar dataKey="error" stackId="a" fill="var(--color-error)" />
+ <Bar dataKey="degraded" stackId="a" fill="var(--color-degraded)" />
+ <XAxis
+ dataKey="interval"
+ tickLine={false}
+ tickMargin={8}
+ minTickGap={10}
+ axisLine={false}
+ hide
+ />
+ </BarChart>
+ </ChartContainer>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-bar-uptime.tsx b/apps/status-page/src/components/chart/chart-bar-uptime.tsx
new file mode 100644
index 000000000..ca7431b1f
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-bar-uptime.tsx
@@ -0,0 +1,110 @@
+"use client";
+
+import { Bar, BarChart, CartesianGrid, XAxis, YAxis } from "recharts";
+
+import {
+ type ChartConfig,
+ ChartContainer,
+ ChartLegend,
+ ChartLegendContent,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart";
+import { type PERIODS, mapUptime } from "@/data/metrics.client";
+import { useIsMobile } from "@/hooks/use-mobile";
+import { useTRPC } from "@/lib/trpc/client";
+import type { Region } from "@openstatus/db/src/schema/constants";
+import { useQuery } from "@tanstack/react-query";
+import { endOfDay, startOfDay, subDays } from "date-fns";
+
+const chartConfig = {
+ ok: {
+ label: "Success",
+ color: "var(--color-success)",
+ },
+ degraded: {
+ label: "Degraded",
+ color: "var(--color-warning)",
+ },
+ error: {
+ label: "Error",
+ color: "var(--color-destructive)",
+ },
+} satisfies ChartConfig;
+
+const periodToInterval = {
+ "1d": 60,
+ "7d": 240,
+ "14d": 480,
+} satisfies Record<(typeof PERIODS)[number], number>;
+
+const periodToFromDate = {
+ "1d": startOfDay(subDays(new Date(), 1)),
+ "7d": startOfDay(subDays(new Date(), 7)),
+ "14d": startOfDay(subDays(new Date(), 14)),
+} satisfies Record<(typeof PERIODS)[number], Date>;
+
+export function ChartBarUptime({
+ monitorId,
+ period,
+ type,
+ regions,
+}: {
+ monitorId: string;
+ period: (typeof PERIODS)[number];
+ type: "http" | "tcp";
+ regions: Region[];
+}) {
+ const isMobile = useIsMobile();
+ const trpc = useTRPC();
+ const fromDate = periodToFromDate[period];
+ const toDate = endOfDay(new Date());
+ const interval = periodToInterval[period];
+
+ const { data: uptime } = useQuery(
+ trpc.tinybird.uptime.queryOptions({
+ monitorId,
+ fromDate: fromDate.toISOString(),
+ toDate: toDate.toISOString(),
+ regions,
+ interval,
+ type,
+ }),
+ );
+
+ const refinedUptime = uptime ? mapUptime(uptime) : [];
+
+ return (
+ <ChartContainer config={chartConfig} className="h-[130px] w-full">
+ <BarChart
+ accessibilityLayer
+ data={refinedUptime}
+ barCategoryGap={isMobile ? 0 : 2}
+ >
+ <CartesianGrid vertical={false} />
+ <ChartTooltip
+ cursor={false}
+ content={<ChartTooltipContent indicator="dot" />}
+ />
+ <Bar dataKey="ok" stackId="a" fill="var(--color-ok)" />
+ <Bar dataKey="error" stackId="a" fill="var(--color-error)" />
+ <Bar dataKey="degraded" stackId="a" fill="var(--color-degraded)" />
+ <YAxis
+ domain={["dataMin", "dataMax"]}
+ tickLine={false}
+ axisLine={false}
+ tickMargin={8}
+ orientation="right"
+ />
+ <XAxis
+ dataKey="interval"
+ tickLine={false}
+ tickMargin={8}
+ minTickGap={10}
+ axisLine={false}
+ />
+ <ChartLegend content={<ChartLegendContent />} />
+ </BarChart>
+ </ChartContainer>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-legend-badge.tsx b/apps/status-page/src/components/chart/chart-legend-badge.tsx
new file mode 100644
index 000000000..02b67d505
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-legend-badge.tsx
@@ -0,0 +1,127 @@
+import { badgeVariants } from "@/components/ui/badge";
+import { getPayloadConfigFromPayload, useChart } from "@/components/ui/chart";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { cn } from "@/lib/utils";
+import type * as RechartsPrimitive from "recharts";
+import type { Payload } from "recharts/types/component/DefaultLegendContent";
+
+export function ChartLegendBadge({
+ className,
+ hideIcon = false,
+ payload,
+ verticalAlign = "bottom",
+ nameKey,
+ handleActive,
+ active,
+ maxActive,
+ annotation,
+ tooltip,
+}: React.ComponentProps<"div"> &
+ Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
+ hideIcon?: boolean;
+ nameKey?: string;
+ // NOTE: additional props compared to default shadcn/ui Legend component
+ handleActive?: (item: Payload) => void;
+ active?: Payload["dataKey"][];
+ maxActive?: number;
+ annotation?: Record<string, string | number | undefined>;
+ tooltip?: Record<string, string | undefined>;
+ }) {
+ const { config } = useChart();
+
+ if (!payload?.length) {
+ return null;
+ }
+
+ const hasMaxActive = active && maxActive ? active.length >= maxActive : false;
+
+ return (
+ <div
+ className={cn(
+ "flex items-center justify-center gap-2",
+ verticalAlign === "top" ? "pb-3" : "pt-3",
+ className,
+ )}
+ >
+ {payload
+ // NOTE: recharts supports "none" type for legend items
+ .filter((item) => item.type !== "none")
+ .map((item) => {
+ const key = `${nameKey || item.dataKey || "value"}`;
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
+ const suffix = annotation?.[item.dataKey as string];
+ const tooltipLabel = tooltip?.[item.dataKey as string];
+ const isActive = active?.includes(item.dataKey);
+
+ const badge = (
+ <button
+ key={item.value}
+ type="button"
+ className={cn(
+ badgeVariants({ variant: "outline" }),
+ "outline-none",
+ "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
+ !isActive && "opacity-60",
+ !isActive && hasMaxActive && "cursor-not-allowed opacity-40",
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ e.preventDefault();
+ handleActive?.(item);
+ }}
+ disabled={!isActive && hasMaxActive}
+ >
+ {itemConfig?.icon && !hideIcon ? (
+ <itemConfig.icon />
+ ) : (
+ <div
+ className="h-2 w-2 shrink-0 rounded-[2px]"
+ style={{
+ backgroundColor: item.color,
+ }}
+ />
+ )}
+ {itemConfig?.label}
+ {suffix ? (
+ <span className="font-mono text-[10px] text-muted-foreground">
+ {suffix}
+ </span>
+ ) : null}
+ </button>
+ );
+
+ if (tooltipLabel) {
+ return (
+ <ChartLegendTooltip key={item.value} tooltip={tooltipLabel}>
+ {badge}
+ </ChartLegendTooltip>
+ );
+ }
+
+ return badge;
+ })}
+ </div>
+ );
+}
+
+function ChartLegendTooltip({
+ children,
+ tooltip,
+ ...props
+}: React.ComponentProps<typeof TooltipTrigger> & { tooltip: string }) {
+ return (
+ <TooltipProvider>
+ <Tooltip delayDuration={0}>
+ <TooltipTrigger className="rounded-md" asChild {...props}>
+ {children}
+ </TooltipTrigger>
+ <TooltipContent>{tooltip}</TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-line-region.tsx b/apps/status-page/src/components/chart/chart-line-region.tsx
new file mode 100644
index 000000000..8f279fdf4
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-line-region.tsx
@@ -0,0 +1,93 @@
+"use client";
+
+import { CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts";
+
+import {
+ type ChartConfig,
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart";
+import { cn } from "@/lib/utils";
+import { ChartTooltipNumber } from "./chart-tooltip-number";
+
+const chartConfig = {
+ latency: {
+ label: "Latency",
+ color: "var(--success)",
+ },
+} satisfies ChartConfig;
+
+export type TrendPoint = {
+ timestamp: number; // unix millis
+ latency: number; // milliseconds
+};
+
+export function ChartLineRegion({
+ className,
+ data,
+}: {
+ className?: string;
+ data: TrendPoint[];
+}) {
+ const trendData = data ?? [];
+
+ const chartData = trendData.map((d) => ({
+ timestamp: new Date(d.timestamp).toLocaleString("default", {
+ hour: "numeric",
+ minute: "numeric",
+ day: "numeric",
+ month: "short",
+ }),
+ latency: d.latency,
+ }));
+
+ return (
+ <ChartContainer
+ config={chartConfig}
+ className={cn("h-[100px] w-full", className)}
+ >
+ <LineChart
+ accessibilityLayer
+ data={chartData}
+ margin={{
+ left: 12,
+ right: 12,
+ }}
+ >
+ <CartesianGrid vertical={false} />
+ <XAxis dataKey="timestamp" hide />
+ <ChartTooltip
+ cursor={false}
+ content={
+ <ChartTooltipContent
+ className="w-[180px]"
+ formatter={(value, name) => (
+ <ChartTooltipNumber
+ chartConfig={chartConfig}
+ value={value}
+ name={name}
+ />
+ )}
+ />
+ }
+ />
+ <Line
+ dataKey="latency"
+ type="monotone"
+ stroke="var(--color-latency)"
+ strokeWidth={2}
+ dot={false}
+ />
+ <YAxis
+ domain={["dataMin", "dataMax"]}
+ tickLine={false}
+ axisLine={false}
+ tickMargin={8}
+ orientation="right"
+ tickFormatter={(value) => `${value}ms`}
+ />
+ </LineChart>
+ </ChartContainer>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-line-regions.tsx b/apps/status-page/src/components/chart/chart-line-regions.tsx
new file mode 100644
index 000000000..4fc75e943
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-line-regions.tsx
@@ -0,0 +1,208 @@
+"use client";
+
+import {
+ CartesianGrid,
+ Line,
+ LineChart,
+ XAxis,
+ // XAxis,
+ YAxis,
+} from "recharts";
+
+import {
+ type ChartConfig,
+ ChartContainer,
+ ChartLegend,
+ ChartTooltip,
+ ChartTooltipContent,
+} from "@/components/ui/chart";
+import { regions } from "@/data/regions";
+import { formatMilliseconds } from "@/lib/formatter";
+import { cn } from "@/lib/utils";
+import { useState } from "react";
+import { ChartLegendBadge } from "./chart-legend-badge";
+import { ChartTooltipNumber } from "./chart-tooltip-number";
+
+const r = regions.filter((r) =>
+ ["ams", "bog", "arn", "atl", "bom", "syd", "fra"].includes(r.code),
+);
+
+const randomizer = Math.random() * 50;
+
+const chartData = Array.from({ length: 30 }, (_, i) => ({
+ timestamp: new Date(
+ new Date().setMinutes(new Date().getMinutes() - i),
+ ).toLocaleString("default", {
+ hour: "numeric",
+ minute: "numeric",
+ }),
+ ams: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ bog: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ arn: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ atl: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ bom: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ syd: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+ fra: Math.floor(Math.random() * randomizer) * 100 * 0.75,
+}));
+
+const s = r.sort((a, b) => {
+ const aAvg = avg(
+ chartData.map((d) => {
+ const value = d[a.code as keyof typeof d];
+ if (typeof value === "number") {
+ return value;
+ }
+ return 0;
+ }),
+ );
+ const bAvg = avg(
+ chartData.map((d) => {
+ const value = d[b.code as keyof typeof d];
+ if (typeof value === "number") {
+ return value;
+ }
+ return 0;
+ }),
+ );
+ return bAvg - aAvg;
+});
+
+const chartConfig = s
+ .map((item, index) => ({
+ code: item.code,
+ label: item.code,
+ color: `var(--rainbow-${index + 1})`,
+ }))
+ .reduce(
+ (acc, item) => {
+ acc[item.code] = item;
+ return acc;
+ },
+ {} as Record<string, { label: string; color: string }>,
+ ) satisfies ChartConfig;
+
+function avg(values: number[]) {
+ return Math.round(
+ values.reduce((acc, curr) => acc + curr, 0) / values.length,
+ );
+}
+
+const annotation = r.reduce(
+ (acc, item) => {
+ acc[item.code] = formatMilliseconds(
+ avg(
+ chartData.map((d) => {
+ const value = d[item.code as keyof typeof d];
+ if (typeof value === "number") {
+ return value;
+ }
+ return 0;
+ }),
+ ),
+ );
+ return acc;
+ },
+ {} as Record<string, string>,
+);
+
+const tooltip = r.reduce(
+ (acc, item) => {
+ acc[item.code] = item.location;
+ return acc;
+ },
+ {} as Record<string, string>,
+);
+
+export function ChartLineRegions({ className }: { className?: string }) {
+ const [activeSeries, setActiveSeries] = useState<
+ Array<keyof typeof chartConfig>
+ >([s[0].code, s[1].code]);
+ return (
+ <ChartContainer
+ config={chartConfig}
+ className={cn("h-[100px] w-full", className)}
+ >
+ <LineChart
+ accessibilityLayer
+ data={chartData}
+ margin={{
+ left: 0,
+ right: 0,
+ top: 2,
+ bottom: 2,
+ }}
+ >
+ <CartesianGrid vertical={false} />
+ <XAxis dataKey="timestamp" />
+ <ChartTooltip
+ cursor={false}
+ content={
+ <ChartTooltipContent
+ formatter={(value, name) => (
+ <ChartTooltipNumber
+ chartConfig={chartConfig}
+ value={value}
+ name={name}
+ labelFormatter={(_, name) => {
+ const region = regions.find((r) => r.code === name);
+ return (
+ <>
+ <span className="font-mono">{name}</span>{" "}
+ <span className="text-muted-foreground text-xs">
+ {region?.location}
+ </span>
+ </>
+ );
+ }}
+ />
+ )}
+ />
+ }
+ />
+ {r.map((item) => (
+ <Line
+ key={item.code}
+ dataKey={item.code}
+ type="monotone"
+ stroke={`var(--color-${item.code})`}
+ dot={false}
+ hide={!activeSeries.includes(item.code)}
+ />
+ ))}
+
+ <YAxis
+ domain={["dataMin", "dataMax"]}
+ tickLine={false}
+ axisLine={false}
+ tickMargin={8}
+ orientation="right"
+ tickFormatter={(value) => `${value}ms`}
+ />
+ <ChartLegend
+ verticalAlign="top"
+ content={
+ <ChartLegendBadge
+ handleActive={(item) => {
+ setActiveSeries((prev) => {
+ if (item.dataKey) {
+ const key = item.dataKey as keyof typeof chartConfig;
+ if (prev.includes(key)) {
+ return prev.filter((item) => item !== key);
+ }
+ return [...prev, key];
+ }
+ return prev;
+ });
+ }}
+ active={activeSeries}
+ maxActive={3}
+ annotation={annotation}
+ tooltip={tooltip}
+ className="justify-start overflow-x-scroll ps-1 pt-1 font-mono"
+ />
+ }
+ />
+ </LineChart>
+ </ChartContainer>
+ );
+}
diff --git a/apps/status-page/src/components/chart/chart-tooltip-number.tsx b/apps/status-page/src/components/chart/chart-tooltip-number.tsx
new file mode 100644
index 000000000..ce152b7d9
--- /dev/null
+++ b/apps/status-page/src/components/chart/chart-tooltip-number.tsx
@@ -0,0 +1,59 @@
+import type { ChartConfig } from "@/components/ui/chart";
+import { cn } from "@/lib/utils";
+import type {
+ NameType,
+ ValueType,
+} from "recharts/types/component/DefaultTooltipContent";
+
+interface ChartTooltipNumberProps {
+ chartConfig: ChartConfig;
+ value: ValueType;
+ name: NameType;
+}
+
+export function ChartTooltipNumber({
+ value,
+ name,
+ chartConfig,
+}: ChartTooltipNumberProps) {
+ return (
+ <ChartTooltipNumberRaw
+ value={value}
+ label={chartConfig[name as keyof typeof chartConfig]?.label || name}
+ style={
+ {
+ "--color-bg": `var(--color-${name})`,
+ } as React.CSSProperties
+ }
+ />
+ );
+}
+
+export function ChartTooltipNumberRaw({
+ value,
+ label,
+ style,
+ className,
+}: {
+ value: ValueType;
+ label: React.ReactNode;
+ style?: React.CSSProperties;
+ className?: string;
+}) {
+ return (
+ <>
+ <div
+ className={cn(
+ "h-2.5 w-2.5 shrink-0 rounded-[2px] bg-(--color-bg)",
+ className,
+ )}
+ style={style}
+ />
+ <span>{label}</span>
+ <div className="ml-auto flex items-baseline gap-0.5 font-medium font-mono text-foreground tabular-nums">
+ {value}
+ <span className="font-normal text-muted-foreground">ms</span>
+ </div>
+ </>
+ );
+}
diff --git a/apps/status-page/src/components/common/kbd.tsx b/apps/status-page/src/components/common/kbd.tsx
new file mode 100644
index 000000000..b7b6636cb
--- /dev/null
+++ b/apps/status-page/src/components/common/kbd.tsx
@@ -0,0 +1,19 @@
+import { cn } from "@/lib/utils";
+
+export function Kbd({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"kbd">) {
+ return (
+ <kbd
+ className={cn(
+ "-me-1 ms-2 inline-flex h-5 max-h-full items-center rounded border bg-background px-1 font-[inherit] font-medium text-[0.625rem] text-muted-foreground/70",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </kbd>
+ );
+}
diff --git a/apps/status-page/src/components/common/link.tsx b/apps/status-page/src/components/common/link.tsx
new file mode 100644
index 000000000..6749263d8
--- /dev/null
+++ b/apps/status-page/src/components/common/link.tsx
@@ -0,0 +1,19 @@
+import { cn } from "@/lib/utils";
+import NextLink from "next/link";
+
+// TODO: we could add cva variants for the link
+
+export function Link({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<typeof NextLink>) {
+ return (
+ <NextLink
+ className={cn("font-medium text-foreground", className)}
+ {...props}
+ >
+ {children}
+ </NextLink>
+ );
+}
diff --git a/apps/status-page/src/components/content/empty-state.tsx b/apps/status-page/src/components/content/empty-state.tsx
new file mode 100644
index 000000000..38bb2a838
--- /dev/null
+++ b/apps/status-page/src/components/content/empty-state.tsx
@@ -0,0 +1,46 @@
+import { cn } from "@/lib/utils";
+
+export function EmptyStateContainer({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex h-full flex-col items-center justify-center gap-2 rounded-lg border border-border border-dashed p-4",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function EmptyStateTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("text-foreground", className)} {...props}>
+ {children}
+ </p>
+ );
+}
+
+export function EmptyStateDescription({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p
+ className={cn("text-center text-muted-foreground text-sm", className)}
+ {...props}
+ >
+ {children}
+ </p>
+ );
+}
diff --git a/apps/status-page/src/components/content/metric-card.tsx b/apps/status-page/src/components/content/metric-card.tsx
new file mode 100644
index 000000000..2803cbbbe
--- /dev/null
+++ b/apps/status-page/src/components/content/metric-card.tsx
@@ -0,0 +1,197 @@
+import type { VariantProps } from "class-variance-authority";
+import { cva } from "class-variance-authority";
+import { ChevronDown, ChevronUp } from "lucide-react";
+
+import { Badge } from "@/components/ui/badge";
+import { Skeleton } from "@/components/ui/skeleton";
+
+import { cn } from "@/lib/utils";
+import type React from "react";
+
+const metricCardVariants = cva(
+ "flex flex-col gap-1 border rounded-lg px-3 py-2 text-card-foreground",
+ {
+ variants: {
+ variant: {
+ default: "border-input bg-card",
+ ghost: "border-transparent",
+ destructive: "border-destructive/80 bg-destructive/10",
+ success: "border-success/80 bg-success/10",
+ warning: "border-warning/80 bg-warning/10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ },
+);
+
+export function MetricCard({
+ children,
+ className,
+ variant,
+ ...props
+}: React.ComponentProps<"div"> & VariantProps<typeof metricCardVariants>) {
+ return (
+ <div
+ data-variant={variant}
+ className={cn(metricCardVariants({ variant, className }), "group")}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function MetricCardTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("font-medium text-sm", className)} {...props}>
+ {children}
+ </p>
+ );
+}
+
+export function MetricCardHeader({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "text-muted-foreground",
+ "group-data-[variant=destructive]:text-destructive",
+ "group-data-[variant=success]:text-success",
+ "group-data-[variant=warning]:text-warning",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function MetricCardValue({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("font-semibold text-foreground", className)} {...props}>
+ {children}
+ </p>
+ );
+}
+
+export function MetricCardGroup({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+const badgeVariants = cva("px-1.5 font-mono text-[10px]", {
+ variants: {
+ variant: {
+ default: "border-border",
+ increase:
+ "border-destructive/20 bg-destructive/10 hover:bg-destructive/10 text-destructive",
+ decrease:
+ "border-success/20 bg-success/10 hover:bg-success/10 text-success",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+});
+
+export function MetricCardBadge({
+ value,
+ decimal = 1,
+ className,
+ ...props
+}: React.ComponentProps<typeof Badge> & {
+ value: number;
+ decimal?: number;
+}) {
+ const round = 10 ** decimal; // 10^1 = 10 (1 decimal), 10^2 = 100 (2 decimals), etc.
+ const percentage = Math.round((value - 1) * 100 * round) / round;
+
+ const variant: VariantProps<typeof badgeVariants>["variant"] =
+ percentage > 0 ? "increase" : percentage < 0 ? "decrease" : "default";
+
+ return (
+ <Badge
+ variant="secondary"
+ className={badgeVariants({ variant, className })}
+ {...props}
+ >
+ {percentage !== 0 ? (
+ <span>
+ {percentage > 0 ? <ChevronUp className="mr-px size-2.5" /> : null}
+ {percentage < 0 ? <ChevronDown className="mr-px size-2.5" /> : null}
+ </span>
+ ) : null}
+ {Math.abs(percentage)}%
+ </Badge>
+ );
+}
+
+const metricCardButtonVariants = cva(
+ "group w-full text-left transition-all rounded-md outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 cursor-pointer",
+ // TODO: discuss if we want rings
+);
+
+export function MetricCardButton({
+ children,
+ className,
+ variant,
+ ...props
+}: React.ComponentProps<"button"> & VariantProps<typeof metricCardVariants>) {
+ return (
+ <button
+ type="button"
+ data-variant={variant}
+ className={cn(
+ metricCardVariants({ variant, className }),
+ metricCardButtonVariants(),
+ )}
+ {...props}
+ >
+ {children}
+ </button>
+ );
+}
+
+export function MetricCardSkeleton({
+ className,
+ ...props
+}: React.ComponentProps<typeof Skeleton>) {
+ return (
+ <Skeleton
+ className={cn(
+ "group-data-[variant=destructive]:bg-destructive/50",
+ "group-data-[variant=success]:bg-success/50",
+ "group-data-[variant=warning]:bg-warning/50",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
diff --git a/apps/status-page/src/components/content/process-message.tsx b/apps/status-page/src/components/content/process-message.tsx
new file mode 100644
index 000000000..791a1f8e9
--- /dev/null
+++ b/apps/status-page/src/components/content/process-message.tsx
@@ -0,0 +1,34 @@
+import type { AnchorHTMLAttributes } from "react";
+import { Fragment, createElement } from "react";
+import { jsx, jsxs } from "react/jsx-runtime";
+import rehypeReact from "rehype-react";
+import remarkParse from "remark-parse";
+import remarkRehype from "remark-rehype";
+import { unified } from "unified";
+
+export function ProcessMessage({ value }: { value: string }) {
+ const result = unified()
+ .use(remarkParse)
+ .use(remarkRehype)
+ .use(rehypeReact, {
+ createElement,
+ Fragment,
+ jsx,
+ jsxs,
+ components: {
+ a: (props: AnchorHTMLAttributes<HTMLAnchorElement>) => {
+ return (
+ <a
+ target="_blank"
+ rel="noreferrer"
+ className="underline"
+ {...props}
+ />
+ );
+ },
+ } as { [key: string]: React.ComponentType<unknown> },
+ })
+ .processSync(value).result;
+
+ return result;
+}
diff --git a/apps/status-page/src/components/content/section.tsx b/apps/status-page/src/components/content/section.tsx
new file mode 100644
index 000000000..5beffaf26
--- /dev/null
+++ b/apps/status-page/src/components/content/section.tsx
@@ -0,0 +1,106 @@
+import { cn } from "@/lib/utils";
+
+export function Section({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"section">) {
+ return (
+ <section className={cn("space-y-4", className)} {...props}>
+ {children}
+ </section>
+ );
+}
+
+export function SectionHeader({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("flex flex-col gap-1.5", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function SectionHeaderRow({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex flex-col gap-1.5 sm:flex-row sm:items-end sm:justify-between",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function SectionDescription({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("text-muted-foreground text-sm", className)} {...props}>
+ {children}
+ </p>
+ );
+}
+
+export function SectionTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("font-medium text-lg", className)} {...props}>
+ {children}
+ </p>
+ );
+}
+
+export function SectionGroup({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn("mx-auto w-full max-w-4xl space-y-8 px-4 py-8", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function SectionGroupHeader({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("space-y-1.5", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function SectionGroupTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+ <p className={cn("font-bold text-4xl", className)} {...props}>
+ {children}
+ </p>
+ );
+}
diff --git a/apps/status-page/src/components/controls-filter/.gitkeep b/apps/status-page/src/components/controls-filter/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/apps/status-page/src/components/controls-search/button-reset.tsx b/apps/status-page/src/components/controls-search/button-reset.tsx
new file mode 100644
index 000000000..ff782b117
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/button-reset.tsx
@@ -0,0 +1,45 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import { X } from "lucide-react";
+import { useRouter, useSearchParams } from "next/navigation";
+
+export function ButtonReset({ only }: { only?: string[] }) {
+ const searchParams = useSearchParams();
+ const router = useRouter();
+
+ // Determine if at least one parameter that should be reset is present (or any parameter if `only` is undefined)
+ const hasParamsToReset = only
+ ? only.some((key) => searchParams.has(key))
+ : !!searchParams.toString();
+
+ if (!hasParamsToReset) return null;
+
+ const handleClick = () => {
+ // Clone the current search params so we can mutate them
+ const params = new URLSearchParams(searchParams.toString());
+
+ if (only && only.length > 0) {
+ // Remove only the specified keys
+ only.forEach((key) => params.delete(key));
+ const query = params.toString();
+ router.push(
+ query
+ ? `${window.location.pathname}?${query}`
+ : window.location.pathname,
+ );
+ } else {
+ // No `only` prop provided – remove all query parameters
+ router.push(window.location.pathname);
+ }
+ };
+
+ if (!hasParamsToReset) return null;
+
+ return (
+ <Button variant="ghost" size="sm" onClick={handleClick}>
+ <X />
+ Reset
+ </Button>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/command-region.tsx b/apps/status-page/src/components/controls-search/command-region.tsx
new file mode 100644
index 000000000..c034f675f
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/command-region.tsx
@@ -0,0 +1,163 @@
+"use client";
+
+import { Link } from "@/components/common/link";
+import {
+ BillingOverlay,
+ BillingOverlayButton,
+ BillingOverlayDescription,
+} from "@/components/content/billing-overlay";
+import { Button } from "@/components/ui/button";
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+ CommandSeparator,
+} from "@/components/ui/command";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { REGIONS } from "@/data/metrics.client";
+import { useTRPC } from "@/lib/trpc/client";
+import { cn } from "@/lib/utils";
+import { groupByContinent } from "@openstatus/utils";
+import { useQuery } from "@tanstack/react-query";
+import { Check, Lock } from "lucide-react";
+import { parseAsArrayOf, parseAsStringLiteral, useQueryState } from "nuqs";
+
+export const parseRegions = (regions: (typeof REGIONS)[number][]) =>
+ parseAsArrayOf(
+ parseAsStringLiteral(REGIONS.filter((region) => regions.includes(region))),
+ ).withDefault(regions as unknown as (typeof REGIONS)[number][]);
+
+export function CommandRegion({
+ regions,
+}: {
+ regions: (typeof REGIONS)[number][];
+}) {
+ const trpc = useTRPC();
+ const { data: workspace } = useQuery(trpc.workspace.get.queryOptions());
+ const [selectedRegions, setSelectedRegions] = useQueryState(
+ "regions",
+ parseRegions(regions),
+ );
+
+ const limited = workspace?.plan === "free";
+
+ return (
+ <Popover>
+ <PopoverTrigger asChild>
+ <Button variant="outline" size="sm">
+ {selectedRegions.length === regions.length
+ ? "All Regions"
+ : `${selectedRegions.length} Regions`}
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent
+ align="start"
+ className="relative w-[200px] overflow-hidden p-0"
+ >
+ <Command>
+ <CommandInput placeholder="Search region..." disabled={limited} />
+ <CommandList>
+ <CommandGroup forceMount>
+ <CommandItem
+ onSelect={() => {
+ const items = document.querySelectorAll(
+ '[data-slot="command-item"][data-disabled="false"]',
+ );
+ const codes: (typeof REGIONS)[number][] = [];
+
+ items.forEach((item) => {
+ const code = item.getAttribute("data-value");
+ if (code && code !== "select-all") {
+ codes.push(code as (typeof REGIONS)[number]);
+ }
+ });
+
+ if (codes.length === selectedRegions.length) {
+ setSelectedRegions([]);
+ } else {
+ setSelectedRegions(codes);
+ }
+ }}
+ value="select-all"
+ disabled={limited}
+ >
+ Toggle selection
+ </CommandItem>
+ </CommandGroup>
+ <CommandSeparator alwaysRender />
+ {Object.entries(groupByContinent).map(
+ ([continent, continentRegions]) => {
+ const allowedRegions = continentRegions.filter((region) =>
+ regions.includes(region.code),
+ );
+
+ if (allowedRegions.length === 0) {
+ return null;
+ }
+ return (
+ <CommandGroup key={continent} heading={continent}>
+ {allowedRegions.map((region) => (
+ <CommandItem
+ disabled={limited}
+ key={region.code}
+ value={region.code}
+ keywords={[
+ region.code,
+ region.location,
+ region.continent,
+ region.flag,
+ ]}
+ onSelect={() => {
+ setSelectedRegions((prev) =>
+ prev.includes(region.code)
+ ? prev.filter((r) => r !== region.code)
+ : [...prev, region.code],
+ );
+ }}
+ >
+ <span className="mr-1">{region.flag}</span>
+ {region.code}
+ <span className="ml-1 truncate text-muted-foreground text-xs">
+ {region.location}
+ </span>
+ <Check
+ className={cn(
+ "ml-auto",
+ selectedRegions.includes(region.code)
+ ? "opacity-100"
+ : "opacity-0",
+ )}
+ />
+ </CommandItem>
+ ))}
+ </CommandGroup>
+ );
+ },
+ )}
+ <CommandEmpty>No region found.</CommandEmpty>
+ </CommandList>
+ </Command>
+ {limited ? (
+ <BillingOverlay className="to-70%">
+ <BillingOverlayButton asChild>
+ <Link href="/settings/billing">
+ <Lock />
+ Upgrade
+ </Link>
+ </BillingOverlayButton>
+ <BillingOverlayDescription>
+ Filter by region is only available on paid plans.
+ </BillingOverlayDescription>
+ </BillingOverlay>
+ ) : null}
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/command-tags.tsx b/apps/status-page/src/components/controls-search/command-tags.tsx
new file mode 100644
index 000000000..576b83f06
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/command-tags.tsx
@@ -0,0 +1,87 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+} from "@/components/ui/command";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { useTRPC } from "@/lib/trpc/client";
+import { cn } from "@/lib/utils";
+import { useQuery } from "@tanstack/react-query";
+import { Check } from "lucide-react";
+import { parseAsArrayOf, parseAsString, useQueryState } from "nuqs";
+
+export function CommandTags() {
+ const trpc = useTRPC();
+ const { data: tags } = useQuery(trpc.monitorTag.list.queryOptions());
+ const [selectedTags, setSelectedTags] = useQueryState(
+ "tags",
+ parseAsArrayOf(parseAsString).withDefault([]).withOptions({
+ shallow: false,
+ }),
+ );
+
+ return (
+ <Popover>
+ <PopoverTrigger asChild>
+ <Button variant="outline" size="sm">
+ {selectedTags.length === (tags?.length ?? 0)
+ ? "All Tags"
+ : `${selectedTags.length} Tags`}
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent
+ align="start"
+ className="relative w-[200px] overflow-hidden p-0"
+ >
+ <Command>
+ <CommandInput placeholder="Search tag..." />
+ <CommandList>
+ <CommandGroup>
+ {tags?.map((tag) => (
+ <CommandItem
+ key={tag.id}
+ value={tag.name}
+ keywords={[tag.name]}
+ onSelect={() => {
+ setSelectedTags((prev) =>
+ prev.includes(tag.name)
+ ? prev.filter((r) => r !== tag.name)
+ : [...prev, tag.name],
+ );
+ }}
+ >
+ <div className="flex items-center gap-2">
+ <span
+ className="size-2.5 rounded-full"
+ style={{ backgroundColor: tag.color }}
+ />
+ {tag.name}
+ </div>
+ <Check
+ className={cn(
+ "ml-auto",
+ selectedTags.includes(tag.name)
+ ? "opacity-100"
+ : "opacity-0",
+ )}
+ />
+ </CommandItem>
+ ))}
+ </CommandGroup>
+ <CommandEmpty>No tag found.</CommandEmpty>
+ </CommandList>
+ </Command>
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/dropdown-interval.tsx b/apps/status-page/src/components/controls-search/dropdown-interval.tsx
new file mode 100644
index 000000000..03662ffbb
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/dropdown-interval.tsx
@@ -0,0 +1,56 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { INTERVALS } from "@/data/metrics.client";
+import { Check } from "lucide-react";
+import { parseAsNumberLiteral, useQueryState } from "nuqs";
+
+const MAPPING = {
+ 5: "5 minutes",
+ 15: "15 minutes",
+ 30: "30 minutes",
+ 60: "1 hour",
+ 120: "2 hours",
+ 240: "4 hours",
+ 480: "8 hours",
+ 1440: "1 day",
+} as const;
+
+const parseInterval = parseAsNumberLiteral(INTERVALS).withDefault(30);
+
+export function DropdownInterval() {
+ const [interval, setInterval] = useQueryState("interval", parseInterval);
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm">
+ {MAPPING[interval]}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Resolution
+ </DropdownMenuLabel>
+ {INTERVALS.map((item) => (
+ <DropdownMenuItem key={item} onSelect={() => setInterval(item)}>
+ {MAPPING[item]}
+ {interval === item ? (
+ <Check className="ml-auto shrink-0" />
+ ) : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/dropdown-percentile.tsx b/apps/status-page/src/components/controls-search/dropdown-percentile.tsx
new file mode 100644
index 000000000..120ecbb2e
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/dropdown-percentile.tsx
@@ -0,0 +1,53 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { PERCENTILES } from "@/data/metrics.client";
+import { cn } from "@/lib/utils";
+import { Check } from "lucide-react";
+import { parseAsStringLiteral, useQueryState } from "nuqs";
+
+const parsePercentile = parseAsStringLiteral(PERCENTILES).withDefault("p50");
+
+export function DropdownPercentile() {
+ const [percentile, setPercentile] = useQueryState(
+ "percentile",
+ parsePercentile,
+ );
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="capitalize">
+ {percentile}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Percentile
+ </DropdownMenuLabel>
+ {PERCENTILES.map((item) => (
+ <DropdownMenuItem
+ key={item}
+ onSelect={() => setPercentile(item)}
+ className={cn("capitalize")}
+ >
+ {item}
+ {percentile === item ? (
+ <Check className="ml-auto shrink-0" />
+ ) : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/dropdown-period.tsx b/apps/status-page/src/components/controls-search/dropdown-period.tsx
new file mode 100644
index 000000000..3ccd85fe0
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/dropdown-period.tsx
@@ -0,0 +1,59 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { PERIODS } from "@/data/metrics.client";
+import { Check } from "lucide-react";
+import { parseAsStringLiteral, useQueryState } from "nuqs";
+
+// TODO: where to move it?
+export const PERIOD_VALUES = [
+ {
+ value: "1d",
+ label: "Last day",
+ },
+ {
+ value: "7d",
+ label: "Last 7 days",
+ },
+ {
+ value: "14d",
+ label: "Last 14 days",
+ },
+] satisfies { value: (typeof PERIODS)[number]; label: string }[];
+
+const parsePeriod = parseAsStringLiteral(PERIODS).withDefault("1d");
+
+export function DropdownPeriod() {
+ const [period, setPeriod] = useQueryState("period", parsePeriod);
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm">
+ {PERIOD_VALUES.find(({ value }) => value === period)?.label}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Period
+ </DropdownMenuLabel>
+ {PERIOD_VALUES.map(({ value, label }) => (
+ <DropdownMenuItem key={value} onSelect={() => setPeriod(value)}>
+ {label}
+ {period === value ? <Check className="ml-auto shrink-0" /> : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/dropdown-status.tsx b/apps/status-page/src/components/controls-search/dropdown-status.tsx
new file mode 100644
index 000000000..565ee5ec6
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/dropdown-status.tsx
@@ -0,0 +1,48 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { STATUS } from "@/data/metrics.client";
+import { cn } from "@/lib/utils";
+import { Check } from "lucide-react";
+import { parseAsStringLiteral, useQueryState } from "nuqs";
+
+const parseStatus = parseAsStringLiteral(STATUS);
+
+export function DropdownStatus() {
+ const [status, setStatus] = useQueryState("status", parseStatus);
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="capitalize">
+ {status ?? "All Status"}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Request Status
+ </DropdownMenuLabel>
+ {STATUS.map((item) => (
+ <DropdownMenuItem
+ key={item}
+ onSelect={() => setStatus(item)}
+ className={cn("capitalize")}
+ >
+ {item}
+ {status === item ? <Check className="ml-auto shrink-0" /> : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/dropdown-trigger.tsx b/apps/status-page/src/components/controls-search/dropdown-trigger.tsx
new file mode 100644
index 000000000..552b5f48a
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/dropdown-trigger.tsx
@@ -0,0 +1,48 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { TRIGGER } from "@/data/metrics.client";
+import { cn } from "@/lib/utils";
+import { Check } from "lucide-react";
+import { parseAsStringLiteral, useQueryState } from "nuqs";
+
+const parseTrigger = parseAsStringLiteral(TRIGGER);
+
+export function DropdownTrigger() {
+ const [trigger, setTrigger] = useQueryState("trigger", parseTrigger);
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="capitalize">
+ {trigger ?? "All Trigger"}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="font-medium text-muted-foreground text-xs">
+ Trigger
+ </DropdownMenuLabel>
+ {TRIGGER.map((item) => (
+ <DropdownMenuItem
+ key={item}
+ onSelect={() => setTrigger(item)}
+ className={cn("capitalize")}
+ >
+ {item === "cron" ? "Scheduled" : "API"}
+ {trigger === item ? <Check className="ml-auto shrink-0" /> : null}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuGroup>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/controls-search/popover-date.tsx b/apps/status-page/src/components/controls-search/popover-date.tsx
new file mode 100644
index 000000000..f30722aa1
--- /dev/null
+++ b/apps/status-page/src/components/controls-search/popover-date.tsx
@@ -0,0 +1,141 @@
+import { DatePicker } from "@/components/date-picker";
+import { Button } from "@/components/ui/button";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { formatDateRange } from "@/lib/formatter";
+import { endOfDay, startOfDay, subDays, subHours } from "date-fns";
+import { parseAsIsoDateTime, useQueryState } from "nuqs";
+import { useEffect, useMemo, useRef, useState } from "react";
+import type { DateRange } from "react-day-picker";
+
+export function PopoverDate() {
+ const [open, setOpen] = useState(false);
+ const today = useRef(new Date());
+ const [from, setFrom] = useQueryState(
+ "from",
+ parseAsIsoDateTime.withDefault(startOfDay(today.current)),
+ );
+ const [to, setTo] = useQueryState(
+ "to",
+ parseAsIsoDateTime.withDefault(endOfDay(today.current)),
+ );
+ const [range, setRange] = useState<DateRange>({ from, to });
+
+ // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
+ const presets = useMemo(
+ () => [
+ {
+ id: "today",
+ label: "Today",
+ values: {
+ from: startOfDay(today.current),
+ to: endOfDay(today.current),
+ },
+ shortcut: "t",
+ },
+ {
+ id: "yesterday",
+ label: "Yesterday",
+ values: {
+ from: startOfDay(subDays(today.current, 1)),
+ to: endOfDay(subDays(today.current, 1)),
+ },
+ shortcut: "y",
+ },
+ {
+ id: "lastHour",
+ label: "Last hour",
+ values: {
+ from: subHours(today.current, 1),
+ to: today.current,
+ },
+ shortcut: "h",
+ },
+ {
+ id: "last6Hours",
+ label: "Last 6 hours",
+ values: {
+ from: subHours(today.current, 5),
+ to: today.current,
+ },
+ shortcut: "s",
+ },
+ {
+ id: "last24Hours",
+ label: "Last 24 hours",
+ values: {
+ from: subHours(today.current, 23),
+ to: today.current,
+ },
+ shortcut: "d",
+ },
+ {
+ id: "last7Days",
+ label: "Last 7 days",
+ values: {
+ from: subDays(today.current, 6),
+ to: today.current,
+ },
+ shortcut: "w",
+ },
+ {
+ id: "last14Days",
+ label: "Last 14 days",
+ values: {
+ from: subDays(today.current, 13),
+ to: today.current,
+ },
+ shortcut: "b",
+ },
+ ],
+ [today],
+ );
+
+ // instead use `range` state
+ const selected = presets.find((period) => {
+ return (
+ from.getTime() === period.values.from.getTime() &&
+ to.getTime() === period.values.to.getTime()
+ );
+ });
+
+ // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
+ useEffect(() => {
+ if (!open) {
+ setFrom(range.from ?? null);
+ setTo(range.to ?? null);
+ }
+ }, [open]);
+
+ useEffect(() => {
+ const down = (e: KeyboardEvent) => {
+ if (!open) return;
+
+ presets.map((preset) => {
+ if (preset.shortcut === e.key) {
+ setFrom(preset.values.from);
+ setTo(preset.values.to);
+ setRange({ from: preset.values.from, to: preset.values.to });
+ }
+ });
+ };
+ document.addEventListener("keydown", down);
+ return () => document.removeEventListener("keydown", down);
+ }, [presets, open, setFrom, setTo]);
+
+ return (
+ <Popover open={open} onOpenChange={setOpen}>
+ <PopoverTrigger asChild>
+ <Button variant="outline" size="sm">
+ {selected?.label ?? formatDateRange(from, to)}
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent className="w-auto p-0" side="bottom" align="start">
+ <DatePicker presets={presets} range={range} onSelect={setRange} />
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/apps/status-page/src/components/date-picker.tsx b/apps/status-page/src/components/date-picker.tsx
new file mode 100644
index 000000000..ecbe3fd16
--- /dev/null
+++ b/apps/status-page/src/components/date-picker.tsx
@@ -0,0 +1,128 @@
+"use client";
+
+import { useState } from "react";
+import type { DateRange } from "react-day-picker";
+
+import { Kbd } from "@/components/common/kbd";
+import { Button } from "@/components/ui/button";
+import { Calendar } from "@/components/ui/calendar";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Separator } from "@/components/ui/separator";
+import { formatDateForInput } from "@/lib/formatter";
+import { endOfDay } from "date-fns";
+
+type DatePickerProps = {
+ range: DateRange;
+ onSelect: (range: DateRange) => void;
+ presets: { id: string; label: string; values: DateRange; shortcut: string }[];
+};
+
+export function DatePicker({ range, onSelect, presets }: DatePickerProps) {
+ const [today] = useState(new Date());
+ const disableBefore = presets[presets.length - 1]?.values?.from;
+
+ return (
+ <div>
+ <div className="flex flex-row">
+ <div className="relative py-4">
+ <div className="h-full">
+ <div className="flex flex-col px-1">
+ <div className="px-3 py-1 font-medium text-muted-foreground text-xs">
+ Presets
+ </div>
+ {presets.map((preset) => {
+ const isSelected =
+ range.from?.getTime() === preset.values.from?.getTime() &&
+ range.to?.getTime() === preset.values.to?.getTime();
+
+ return (
+ <Button
+ key={preset.id}
+ variant={isSelected ? "outline" : "ghost"}
+ size="sm"
+ className="w-full justify-between border border-transparent"
+ onClick={() => {
+ onSelect(preset.values);
+ }}
+ >
+ <span>{preset.label}</span>
+ <Kbd className="font-mono uppercase">{preset.shortcut}</Kbd>
+ </Button>
+ );
+ })}
+ </div>
+ </div>
+ </div>
+ <Separator orientation="vertical" className="h-auto! w-px" />
+ <div className="flex flex-1 items-center justify-center">
+ <Calendar
+ mode="range"
+ selected={range}
+ onSelect={(newDate) => {
+ if (newDate) {
+ onSelect({
+ ...newDate,
+ to: newDate.to ? endOfDay(newDate.to) : undefined,
+ });
+ }
+ }}
+ className="p-2"
+ disabled={[
+ { after: today }, // Dates before today
+ { before: disableBefore ?? today }, // Dates before last action
+ ]}
+ />
+ </div>
+ </div>
+ <Separator />
+ <div className="flex flex-col gap-2 px-3 py-4">
+ <p className="px-1 font-medium text-muted-foreground text-xs">
+ Custom Range
+ </p>
+ <div className="grid gap-2 sm:grid-cols-2">
+ <div className="grid w-full gap-1.5">
+ <Label htmlFor="from" className="px-1">
+ Start
+ </Label>
+ <Input
+ type="datetime-local"
+ id="from"
+ name="from"
+ min={formatDateForInput(disableBefore ?? today)}
+ max={formatDateForInput(today)}
+ value={range.from ? formatDateForInput(range.from) : ""}
+ onChange={(e) => {
+ const newDate = new Date(e.target.value);
+ if (!Number.isNaN(newDate.getTime())) {
+ onSelect({ ...range, from: newDate });
+ }
+ }}
+ disabled={!range.from}
+ />
+ </div>
+ <div className="grid w-full gap-1.5">
+ <Label htmlFor="to" className="px-1">
+ End
+ </Label>
+ <Input
+ type="datetime-local"
+ id="to"
+ name="to"
+ min={formatDateForInput(range.from ?? today)}
+ max={formatDateForInput(today)}
+ value={range.to ? formatDateForInput(range.to) : ""}
+ onChange={(e) => {
+ const newDate = new Date(e.target.value);
+ if (!Number.isNaN(newDate.getTime())) {
+ onSelect({ ...range, to: newDate });
+ }
+ }}
+ disabled={!range.to}
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/development-indicator.tsx b/apps/status-page/src/components/development-indicator.tsx
new file mode 100644
index 000000000..c18acce86
--- /dev/null
+++ b/apps/status-page/src/components/development-indicator.tsx
@@ -0,0 +1,49 @@
+"use client";
+
+import { useIsMobile } from "@/hooks/use-mobile";
+import * as Portal from "@radix-ui/react-portal";
+import { Kbd } from "./common/kbd";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "./ui/tooltip";
+
+export function DevelopmentIndicator() {
+ const isMobile = useIsMobile();
+
+ if (process.env.NODE_ENV !== "production") return null;
+
+ return (
+ <Portal.Root>
+ <div className="pointer-events-none fixed inset-0 z-[9999] border-2 border-destructive" />
+ <div className="fixed inset-x-0 bottom-0 z-[9999] select-none">
+ <div className="flex items-center justify-center">
+ <TooltipProvider delayDuration={0}>
+ <Tooltip>
+ <TooltipTrigger>
+ <div className="w-fit rounded-t bg-destructive px-2 py-1 font-mono text-background text-xs">
+ In Beta
+ </div>
+ </TooltipTrigger>
+ <TooltipContent side="top">
+ {!isMobile ? (
+ <p>
+ Press{" "}
+ <Kbd variant="secondary" className="-me-0 ms-0">
+ F
+ </Kbd>{" "}
+ key to provide feedback.
+ </p>
+ ) : (
+ <p>Use a larger screen to provide feedback.</p>
+ )}
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ </div>
+ </Portal.Root>
+ );
+}
diff --git a/apps/status-page/src/components/icons/discord.tsx b/apps/status-page/src/components/icons/discord.tsx
new file mode 100644
index 000000000..440d493fe
--- /dev/null
+++ b/apps/status-page/src/components/icons/discord.tsx
@@ -0,0 +1,15 @@
+export function DiscordIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>Discord</title>
+ <path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/icons/github.tsx b/apps/status-page/src/components/icons/github.tsx
new file mode 100644
index 000000000..93fb97670
--- /dev/null
+++ b/apps/status-page/src/components/icons/github.tsx
@@ -0,0 +1,15 @@
+export function GitHubIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>GitHub</title>
+ <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/icons/google.tsx b/apps/status-page/src/components/icons/google.tsx
new file mode 100644
index 000000000..93a9b9b3c
--- /dev/null
+++ b/apps/status-page/src/components/icons/google.tsx
@@ -0,0 +1,15 @@
+export function GoogleIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>Google</title>
+ <path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/icons/opsgenie.tsx b/apps/status-page/src/components/icons/opsgenie.tsx
new file mode 100644
index 000000000..6bc29e1dc
--- /dev/null
+++ b/apps/status-page/src/components/icons/opsgenie.tsx
@@ -0,0 +1,15 @@
+export function OpsGenieIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>Opsgenie</title>
+ <path d="M12.002 0a5.988 5.988 0 1 1 0 11.975 5.988 5.988 0 0 1 0-11.975zm9.723 13.026h-.03l-4.527-2.242a.671.671 0 0 0-.876.268 22.408 22.408 0 0 1-4.306 5.217 22.407 22.407 0 0 1-4.286-5.2.671.671 0 0 0-.876-.269l-4.535 2.226h-.03a.671.671 0 0 0-.248.902 28.85 28.85 0 0 0 4.55 5.933l-.002.001c.024.025.05.048.075.072.335.335.676.664 1.027.981.081.074.165.144.247.217.315.278.632.555.96.82.144.117.295.227.441.341.277.216.552.434.837.639.44.318.888.625 1.346.917a.963.963 0 0 0 1.007.017c.487-.312.962-.64 1.428-.98.068-.05.132-.103.2-.153.358-.266.713-.537 1.06-.82.234-.19.46-.39.688-.588.17-.147.34-.291.506-.442.295-.268.58-.545.864-.825.061-.06.127-.118.188-.179l-.004-.002a28.852 28.852 0 0 0 4.565-5.949.671.671 0 0 0-.269-.902z" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/icons/pagerduty.tsx b/apps/status-page/src/components/icons/pagerduty.tsx
new file mode 100644
index 000000000..4681b18ae
--- /dev/null
+++ b/apps/status-page/src/components/icons/pagerduty.tsx
@@ -0,0 +1,15 @@
+export function PagerDutyIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>PagerDuty</title>
+ <path d="M16.965 1.18C15.085.164 13.769 0 10.683 0H3.73v14.55h6.926c2.743 0 4.8-.164 6.61-1.37 1.975-1.303 3.004-3.484 3.004-6.007 0-2.716-1.262-4.896-3.305-5.994zm-5.5 10.326h-4.21V3.113l3.977-.027c3.62-.028 5.43 1.234 5.43 4.128 0 3.113-2.248 4.292-5.197 4.292zM3.73 17.61h3.525V24H3.73Z" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/icons/slack.tsx b/apps/status-page/src/components/icons/slack.tsx
new file mode 100644
index 000000000..c5f2683c6
--- /dev/null
+++ b/apps/status-page/src/components/icons/slack.tsx
@@ -0,0 +1,15 @@
+export function SlackIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ stroke="currentColor"
+ fill="currentColor"
+ {...props}
+ >
+ <title>Slack</title>
+ <path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" />
+ </svg>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/community-themes.ts b/apps/status-page/src/components/status-page/community-themes.ts
new file mode 100644
index 000000000..b14c3acff
--- /dev/null
+++ b/apps/status-page/src/components/status-page/community-themes.ts
@@ -0,0 +1,117 @@
+export const defaultTheme = {
+ light: {} as React.CSSProperties,
+ dark: {} as React.CSSProperties,
+} as const;
+
+export const supabaseTheme = {
+ light: {
+ "--background": "oklch(99.11% 0 0)",
+ "--foreground": "oklch(20.46% 0 0)",
+ "--border": "oklch(90.37% 0 0)",
+ "--input": "oklch(90.37% 0 0)",
+
+ "--primary": "oklch(76.26% 0.154 159.27)",
+ "--primary-foreground": "oklch(20.46% 0 0)",
+ "--muted": "oklch(97.61% 0 0)",
+ "--muted-foreground": "oklch(54.52% 0 0)",
+ "--secondary": "oklch(97.61% 0 0)",
+ "--secondary-foreground": "oklch(20.46% 0 0)",
+ "--accent": "oklch(97.61% 0 0)",
+ "--accent-foreground": "oklch(20.46% 0 0)",
+
+ "--success": "oklch(76.26% 0.154 159.27)",
+ "--destructive": "oklch(62.71% 0.1936 33.34)",
+ "--warning": "oklch(81.69% 0.1639 75.84)",
+ "--info": "oklch(61.26% 0.218 283.85)",
+ } as React.CSSProperties,
+ dark: {
+ "--background": "oklch(18.22% 0 0)",
+ "--foreground": "oklch(98.51% 0 0)",
+ "--border": "oklch(30.12% 0 0)",
+ "--input": "oklch(30.12% 0 0)",
+
+ "--primary": "oklch(68.56% 0.1558 158.13)",
+ "--primary-foreground": "oklch(18.22% 0 0)",
+ "--muted": "oklch(26.03% 0 0)",
+ "--muted-foreground": "oklch(63.01% 0 0)",
+ "--secondary": "oklch(26.03% 0 0)",
+ "--secondary-foreground": "oklch(98.51% 0 0)",
+ "--accent": "oklch(26.03% 0 0)",
+ "--accent-foreground": "oklch(98.51% 0 0)",
+
+ "--success": "oklch(68.56% 0.1558 158.13)",
+ "--destructive": "oklch(62.71% 0.1936 33.34)",
+ "--warning": "oklch(70.84% 0.1523 71.24)",
+ "--info": "oklch(61.26% 0.218 283.85)",
+ } as React.CSSProperties,
+};
+
+export const githubTheme = {
+ light: {
+ "--background": "oklch(100% 0 0)",
+ "--foreground": "oklch(24.29% 0.0045 247.86)",
+ "--border": "oklch(85.86% 0.0054 251.18)",
+ "--input": "oklch(85.86% 0.0054 251.18)",
+
+ "--primary": "oklch(60.81% 0.1567 142.5)",
+ "--primary-foreground": "oklch(24.29% 0.0045 247.86)",
+ "--muted": "oklch(97.86% 0.0019 247.86)",
+ "--muted-foreground": "oklch(40.78% 0.0056 247.86)",
+ "--secondary": "oklch(97.86% 0.0019 247.86)",
+ "--secondary-foreground": "oklch(24.29% 0.0045 247.86)",
+ "--accent": "oklch(97.86% 0.0019 247.86)",
+ "--accent-foreground": "oklch(24.29% 0.0045 247.86)",
+
+ "--success": "oklch(60.81% 0.1567 142.5)",
+ "--destructive": "oklch(58.79% 0.1577 22.18)",
+ "--warning": "oklch(81.84% 0.1328 85.87)",
+ "--info": "oklch(45.2% 0.1445 252.03)",
+ } as React.CSSProperties,
+ dark: {
+ "--background": "oklch(10.39% 0.0194 248.34)",
+ "--foreground": "oklch(100% 0 0)",
+ "--border": "oklch(58.41% 0.011 252.87)",
+ "--input": "oklch(58.41% 0.011 252.87)",
+
+ "--primary": "oklch(54.34% 0.1634 145.98)",
+ "--primary-foreground": "oklch(100% 0 0)",
+ "--muted": "oklch(33.39% 0.0223 256.4)",
+ "--muted-foreground": "oklch(79.7% 0.0169 262.74)",
+ "--secondary": "oklch(33.39% 0.0223 256.4)",
+ "--secondary-foreground": "oklch(100% 0 0)",
+ "--accent": "oklch(33.39% 0.0223 256.4)",
+ "--accent-foreground": "oklch(100% 0 0)",
+
+ "--success": "oklch(54.34% 0.1634 145.98)",
+ "--destructive": "oklch(47.1% 0.1909 25.95)",
+ "--warning": "oklch(40.97% 0.2064 289.57)",
+ "--info": "oklch(46.96% 0.2957 264.51)",
+ } as React.CSSProperties,
+};
+
+export const THEMES = {
+ // supabase: supabaseTheme,
+ default: {
+ name: "Default",
+ author: { name: "@openstatus", url: "https://openstatus.dev" },
+ ...defaultTheme,
+ },
+ github: {
+ name: "Github",
+ author: { name: "@openstatus", url: "https://openstatus.dev" },
+ ...githubTheme,
+ },
+ supabase: {
+ name: "Supabase",
+ author: { name: "@supabase", url: "https://supabase.com" },
+ ...supabaseTheme,
+ },
+} as const satisfies Record<
+ string,
+ {
+ name: string;
+ author: { name: string; url: string };
+ light: React.CSSProperties;
+ dark: React.CSSProperties;
+ }
+>;
diff --git a/apps/status-page/src/components/status-page/floating-button.tsx b/apps/status-page/src/components/status-page/floating-button.tsx
new file mode 100644
index 000000000..1c06274ce
--- /dev/null
+++ b/apps/status-page/src/components/status-page/floating-button.tsx
@@ -0,0 +1,286 @@
+"use client";
+
+import { ThemeToggle } from "@/components/theme-toggle";
+import { Button } from "@/components/ui/button";
+import { Label } from "@/components/ui/label";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import { Separator } from "@/components/ui/separator";
+import { cn } from "@/lib/utils";
+import { Settings } from "lucide-react";
+import { useTheme } from "next-themes";
+import type React from "react";
+import { createContext, useContext, useEffect, useState } from "react";
+import { THEMES } from "./community-themes";
+
+export const VARIANT = ["success", "degraded", "error", "info"] as const;
+export type VariantType = (typeof VARIANT)[number];
+
+export const CARD_TYPE = ["duration", "requests", "dominant"] as const;
+export type CardType = (typeof CARD_TYPE)[number];
+
+export const BAR_TYPE = ["absolute", "dominant"] as const;
+export type BarType = (typeof BAR_TYPE)[number];
+
+export const COMMUNITY_THEME = ["default", "github", "supabase"] as const;
+export type CommunityTheme = (typeof COMMUNITY_THEME)[number];
+
+interface StatusPageContextType {
+ variant: VariantType;
+ setVariant: (variant: VariantType) => void;
+ cardType: CardType;
+ setCardType: (cardType: CardType) => void;
+ barType: BarType;
+ setBarType: (barType: BarType) => void;
+ showUptime: boolean;
+ setShowUptime: (showUptime: boolean) => void;
+ communityTheme: CommunityTheme;
+ setCommunityTheme: (communityTheme: CommunityTheme) => void;
+}
+
+const StatusPageContext = createContext<StatusPageContextType | null>(null);
+
+export function useStatusPage() {
+ const context = useContext(StatusPageContext);
+ if (!context) {
+ throw new Error("useStatusPage must be used within a StatusPageProvider");
+ }
+ return context;
+}
+
+export function StatusPageProvider({
+ children,
+ defaultVariant = "success",
+ defaultCardType = "duration",
+ defaultBarType = "absolute",
+ defaultShowUptime = true,
+ defaultCommunityTheme = "default",
+}: {
+ children: React.ReactNode;
+ defaultVariant?: VariantType;
+ defaultCardType?: CardType;
+ defaultBarType?: BarType;
+ defaultShowUptime?: boolean;
+ defaultCommunityTheme?: CommunityTheme;
+}) {
+ const [variant, setVariant] = useState<VariantType>(defaultVariant);
+ const [cardType, setCardType] = useState<CardType>(defaultCardType);
+ const [barType, setBarType] = useState<BarType>(defaultBarType);
+ const [showUptime, setShowUptime] = useState<boolean>(defaultShowUptime);
+ const { resolvedTheme } = useTheme();
+ const [communityTheme, setCommunityTheme] = useState<CommunityTheme>(
+ defaultCommunityTheme,
+ );
+
+ useEffect(() => {
+ const theme = resolvedTheme as "dark" | "light";
+ if (["dark", "light"].includes(theme)) {
+ Object.keys(THEMES[communityTheme][theme]).forEach((key) => {
+ const element = document.documentElement;
+ const value =
+ THEMES[communityTheme][theme][
+ key as keyof (typeof THEMES)[typeof communityTheme][typeof theme]
+ ];
+ if (value) {
+ element.style.setProperty(key, value as string);
+ }
+ });
+ }
+ if (communityTheme === "default") {
+ document.documentElement.removeAttribute("style");
+ }
+ }, [resolvedTheme, communityTheme]);
+
+ return (
+ <StatusPageContext.Provider
+ value={{
+ variant,
+ setVariant,
+ cardType,
+ setCardType,
+ barType,
+ setBarType,
+ showUptime,
+ setShowUptime,
+ communityTheme,
+ setCommunityTheme,
+ }}
+ >
+ <div
+ style={
+ communityTheme
+ ? THEMES[communityTheme][resolvedTheme as "dark" | "light"]
+ : undefined
+ }
+ >
+ {children}
+ </div>
+ </StatusPageContext.Provider>
+ );
+}
+
+export function FloatingButton({ className }: { className?: string }) {
+ const {
+ variant,
+ setVariant,
+ cardType,
+ setCardType,
+ barType,
+ setBarType,
+ showUptime,
+ setShowUptime,
+ communityTheme,
+ setCommunityTheme,
+ } = useStatusPage();
+
+ return (
+ <div className={cn("fixed right-4 bottom-4 z-50 bg-background", className)}>
+ <Popover>
+ <PopoverTrigger asChild>
+ <Button
+ size="icon"
+ variant="outline"
+ className="size-12 rounded-full"
+ >
+ <Settings className="size-5" />
+ <span className="sr-only">Open status page settings</span>
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent className="w-80 p-0" align="end">
+ <div className="space-y-4 p-4">
+ <div className="space-y-2">
+ <h4 className="font-medium leading-none">Status Page Settings</h4>
+ <p className="text-muted-foreground text-sm">
+ Configure the status page appearance
+ </p>
+ </div>
+ <div className="grid grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <Label htmlFor="status-variant">Status Variant</Label>
+ <Select
+ value={variant}
+ onValueChange={(v) => setVariant(v as VariantType)}
+ >
+ <SelectTrigger
+ id="status-variant"
+ className="w-full capitalize"
+ >
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {VARIANT.map((v) => (
+ <SelectItem key={v} value={v} className="capitalize">
+ {v}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="show-uptime">Show Uptime</Label>
+ <Select
+ value={showUptime ? "true" : "false"}
+ onValueChange={(v) => setShowUptime(v === "true")}
+ >
+ <SelectTrigger id="show-uptime" className="w-full capitalize">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {["true", "false"].map((v) => (
+ <SelectItem key={v} value={v} className="capitalize">
+ {v}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="card-type">Card Type</Label>
+ <Select
+ value={cardType}
+ onValueChange={(v) => setCardType(v as CardType)}
+ >
+ <SelectTrigger id="card-type" className="w-full capitalize">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {CARD_TYPE.map((v) => (
+ <SelectItem key={v} value={v} className="capitalize">
+ {v}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="bar-type">Bar Type</Label>
+ <Select
+ value={barType}
+ onValueChange={(v) => setBarType(v as BarType)}
+ >
+ <SelectTrigger id="bar-type" className="w-full capitalize">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {BAR_TYPE.map((v) => (
+ <SelectItem key={v} value={v} className="capitalize">
+ {v}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="theme">Theme</Label>
+ <ThemeToggle id="theme" className="w-full" />
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="community-theme">Community Theme</Label>
+ <Select
+ value={communityTheme}
+ onValueChange={(v) => setCommunityTheme(v as CommunityTheme)}
+ >
+ <SelectTrigger
+ id="community-theme"
+ className="w-full capitalize"
+ >
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {COMMUNITY_THEME.map((v) => (
+ <SelectItem key={v} value={v} className="capitalize">
+ {v}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ </div>
+ <Separator />
+ <div className="p-4">
+ <Button className="w-full" size="sm" asChild>
+ <a
+ href="https://github.com/openstatusHQ/openstatus-template"
+ target="_blank"
+ rel="noreferrer"
+ >
+ GitHub Repo
+ </a>
+ </Button>
+ </div>
+ </PopoverContent>
+ </Popover>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/messages.ts b/apps/status-page/src/components/status-page/messages.ts
new file mode 100644
index 000000000..538353f3b
--- /dev/null
+++ b/apps/status-page/src/components/status-page/messages.ts
@@ -0,0 +1,21 @@
+export const messages = {
+ long: {
+ success: "All Systems Operational",
+ degraded: "Degraded Performance",
+ error: "Downtime Performance",
+ info: "Maintenance",
+ },
+ short: {
+ success: "Operational",
+ degraded: "Degraded",
+ error: "Downtime",
+ info: "Maintenance",
+ },
+};
+
+export const requests = {
+ success: "Normal",
+ degraded: "Degraded",
+ error: "Error",
+ info: "Maintenance",
+};
diff --git a/apps/status-page/src/components/status-page/status-charts.tsx b/apps/status-page/src/components/status-page/status-charts.tsx
new file mode 100644
index 000000000..2083567ce
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-charts.tsx
@@ -0,0 +1,65 @@
+import { cn } from "@/lib/utils";
+
+export function StatusChartContent({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="status-chart-content"
+ className={cn("flex flex-col gap-3", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusChartHeader({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="status-chart-header"
+ className={cn("flex flex-col", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusChartTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="status-chart-title"
+ className={cn("font-medium text-base text-foreground", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusChartDescription({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="status-chart-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/status-events.tsx b/apps/status-page/src/components/status-page/status-events.tsx
new file mode 100644
index 000000000..e5918f715
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-events.tsx
@@ -0,0 +1,446 @@
+import { Badge } from "@/components/ui/badge";
+import { Separator } from "@/components/ui/separator";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { type Maintenance, maintenances } from "@/data/maintenances";
+import { type StatusReport, statusReports } from "@/data/status-reports";
+import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard";
+import { formatDate, formatTime } from "@/lib/formatter";
+import { cn } from "@/lib/utils";
+import { UTCDate } from "@date-fns/utc";
+import { HoverCardPortal } from "@radix-ui/react-hover-card";
+import {
+ format,
+ formatDistanceStrict,
+ formatDistanceToNowStrict,
+} from "date-fns";
+import { Check, Copy } from "lucide-react";
+import Link from "next/link";
+import {
+ HoverCard,
+ HoverCardContent,
+ HoverCardTrigger,
+} from "../ui/hover-card";
+
+const STATUS_LABELS = {
+ operational: "Resolved",
+ monitoring: "Monitoring",
+ identified: "Identified",
+ investigating: "Investigating",
+};
+
+// TODO: move to page level
+export function StatusEventsTabs() {
+ return (
+ <Tabs defaultValue="reports" className="gap-4">
+ <TabsList>
+ <TabsTrigger value="reports">Reports</TabsTrigger>
+ <TabsTrigger value="maintenances">Maintenances</TabsTrigger>
+ </TabsList>
+ <TabsContent value="reports" className="flex flex-col gap-4">
+ {statusReports.map((report) => (
+ <StatusEvent key={report.id}>
+ <StatusEventAside>
+ <span className="font-medium text-foreground/80">
+ {formatDate(report.startedAt, { month: "short" })}
+ </span>
+ </StatusEventAside>
+ <Link href="/status-page/events/report" className="rounded-lg">
+ <StatusEventContent>
+ <StatusEventTitle>{report.name}</StatusEventTitle>
+ <StatusEventAffected className="flex flex-wrap gap-1">
+ {report.affected.map((affected) => (
+ <Badge
+ key={affected}
+ variant="outline"
+ className="text-[10px]"
+ >
+ {affected}
+ </Badge>
+ ))}
+ </StatusEventAffected>
+ <StatusEventTimelineReport updates={report.updates} />
+ </StatusEventContent>
+ </Link>
+ </StatusEvent>
+ ))}
+ </TabsContent>
+ <TabsContent value="maintenances" className="flex flex-col gap-4">
+ {maintenances.map((maintenance) => {
+ const isFuture = maintenance.startDate > new Date();
+ return (
+ <StatusEvent key={maintenance.id}>
+ <StatusEventAside>
+ <span className="font-medium text-foreground/80">
+ {formatDate(maintenance.startDate, { month: "short" })}
+ </span>
+ {isFuture ? (
+ <span className="text-info text-sm">Upcoming</span>
+ ) : null}
+ </StatusEventAside>
+ <Link
+ href="/status-page/events/maintenance"
+ className="rounded-lg"
+ >
+ <StatusEventContent>
+ <StatusEventTitle>{maintenance.title}</StatusEventTitle>
+ <StatusEventAffected className="flex flex-wrap gap-1">
+ {maintenance.affected.map((affected) => (
+ <Badge
+ key={affected}
+ variant="outline"
+ className="text-[10px]"
+ >
+ {affected}
+ </Badge>
+ ))}
+ </StatusEventAffected>
+ <StatusEventTimelineMaintenance maintenance={maintenance} />
+ </StatusEventContent>
+ </Link>
+ </StatusEvent>
+ );
+ })}
+ </TabsContent>
+ </Tabs>
+ );
+}
+
+// TODO: rename file to status-event and move the `StatusEvents` component to the page level.
+
+export function StatusEvent({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("relative flex flex-col gap-2", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function StatusEventContent({
+ className,
+ hoverable = true,
+ children,
+ ...props
+}: React.ComponentProps<"div"> & {
+ hoverable?: boolean;
+}) {
+ // TODO: add Link
+ return (
+ <div
+ data-hoverable={hoverable}
+ className={cn(
+ "group -mx-3 -my-2 flex flex-col gap-2 rounded-lg border border-transparent px-3 py-2",
+ "data-[hoverable=true]:hover:cursor-pointer data-[hoverable=true]:hover:border-border/50 data-[hoverable=true]:hover:bg-muted/50",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusEventTitle({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("font-medium", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+// TODO: affected monitors
+export function StatusEventAffected({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("text-muted-foreground text-sm", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function StatusEventAside({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className="lg:-left-32 lg:absolute lg:top-0 lg:h-full">
+ <div
+ className={cn(
+ "flex flex-col gap-1 lg:sticky lg:top-0 lg:left-0",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ </div>
+ );
+}
+
+export function StatusEventTimelineReport({
+ className,
+ updates,
+ ...props
+}: React.ComponentProps<"div"> & {
+ updates: StatusReport["updates"];
+}) {
+ const startedAt = new Date(updates[0].date);
+ const endedAt = new Date(updates[updates.length - 1].date);
+ const duration = formatDistanceStrict(startedAt, endedAt);
+ return (
+ <div className={cn("text-muted-foreground text-sm", className)} {...props}>
+ {/* TODO: make sure they are sorted by date */}
+ {updates
+ .sort((a, b) => b.date.getTime() - a.date.getTime())
+ .map((update, index) => (
+ <StatusEventTimelineReportUpdate
+ key={update.id}
+ report={update}
+ duration={
+ index === 0 && update.status === "operational"
+ ? duration
+ : undefined
+ }
+ withSeparator={index !== updates.length - 1}
+ />
+ ))}
+ </div>
+ );
+}
+
+function StatusEventTimelineReportUpdate({
+ report,
+ duration,
+ withSeparator = true,
+}: {
+ report: StatusReport["updates"][number];
+ withSeparator?: boolean;
+ duration?: string;
+}) {
+ return (
+ <div data-variant={report.status} className="group">
+ <div className="flex flex-row items-center justify-between gap-2">
+ <div className="flex flex-row gap-2">
+ <div className="flex flex-col">
+ <div className="flex h-5 flex-col items-center justify-center">
+ <StatusEventTimelineDot />
+ </div>
+ {withSeparator ? <StatusEventTimelineSeparator /> : null}
+ </div>
+ <div className="mb-2">
+ <StatusEventTimelineTitle>
+ <span>{STATUS_LABELS[report.status]}</span>{" "}
+ <span className="font-mono text-muted-foreground/70 text-xs underline decoration-dashed underline-offset-2">
+ <StatusEventDateHoverCard date={new Date(report.date)}>
+ {formatTime(report.date)}
+ </StatusEventDateHoverCard>
+ </span>{" "}
+ {duration ? (
+ <span className="font-mono text-muted-foreground/70 text-xs">
+ (in {duration})
+ </span>
+ ) : null}
+ </StatusEventTimelineTitle>
+ <StatusEventTimelineMessage>
+ {report.message}
+ </StatusEventTimelineMessage>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export function StatusEventTimelineMaintenance({
+ maintenance,
+}: {
+ maintenance: Maintenance;
+}) {
+ const start = new Date(maintenance.startDate);
+ const end = new Date(maintenance.endDate);
+ const duration = formatDistanceStrict(start, end);
+ return (
+ <div data-variant="maintenance" className="group">
+ <div className="flex flex-row items-center justify-between gap-2">
+ <div className="flex flex-row gap-2">
+ <div className="flex flex-col">
+ <div className="flex h-5 flex-col items-center justify-center">
+ <StatusEventTimelineDot />
+ </div>
+ </div>
+ <div className="mb-2">
+ <StatusEventTimelineTitle>
+ <span>Maintenance</span>{" "}
+ <span className="font-mono text-muted-foreground/70 text-xs">
+ <span className="underline decoration-dashed underline-offset-2">
+ <StatusEventDateHoverCard date={new Date(start)}>
+ {formatTime(start)}
+ </StatusEventDateHoverCard>
+ </span>
+ {" - "}
+ <span className="underline decoration-dashed underline-offset-2">
+ <StatusEventDateHoverCard date={new Date(end)}>
+ {formatTime(end)}
+ </StatusEventDateHoverCard>
+ </span>
+ </span>{" "}
+ {duration ? (
+ <span className="font-mono text-muted-foreground/70 text-xs">
+ (for {duration})
+ </span>
+ ) : null}
+ </StatusEventTimelineTitle>
+ <StatusEventTimelineMessage>
+ {maintenance.message}
+ </StatusEventTimelineMessage>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export function StatusEventTimelineTitle({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn("font-medium text-foreground text-sm", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+// TODO: should support markdown
+export function StatusEventTimelineMessage({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("text-muted-foreground text-sm", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function StatusEventTimelineDot({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "size-2.5 shrink-0 rounded-full bg-muted",
+ "group-data-[variant=operational]:bg-success",
+ "group-data-[variant=monitoring]:bg-info",
+ "group-data-[variant=identified]:bg-warning",
+ "group-data-[variant=investigating]:bg-destructive",
+ "group-data-[variant=maintenance]:bg-info",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function StatusEventTimelineSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof Separator>) {
+ return (
+ <Separator
+ orientation="vertical"
+ className={cn(
+ "mx-auto flex-1",
+ "group-data-[variant=operational]:bg-success",
+ "group-data-[variant=monitoring]:bg-info",
+ "group-data-[variant=identified]:bg-warning",
+ "group-data-[variant=investigating]:bg-destructive",
+ "group-data-[variant=maintenance]:bg-info",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function StatusEventDateHoverCard({
+ date,
+ side = "right",
+ align = "start",
+ alignOffset = -4,
+ sideOffset,
+ children,
+}: React.ComponentProps<typeof HoverCardContent> & { date: Date }) {
+ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
+ return (
+ <HoverCard openDelay={0} closeDelay={0}>
+ {/* NOTE: the trigger is an `a` tag per default */}
+ <HoverCardTrigger asChild>
+ <span>{children}</span>
+ </HoverCardTrigger>
+ <HoverCardPortal>
+ <HoverCardContent
+ className="z-10 w-auto p-2"
+ {...{ side, align, alignOffset, sideOffset }}
+ >
+ <dl className="flex flex-col gap-1">
+ <Row value={format(date, "LLL dd, y HH:mm:ss")} label={timezone} />
+ <Row
+ value={format(new UTCDate(date), "LLL dd, y HH:mm:ss")}
+ label="UTC"
+ />
+ {/* <Row value={date.toISOString()} label="ISO" /> */}
+ {/* <Row value={String(date.getTime())} label="Timestamp" /> */}
+ <Row
+ value={formatDistanceToNowStrict(date, { addSuffix: true })}
+ label="Relative"
+ />
+ </dl>
+ </HoverCardContent>
+ </HoverCardPortal>
+ </HoverCard>
+ );
+}
+
+function Row({ value, label }: { value: string; label: string }) {
+ const { copy, isCopied } = useCopyToClipboard();
+
+ return (
+ <div
+ className="group flex items-center justify-between gap-4 text-sm"
+ onClick={(e) => {
+ e.stopPropagation();
+ copy(value, {});
+ }}
+ >
+ <dt className="text-muted-foreground">{label}</dt>
+ <dd className="flex items-center gap-1 truncate font-mono">
+ <span className="invisible group-hover:visible">
+ {!isCopied ? (
+ <Copy className="h-3 w-3" />
+ ) : (
+ <Check className="h-3 w-3" />
+ )}
+ </span>
+ {value}
+ </dd>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/status-monitor.tsx b/apps/status-page/src/components/status-page/status-monitor.tsx
new file mode 100644
index 000000000..b0fc1315a
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-monitor.tsx
@@ -0,0 +1,176 @@
+"use client";
+
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import type { Monitor } from "@/data/monitors";
+import { useMediaQuery } from "@/hooks/use-media-query";
+import { cn } from "@/lib/utils";
+import { formatDistanceToNowStrict } from "date-fns";
+import {
+ AlertCircleIcon,
+ CheckIcon,
+ InfoIcon,
+ TriangleAlertIcon,
+ WrenchIcon,
+} from "lucide-react";
+import { useState } from "react";
+import type { BarType, CardType, VariantType } from "./floating-button";
+import { StatusTracker } from "./status-tracker";
+import type { ChartData } from "./utils";
+
+export function StatusMonitor({
+ className,
+ variant = "success",
+ cardType = "duration",
+ barType = "absolute",
+ showUptime = true,
+ data,
+ monitor,
+ ...props
+}: React.ComponentProps<"div"> & {
+ variant?: VariantType;
+ cardType?: CardType;
+ barType?: BarType;
+ showUptime?: boolean;
+ monitor: Monitor;
+ data: ChartData[];
+}) {
+ return (
+ <div
+ data-slot="status-monitor"
+ data-variant={variant}
+ className={cn("group/monitor flex flex-col gap-1", className)}
+ {...props}
+ >
+ <div className="flex flex-row items-center justify-between gap-4">
+ <div className="flex flex-row items-center gap-2">
+ <StatusMonitorTitle>{monitor.name}</StatusMonitorTitle>
+ <StatusMonitorDescription>
+ {monitor.description}
+ </StatusMonitorDescription>
+ </div>
+ <div className="flex flex-row items-center gap-2">
+ {showUptime ? <StatusMonitorUptime /> : null}
+ <StatusMonitorIcon />
+ </div>
+ </div>
+ <StatusTracker cardType={cardType} barType={barType} data={data} />
+ <div
+ className={cn(
+ "flex flex-row items-center justify-between text-muted-foreground text-xs",
+ className,
+ )}
+ {...props}
+ >
+ <div>
+ {formatDistanceToNowStrict(new Date(data[0].timestamp), {
+ unit: "day",
+ })}
+ </div>
+ <div>today</div>
+ </div>
+ </div>
+ );
+}
+
+export function StatusMonitorTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("font-medium", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function StatusMonitorDescription({
+ onClick,
+ children,
+ ...props
+}: React.ComponentProps<typeof TooltipTrigger>) {
+ const isTouch = useMediaQuery("(hover: none)");
+ const [open, setOpen] = useState(false);
+
+ return (
+ <TooltipProvider delayDuration={0}>
+ <Tooltip open={open} onOpenChange={setOpen}>
+ <TooltipTrigger
+ onClick={(e) => {
+ if (isTouch) setOpen((prev) => !prev);
+ onClick?.(e);
+ }}
+ {...props}
+ >
+ <InfoIcon className="size-4 text-muted-foreground" />
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>{children}</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ );
+}
+export function StatusMonitorIcon({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex size-4 items-center justify-center rounded-full bg-muted text-background [&>svg]:size-2.5",
+ "group-data-[variant=success]/monitor:bg-success",
+ "group-data-[variant=degraded]/monitor:bg-warning",
+ "group-data-[variant=error]/monitor:bg-destructive",
+ "group-data-[variant=info]/monitor:bg-info",
+ className,
+ )}
+ {...props}
+ >
+ <CheckIcon className="hidden group-data-[variant=success]/monitor:block" />
+ <TriangleAlertIcon className="hidden group-data-[variant=degraded]/monitor:block" />
+ <AlertCircleIcon className="hidden group-data-[variant=error]/monitor:block" />
+ <WrenchIcon className="hidden group-data-[variant=info]/monitor:block" />
+ </div>
+ );
+}
+export function StatusMonitorUptime({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ {...props}
+ className={cn("font-mono text-muted-foreground text-sm", className)}
+ >
+ 99.90%
+ </div>
+ );
+}
+
+export function StatusMonitorStatus({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn(className)} {...props}>
+ <span className="hidden group-data-[variant=success]/monitor:block">
+ Operational
+ </span>
+ <span className="hidden group-data-[variant=degraded]/monitor:block">
+ Degraded
+ </span>
+ <span className="hidden group-data-[variant=error]/monitor:block">
+ Downtime
+ </span>
+ <span className="hidden group-data-[variant=info]/monitor:block">
+ Maintenance
+ </span>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/status-tracker-group.tsx b/apps/status-page/src/components/status-page/status-tracker-group.tsx
new file mode 100644
index 000000000..db5c81c4d
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-tracker-group.tsx
@@ -0,0 +1,53 @@
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
+import { cn } from "@/lib/utils";
+import type { VariantType } from "./floating-button";
+import { StatusMonitorIcon, StatusMonitorStatus } from "./status-monitor";
+
+export function StatusTrackerGroup({
+ children,
+ title,
+ variant,
+ className,
+ ...props
+}: React.ComponentProps<typeof CollapsibleTrigger> & {
+ title: string;
+ variant?: VariantType;
+}) {
+ return (
+ <Collapsible
+ className={cn(
+ "-mx-3",
+ "rounded-lg border border-transparent hover:border-border/50 hover:bg-muted/50 data-[state=open]:border-border/50 data-[state=open]:bg-muted/50",
+ className,
+ )}
+ >
+ <CollapsibleTrigger
+ className={cn(
+ "group/monitor flex w-full items-center justify-between gap-2 rounded-lg px-3 py-2 font-medium",
+ "cursor-pointer",
+ className,
+ )}
+ data-variant={variant}
+ {...props}
+ >
+ {title}
+ <div className="flex items-center gap-2">
+ <StatusMonitorStatus className="text-sm" />
+ <StatusMonitorIcon />
+ </div>
+ </CollapsibleTrigger>
+ <CollapsibleContent
+ className={cn(
+ "flex flex-col gap-3 border-border/50 border-t px-3 py-2",
+ "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
+ )}
+ >
+ {children}
+ </CollapsibleContent>
+ </Collapsible>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/status-tracker.tsx b/apps/status-page/src/components/status-page/status-tracker.tsx
new file mode 100644
index 000000000..6a66d1a68
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-tracker.tsx
@@ -0,0 +1,320 @@
+"use client";
+
+import { Kbd } from "@/components/common/kbd";
+import {
+ HoverCard,
+ HoverCardContent,
+ HoverCardTrigger,
+} from "@/components/ui/hover-card";
+import { Separator } from "@/components/ui/separator";
+// TODO: make it a property of the component
+import { statusReports } from "@/data/status-reports";
+import { useMediaQuery } from "@/hooks/use-media-query";
+import { formatDateRange } from "@/lib/formatter";
+import { formatDistanceStrict, isSameDay } from "date-fns";
+import Link from "next/link";
+import { useEffect, useRef, useState } from "react";
+import { type BarType, type CardType, VARIANT } from "./floating-button";
+import { messages, requests } from "./messages";
+import { type ChartData, chartConfig, getHighestPriorityStatus } from "./utils";
+
+// TODO: keyboard arrow navigation
+// FIXME: on small screens, avoid pinned state
+// TODO: only on real mobile devices, use click events
+// TODO: improve status reports -> add duration and time
+// TODO: support headless mode -> both card and bar type share only maintenance or degraded mode
+// TODO: support status page logo + onClick to homepage
+// TODO: widget type -> current status only | with status history
+
+const STATUS = VARIANT;
+
+export function StatusTracker({
+ cardType = "duration",
+ barType = "absolute",
+ data,
+}: {
+ cardType?: CardType;
+ barType?: BarType;
+ data: ChartData[];
+}) {
+ const [pinnedIndex, setPinnedIndex] = useState<number | null>(null);
+ const containerRef = useRef<HTMLDivElement>(null);
+ const isTouch = useMediaQuery("(hover: none)");
+
+ // Window-level Escape key listener
+ useEffect(() => {
+ const handleEscape = (e: KeyboardEvent) => {
+ if (e.key === "Escape" && pinnedIndex !== null) {
+ setPinnedIndex(null);
+ }
+ };
+
+ window.addEventListener("keydown", handleEscape);
+ return () => window.removeEventListener("keydown", handleEscape);
+ }, [pinnedIndex]);
+
+ // Document-level outside click listener
+ useEffect(() => {
+ const handleOutsideClick = (e: MouseEvent) => {
+ if (
+ pinnedIndex !== null &&
+ containerRef.current &&
+ !containerRef.current.contains(e.target as Node)
+ ) {
+ setPinnedIndex(null);
+ }
+ };
+
+ if (pinnedIndex !== null) {
+ document.addEventListener("mousedown", handleOutsideClick);
+ return () =>
+ document.removeEventListener("mousedown", handleOutsideClick);
+ }
+ }, [pinnedIndex]);
+
+ // Handle keyboard events for accessibility (kept for fallback)
+ const handleKeyDown = (e: React.KeyboardEvent) => {
+ if (e.key === "Escape") {
+ setPinnedIndex(null);
+ }
+ };
+
+ const handleBarClick = (index: number) => {
+ // Toggle pinned state: if clicking the same bar, unpin it; otherwise, pin the new bar
+ if (pinnedIndex === index) {
+ setPinnedIndex(null);
+ } else {
+ setPinnedIndex(index);
+ }
+ };
+
+ return (
+ <div
+ ref={containerRef}
+ className="flex h-[50px] w-full items-end"
+ onKeyDown={handleKeyDown}
+ // tabIndex={0}
+ >
+ {data.map((item, index) => {
+ const isPinned = pinnedIndex === index;
+
+ const reports = statusReports.filter((report) => {
+ const reportDate = new Date(report.startedAt);
+ const itemDate = new Date(item.timestamp);
+ return isSameDay(reportDate, itemDate);
+ });
+
+ return (
+ <HoverCard
+ key={item.timestamp}
+ openDelay={0}
+ closeDelay={0}
+ open={isPinned ? true : undefined}
+ >
+ <HoverCardTrigger asChild>
+ <div
+ className="group relative flex h-full w-full cursor-pointer flex-col px-px transition-opacity hover:opacity-80" // sm:px-0.5
+ onClick={() => handleBarClick(index)}
+ >
+ {(() => {
+ switch (barType) {
+ case "absolute":
+ return <StatusTrackerTriggerAbsolute item={item} />;
+ case "dominant":
+ return <StatusTrackerTriggerDominant item={item} />;
+ default:
+ return null;
+ }
+ })()}
+ </div>
+ </HoverCardTrigger>
+ <HoverCardContent side="top" align="center" className="w-auto p-0">
+ <div>
+ <div className="p-2 text-xs">
+ {new Date(item.timestamp).toLocaleDateString("default", {
+ day: "numeric",
+ month: "short",
+ })}
+ </div>
+ <Separator />
+ <div className="space-y-1 p-2 text-sm">
+ {(() => {
+ switch (cardType) {
+ case "duration":
+ return <StatusTrackerContentDuration item={item} />;
+ case "dominant":
+ return <StatusTrackerContentDominant item={item} />;
+ case "requests":
+ return <StatusTrackerContentRequests item={item} />;
+ default:
+ return null;
+ }
+ })()}
+ </div>
+ {reports.length > 0 ? (
+ <>
+ <Separator />
+ <div className="p-2">
+ {reports.map((report) => {
+ const updates = report.updates.sort(
+ (a, b) => a.date.getTime() - b.date.getTime(),
+ );
+ const startedAt = new Date(updates[0].date);
+ const endedAt = new Date(
+ updates[updates.length - 1].date,
+ );
+ const duration = formatDistanceStrict(
+ startedAt,
+ endedAt,
+ );
+ return (
+ <Link
+ key={report.id}
+ href="/status-page/events/report"
+ >
+ <div className="group relative text-sm">
+ {/* NOTE: this is to make the text truncate based on the with of the sibling element */}
+ {/* REMINDER: height needs to be equal the text height */}
+ <div className="h-4 w-full" />
+ <div className="absolute inset-0 text-muted-foreground hover:text-foreground">
+ <div className="truncate">{report.name}</div>
+ </div>
+ <div className="mt-1 text-muted-foreground text-xs">
+ {formatDateRange(startedAt, endedAt)}{" "}
+ <span className="ml-1.5 font-mono text-muted-foreground/70">
+ {duration}
+ </span>
+ </div>
+ </div>
+ </Link>
+ );
+ })}
+ </div>
+ </>
+ ) : null}
+ {isPinned && !isTouch && (
+ <>
+ <Separator />
+ <div className="flex cursor-pointer items-center p-2 text-muted-foreground text-xs">
+ <span>Click again to unpin</span>
+ <Kbd>Esc</Kbd>
+ </div>
+ </>
+ )}
+ </div>
+ </HoverCardContent>
+ </HoverCard>
+ );
+ })}
+ </div>
+ );
+}
+
+function StatusTrackerTriggerAbsolute({ item }: { item: ChartData }) {
+ const total = item.success + item.degraded + item.info + item.error;
+
+ return STATUS.map((status) => {
+ const value = item[status as keyof typeof item] as number;
+ if (value === 0) return null;
+ const heightPercentage = (value / total) * 100;
+ return (
+ <div
+ key={`${item.timestamp}-${status}`}
+ className="w-full transition-all"
+ style={{
+ height: `${heightPercentage}%`,
+ backgroundColor: chartConfig[status].color,
+ // IDEA: only for status === "success", make the color less pop to emphasize the other statuses
+ }}
+ />
+ );
+ });
+}
+
+function StatusTrackerTriggerDominant({ item }: { item: ChartData }) {
+ const highestPriorityStatus = getHighestPriorityStatus(item);
+
+ return (
+ <div
+ key={`${item.timestamp}-${highestPriorityStatus}`}
+ className="w-full transition-all"
+ style={{
+ height: "100%",
+ backgroundColor: chartConfig[highestPriorityStatus].color,
+ }}
+ />
+ );
+}
+
+function StatusTrackerContentDuration({ item }: { item: ChartData }) {
+ return STATUS.map((status) => {
+ const value = item[status];
+ if (value === 0) return null;
+
+ // const percentage = ((value / total) * 100).toFixed(1);
+
+ const now = new Date();
+ const duration = formatDistanceStrict(
+ now,
+ new Date(now.getTime() + value * 60 * 1000),
+ );
+
+ return (
+ <div key={status} className="flex items-baseline gap-4">
+ <div className="flex items-center gap-2">
+ <div
+ className="h-2.5 w-2.5 rounded-sm"
+ style={{
+ backgroundColor: chartConfig[status].color,
+ }}
+ />
+ <div className="text-sm">{messages.short[status]}</div>
+ </div>
+ <div className="ml-auto font-mono text-muted-foreground text-xs tracking-tight">
+ {duration}
+ </div>
+ </div>
+ );
+ });
+}
+
+function StatusTrackerContentDominant({ item }: { item: ChartData }) {
+ const highestPriorityStatus = getHighestPriorityStatus(item);
+ return (
+ <div className="flex min-w-32 items-baseline gap-4">
+ <div className="flex items-center gap-2">
+ <div
+ className="h-2.5 w-2.5 rounded-sm"
+ style={{
+ backgroundColor: chartConfig[highestPriorityStatus].color,
+ }}
+ />
+ <div className="text-sm">{messages.short[highestPriorityStatus]}</div>
+ </div>
+ </div>
+ );
+}
+
+function StatusTrackerContentRequests({ item }: { item: ChartData }) {
+ return STATUS.map((status) => {
+ const value = item[status];
+ if (value === 0) return null;
+
+ return (
+ <div key={status} className="flex items-baseline gap-4">
+ <div className="flex items-center gap-2">
+ <div
+ className="h-2.5 w-2.5 rounded-sm"
+ style={{
+ backgroundColor: chartConfig[status].color,
+ }}
+ />
+ <div className="text-sm">{requests[status]}</div>
+ </div>
+ <div className="ml-auto font-mono text-muted-foreground text-xs tracking-tight">
+ {value} req
+ </div>
+ </div>
+ );
+ });
+}
diff --git a/apps/status-page/src/components/status-page/status-updates.tsx b/apps/status-page/src/components/status-page/status-updates.tsx
new file mode 100644
index 000000000..386877601
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status-updates.tsx
@@ -0,0 +1,96 @@
+import { Button } from "@/components/ui/button";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard";
+import { cn } from "@/lib/utils";
+import { Input } from "../ui/input";
+
+export function StatusUpdates({
+ className,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ return (
+ <Popover>
+ <PopoverTrigger asChild>
+ <Button
+ size="sm"
+ variant="outline"
+ className={cn(className)}
+ {...props}
+ >
+ Get updates
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent align="end" className="overflow-hidden p-0">
+ <Tabs defaultValue="email">
+ <TabsList className="w-full rounded-none border-b">
+ <TabsTrigger value="email">Email</TabsTrigger>
+ <TabsTrigger value="rss">RSS</TabsTrigger>
+ <TabsTrigger value="atom">Atom</TabsTrigger>
+ </TabsList>
+ <TabsContent value="email" className="flex flex-col gap-2">
+ <div className="flex flex-col gap-2 border-b px-2 pb-2">
+ <p className="text-foreground text-sm">
+ Get email notifications whenever a report has been created or
+ resolved
+ </p>
+ <Input placeholder="[email protected]" />
+ </div>
+ <div className="px-2 pb-2">
+ <Button className="w-full">Subscribe</Button>
+ </div>
+ </TabsContent>
+ <TabsContent value="rss" className="flex flex-col gap-2">
+ <div className="border-b px-2 pb-2">
+ <Input
+ placeholder="https://status.openstatus.dev/feed/rss"
+ className="disabled:opacity-90"
+ disabled
+ />
+ </div>
+ <div className="px-2 pb-2">
+ <CopyButton
+ className="w-full"
+ value="https://status.openstatus.dev/feed/rss"
+ />
+ </div>
+ </TabsContent>
+ <TabsContent value="atom" className="flex flex-col gap-2">
+ <div className="border-b px-2 pb-2">
+ <Input
+ placeholder="https://status.openstatus.dev/feed/atom"
+ className="disabled:opacity-90"
+ disabled
+ />
+ </div>
+ <div className="px-2 pb-2">
+ <CopyButton
+ className="w-full"
+ value="https://status.openstatus.dev/feed/atom"
+ />
+ </div>
+ </TabsContent>
+ </Tabs>
+ </PopoverContent>
+ </Popover>
+ );
+}
+
+function CopyButton({
+ value,
+ className,
+}: {
+ value: string;
+ className?: string;
+}) {
+ const { copy, isCopied } = useCopyToClipboard();
+ return (
+ <Button size="sm" className={className} onClick={() => copy(value, {})}>
+ {isCopied ? "Copied" : "Copy link"}
+ </Button>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/status.tsx b/apps/status-page/src/components/status-page/status.tsx
new file mode 100644
index 000000000..d4b356117
--- /dev/null
+++ b/apps/status-page/src/components/status-page/status.tsx
@@ -0,0 +1,233 @@
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { cn } from "@/lib/utils";
+import { UTCDate } from "@date-fns/utc";
+import { format } from "date-fns";
+import {
+ AlertCircleIcon,
+ CheckIcon,
+ TriangleAlertIcon,
+ WrenchIcon,
+} from "lucide-react";
+import { messages } from "./messages";
+
+export function Status({
+ children,
+ className,
+ variant = "success",
+ ...props
+}: React.ComponentProps<"div"> & {
+ variant?: "success" | "degraded" | "error" | "info";
+}) {
+ return (
+ <div
+ data-variant={variant}
+ data-slot="status"
+ className={cn("group peer flex flex-col gap-8", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusBrand({
+ src,
+ alt,
+ className,
+ ...props
+}: React.ComponentProps<"img">) {
+ return (
+ // biome-ignore lint/a11y/useAltText: <explanation>
+ <img src={src} alt={alt} className={cn("size-8", className)} {...props} />
+ );
+}
+
+export function StatusHeader({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="status-header"
+ className={cn("@container/status-header", className)}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "font-semibold text-foreground text-lg leading-none",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusDescription({
+ children,
+ className,
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("text-muted-foreground", className)}>{children}</div>
+ );
+}
+
+export function StatusContent({
+ children,
+ className,
+}: React.ComponentProps<"div">) {
+ return <div className={cn("flex flex-col gap-3", className)}>{children}</div>;
+}
+
+export function StatusBanner({ className }: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex items-center gap-3 rounded-lg border px-3 py-2",
+ "group-data-[variant=success]:border-success/20 group-data-[variant=success]:bg-success/10",
+ "group-data-[variant=degraded]:border-warning/20 group-data-[variant=degraded]:bg-warning/10",
+ "group-data-[variant=error]:border-destructive/20 group-data-[variant=error]:bg-destructive/10",
+ "group-data-[variant=info]:border-info/20 group-data-[variant=info]:bg-info/10",
+ className,
+ )}
+ >
+ <StatusIcon className="flex-shrink-0" />
+ <div className="flex flex-1 flex-wrap items-center justify-between gap-2">
+ <StatusBannerMessage className="font-semibold text-xl" />
+ <StatusTimestamp date={new Date()} className="text-xs" />
+ </div>
+ </div>
+ );
+}
+
+export function StatusBannerMessage({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn(className)} {...props}>
+ <span className="hidden group-data-[variant=success]:block">
+ {messages.long.success}
+ </span>
+ <span className="hidden group-data-[variant=degraded]:block">
+ {messages.long.degraded}
+ </span>
+ <span className="hidden group-data-[variant=error]:block">
+ {messages.long.error}
+ </span>
+ <span className="hidden group-data-[variant=info]:block">
+ {messages.long.info}
+ </span>
+ </div>
+ );
+}
+
+export function StatusIcon({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex size-7 items-center justify-center rounded-full bg-muted text-background [&>svg]:size-4",
+ "group-data-[variant=success]:bg-success",
+ "group-data-[variant=degraded]:bg-warning",
+ "group-data-[variant=error]:bg-destructive",
+ "group-data-[variant=info]:bg-info",
+ className,
+ )}
+ {...props}
+ >
+ <CheckIcon className="hidden group-data-[variant=success]:block" />
+ <TriangleAlertIcon className="hidden group-data-[variant=degraded]:block" />
+ <AlertCircleIcon className="hidden group-data-[variant=error]:block" />
+ <WrenchIcon className="hidden group-data-[variant=info]:block" />
+ </div>
+ );
+}
+
+export function StatusTimestamp({
+ date,
+ className,
+ ...props
+}: React.ComponentProps<typeof TooltipTrigger> & { date: Date }) {
+ return (
+ <TooltipProvider>
+ <Tooltip>
+ {/* TODO: add outline focus */}
+ <TooltipTrigger
+ className={cn(
+ "font-mono text-muted-foreground underline decoration-muted-foreground/30 decoration-dashed underline-offset-4",
+ className,
+ )}
+ {...props}
+ >
+ {format(new UTCDate(date), "LLL dd, y HH:mm (z)")}
+ </TooltipTrigger>
+ <TooltipContent>
+ <p className="font-mono">{format(date, "LLL dd, y HH:mm (z)")}</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ );
+}
+
+export function StatusEmptyState({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex flex-col items-center justify-center gap-0.5 rounded-lg border border-dashed px-3 py-2 text-center",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function StatusEmptyStateTitle({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("font-medium", className)} {...props}>
+ {children}
+ </div>
+ );
+}
+
+export function StatusEmptyStateDescription({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("text-muted-foreground text-sm", className)} {...props}>
+ {children}
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/status-page/utils.ts b/apps/status-page/src/components/status-page/utils.ts
new file mode 100644
index 000000000..2d62cbdae
--- /dev/null
+++ b/apps/status-page/src/components/status-page/utils.ts
@@ -0,0 +1,84 @@
+import type { ChartConfig } from "@/components/ui/chart";
+import { VARIANT } from "./floating-button";
+
+export const chartData = Array.from({ length: 45 }, (_, i) => {
+ const date = new Date();
+ date.setDate(date.getDate() - i);
+
+ // Simulate realistic daily status distribution that sums to 1440 minutes
+ let error = 0;
+ let degraded = 0;
+ let success = 1440; // Start with all minutes as ok
+ let info = 0;
+
+ // Simulate some incidents on certain days
+ if (i === 3) {
+ // Day 3: Major incident for 2 hours (120 minutes)
+ error = 120;
+ success -= error;
+ } else if (i === 16) {
+ // Day 16: Degraded performance for 4 hours (240 minutes)
+ degraded = 240;
+ success -= degraded;
+ } else if (i === 8) {
+ // Day 8: Brief outage (30 minutes) + some degraded performance (60 minutes)
+ error = 30;
+ degraded = 60;
+ success -= error + degraded;
+ } else if (i === 13) {
+ info = 120;
+ success -= info;
+ } else if (i === 22) {
+ // Day 22: Extended degraded performance (6 hours = 360 minutes)
+ degraded = 360;
+ success -= degraded;
+ } else if (Math.random() > 0.85) {
+ // Random minor issues on some days (5-15 minutes of degraded performance)
+ degraded = Math.floor(Math.random() * 10) + 5;
+ success -= degraded;
+ }
+
+ return {
+ timestamp: date.getTime(),
+ info,
+ degraded,
+ error,
+ success,
+ };
+}).reverse();
+
+export type ChartData = (typeof chartData)[number];
+
+export const chartConfig = {
+ success: {
+ label: "success",
+ color: "var(--success)",
+ },
+ degraded: {
+ label: "degraded",
+ color: "var(--warning)",
+ },
+ error: {
+ label: "error",
+ color: "var(--destructive)",
+ },
+ info: {
+ label: "info",
+ color: "var(--info)",
+ },
+} satisfies ChartConfig;
+
+export const PRIORITY = {
+ error: 3,
+ degraded: 2,
+ info: 1,
+ success: 0,
+} as const; // satisfies Record<XXX, number>;
+
+export function getHighestPriorityStatus(item: ChartData) {
+ return (
+ VARIANT.filter((status) => item[status] > 0).sort(
+ (a, b) => PRIORITY[b] - PRIORITY[a],
+ )[0] || "success"
+ );
+}
diff --git a/apps/status-page/src/components/tailwind-indicator.tsx b/apps/status-page/src/components/tailwind-indicator.tsx
new file mode 100644
index 000000000..ab3464364
--- /dev/null
+++ b/apps/status-page/src/components/tailwind-indicator.tsx
@@ -0,0 +1,14 @@
+export function TailwindIndicator() {
+ if (process.env.NODE_ENV === "production") return null;
+
+ return (
+ <div className="fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-foreground p-3 font-mono text-background text-xs">
+ <div className="block sm:hidden">xs</div>
+ <div className="hidden sm:block md:hidden">sm</div>
+ <div className="hidden md:block lg:hidden">md</div>
+ <div className="hidden lg:block xl:hidden">lg</div>
+ <div className="hidden xl:block 2xl:hidden">xl</div>
+ <div className="hidden 2xl:block">2xl</div>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/theme-provider.tsx b/apps/status-page/src/components/theme-provider.tsx
new file mode 100644
index 000000000..6459132f4
--- /dev/null
+++ b/apps/status-page/src/components/theme-provider.tsx
@@ -0,0 +1,11 @@
+"use client";
+
+import { ThemeProvider as NextThemesProvider } from "next-themes";
+import type * as React from "react";
+
+export function ThemeProvider({
+ children,
+ ...props
+}: React.ComponentProps<typeof NextThemesProvider>) {
+ return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
+}
diff --git a/apps/status-page/src/components/theme-toggle.tsx b/apps/status-page/src/components/theme-toggle.tsx
new file mode 100644
index 000000000..422d42ae8
--- /dev/null
+++ b/apps/status-page/src/components/theme-toggle.tsx
@@ -0,0 +1,67 @@
+"use client";
+
+import { useTheme } from "next-themes";
+import type * as React from "react";
+
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import { cn } from "@/lib/utils";
+import { Laptop, Moon, Sun } from "lucide-react";
+import { useState } from "react";
+import { useEffect } from "react";
+
+export function ThemeToggle({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectTrigger>) {
+ const { setTheme, theme } = useTheme();
+ const [mounted, setMounted] = useState(false);
+
+ useEffect(() => {
+ setMounted(true);
+ }, []);
+
+ // NOTE: hydration error if we don't do this
+ if (!mounted) {
+ return (
+ <Select>
+ <SelectTrigger className={cn("w-[180px]", className)} {...props}>
+ <SelectValue placeholder="Select theme" />
+ </SelectTrigger>
+ </Select>
+ );
+ }
+
+ return (
+ <Select value={theme} onValueChange={setTheme}>
+ <SelectTrigger className={cn("w-[180px]", className)} {...props}>
+ <SelectValue defaultValue={theme} placeholder="Select theme" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="light">
+ <div className="flex items-center gap-2">
+ <Sun className="h-4 w-4" />
+ <span>Light</span>
+ </div>
+ </SelectItem>
+ <SelectItem value="dark">
+ <div className="flex items-center gap-2">
+ <Moon className="h-4 w-4" />
+ <span>Dark</span>
+ </div>
+ </SelectItem>
+ <SelectItem value="system">
+ <div className="flex items-center gap-2">
+ <Laptop className="h-4 w-4" />
+ <span>System</span>
+ </div>
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ );
+}
diff --git a/apps/status-page/src/components/ui/alert-dialog.tsx b/apps/status-page/src/components/ui/alert-dialog.tsx
new file mode 100644
index 000000000..d8e1d34ed
--- /dev/null
+++ b/apps/status-page/src/components/ui/alert-dialog.tsx
@@ -0,0 +1,157 @@
+"use client";
+
+import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
+import type * as React from "react";
+
+import { buttonVariants } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+
+function AlertDialog({
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
+}
+
+function AlertDialogTrigger({
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
+ return (
+ <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
+ );
+}
+
+function AlertDialogPortal({
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
+ return (
+ <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
+ );
+}
+
+function AlertDialogOverlay({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
+ return (
+ <AlertDialogPrimitive.Overlay
+ data-slot="alert-dialog-overlay"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogContent({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
+ return (
+ <AlertDialogPortal>
+ <AlertDialogOverlay />
+ <AlertDialogPrimitive.Content
+ data-slot="alert-dialog-content"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",
+ className,
+ )}
+ {...props}
+ />
+ </AlertDialogPortal>
+ );
+}
+
+function AlertDialogHeader({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="alert-dialog-header"
+ className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogFooter({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="alert-dialog-footer"
+ className={cn(
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogTitle({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
+ return (
+ <AlertDialogPrimitive.Title
+ data-slot="alert-dialog-title"
+ className={cn("font-semibold text-lg", className)}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogDescription({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
+ return (
+ <AlertDialogPrimitive.Description
+ data-slot="alert-dialog-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogAction({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
+ return (
+ <AlertDialogPrimitive.Action
+ className={cn(buttonVariants(), className)}
+ {...props}
+ />
+ );
+}
+
+function AlertDialogCancel({
+ className,
+ ...props
+}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
+ return (
+ <AlertDialogPrimitive.Cancel
+ className={cn(buttonVariants({ variant: "outline" }), className)}
+ {...props}
+ />
+ );
+}
+
+export {
+ AlertDialog,
+ AlertDialogPortal,
+ AlertDialogOverlay,
+ AlertDialogTrigger,
+ AlertDialogContent,
+ AlertDialogHeader,
+ AlertDialogFooter,
+ AlertDialogTitle,
+ AlertDialogDescription,
+ AlertDialogAction,
+ AlertDialogCancel,
+};
diff --git a/apps/status-page/src/components/ui/alert.tsx b/apps/status-page/src/components/ui/alert.tsx
new file mode 100644
index 000000000..4f74e7b2b
--- /dev/null
+++ b/apps/status-page/src/components/ui/alert.tsx
@@ -0,0 +1,66 @@
+import { type VariantProps, cva } from "class-variance-authority";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+const alertVariants = cva(
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
+ {
+ variants: {
+ variant: {
+ default: "bg-card text-card-foreground",
+ destructive:
+ "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ },
+);
+
+function Alert({
+ className,
+ variant,
+ ...props
+}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
+ return (
+ <div
+ data-slot="alert"
+ role="alert"
+ className={cn(alertVariants({ variant }), className)}
+ {...props}
+ />
+ );
+}
+
+function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="alert-title"
+ className={cn(
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function AlertDescription({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="alert-description"
+ className={cn(
+ "col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Alert, AlertTitle, AlertDescription };
diff --git a/apps/status-page/src/components/ui/avatar.tsx b/apps/status-page/src/components/ui/avatar.tsx
new file mode 100644
index 000000000..98e4243f8
--- /dev/null
+++ b/apps/status-page/src/components/ui/avatar.tsx
@@ -0,0 +1,53 @@
+"use client";
+
+import * as AvatarPrimitive from "@radix-ui/react-avatar";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Avatar({
+ className,
+ ...props
+}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
+ return (
+ <AvatarPrimitive.Root
+ data-slot="avatar"
+ className={cn(
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function AvatarImage({
+ className,
+ ...props
+}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
+ return (
+ <AvatarPrimitive.Image
+ data-slot="avatar-image"
+ className={cn("aspect-square size-full", className)}
+ {...props}
+ />
+ );
+}
+
+function AvatarFallback({
+ className,
+ ...props
+}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
+ return (
+ <AvatarPrimitive.Fallback
+ data-slot="avatar-fallback"
+ className={cn(
+ "flex size-full items-center justify-center rounded-full bg-muted",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Avatar, AvatarImage, AvatarFallback };
diff --git a/apps/status-page/src/components/ui/badge.tsx b/apps/status-page/src/components/ui/badge.tsx
new file mode 100644
index 000000000..e5ffef1c2
--- /dev/null
+++ b/apps/status-page/src/components/ui/badge.tsx
@@ -0,0 +1,43 @@
+import { Slot } from "@radix-ui/react-slot";
+import { type VariantProps, cva } from "class-variance-authority";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+const badgeVariants = cva(
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
+ {
+ variants: {
+ variant: {
+ default:
+ "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
+ secondary:
+ "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
+ destructive:
+ "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
+ outline:
+ "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ },
+);
+
+export type BadgeProps = React.ComponentProps<"span"> &
+ VariantProps<typeof badgeVariants> & { asChild?: boolean };
+
+function Badge({ className, variant, asChild = false, ...props }: BadgeProps) {
+ const Comp = asChild ? Slot : "span";
+
+ return (
+ <Comp
+ data-slot="badge"
+ className={cn(badgeVariants({ variant }), className)}
+ {...props}
+ />
+ );
+}
+
+export { Badge, badgeVariants };
diff --git a/apps/status-page/src/components/ui/breadcrumb.tsx b/apps/status-page/src/components/ui/breadcrumb.tsx
new file mode 100644
index 000000000..95e809620
--- /dev/null
+++ b/apps/status-page/src/components/ui/breadcrumb.tsx
@@ -0,0 +1,109 @@
+import { Slot } from "@radix-ui/react-slot";
+import { ChevronRight, MoreHorizontal } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
+ return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
+}
+
+function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
+ return (
+ <ol
+ data-slot="breadcrumb-list"
+ className={cn(
+ "flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
+ return (
+ <li
+ data-slot="breadcrumb-item"
+ className={cn("inline-flex items-center gap-1.5", className)}
+ {...props}
+ />
+ );
+}
+
+function BreadcrumbLink({
+ asChild,
+ className,
+ ...props
+}: React.ComponentProps<"a"> & {
+ asChild?: boolean;
+}) {
+ const Comp = asChild ? Slot : "a";
+
+ return (
+ <Comp
+ data-slot="breadcrumb-link"
+ className={cn("transition-colors hover:text-foreground", className)}
+ {...props}
+ />
+ );
+}
+
+function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="breadcrumb-page"
+ role="link"
+ aria-disabled="true"
+ aria-current="page"
+ className={cn("font-normal text-foreground", className)}
+ {...props}
+ />
+ );
+}
+
+function BreadcrumbSeparator({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<"li">) {
+ return (
+ <li
+ data-slot="breadcrumb-separator"
+ role="presentation"
+ aria-hidden="true"
+ className={cn("[&>svg]:size-3.5", className)}
+ {...props}
+ >
+ {children ?? <ChevronRight />}
+ </li>
+ );
+}
+
+function BreadcrumbEllipsis({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="breadcrumb-ellipsis"
+ role="presentation"
+ aria-hidden="true"
+ className={cn("flex size-9 items-center justify-center", className)}
+ {...props}
+ >
+ <MoreHorizontal className="size-4" />
+ <span className="sr-only">More</span>
+ </span>
+ );
+}
+
+export {
+ Breadcrumb,
+ BreadcrumbList,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+ BreadcrumbEllipsis,
+};
diff --git a/apps/status-page/src/components/ui/button.tsx b/apps/status-page/src/components/ui/button.tsx
new file mode 100644
index 000000000..11621b95f
--- /dev/null
+++ b/apps/status-page/src/components/ui/button.tsx
@@ -0,0 +1,59 @@
+import { Slot } from "@radix-ui/react-slot";
+import { type VariantProps, cva } from "class-variance-authority";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
+ {
+ variants: {
+ variant: {
+ default:
+ "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
+ destructive:
+ "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
+ outline:
+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
+ secondary:
+ "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
+ ghost:
+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
+ link: "text-primary underline-offset-4 hover:underline",
+ },
+ size: {
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
+ icon: "size-9",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ },
+);
+
+function Button({
+ className,
+ variant,
+ size,
+ asChild = false,
+ ...props
+}: React.ComponentProps<"button"> &
+ VariantProps<typeof buttonVariants> & {
+ asChild?: boolean;
+ }) {
+ const Comp = asChild ? Slot : "button";
+
+ return (
+ <Comp
+ data-slot="button"
+ className={cn(buttonVariants({ variant, size, className }))}
+ {...props}
+ />
+ );
+}
+
+export { Button, buttonVariants };
diff --git a/apps/status-page/src/components/ui/calendar.tsx b/apps/status-page/src/components/ui/calendar.tsx
new file mode 100644
index 000000000..07f4a92b9
--- /dev/null
+++ b/apps/status-page/src/components/ui/calendar.tsx
@@ -0,0 +1,75 @@
+"use client";
+
+import { ChevronLeft, ChevronRight } from "lucide-react";
+import type * as React from "react";
+import { DayPicker } from "react-day-picker";
+
+import { buttonVariants } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+
+function Calendar({
+ className,
+ classNames,
+ showOutsideDays = true,
+ ...props
+}: React.ComponentProps<typeof DayPicker>) {
+ return (
+ <DayPicker
+ showOutsideDays={showOutsideDays}
+ className={cn("p-3", className)}
+ classNames={{
+ months: "flex flex-col sm:flex-row gap-2",
+ month: "flex flex-col gap-4",
+ caption: "flex justify-center pt-1 relative items-center w-full",
+ caption_label: "text-sm font-medium",
+ nav: "flex items-center gap-1",
+ nav_button: cn(
+ buttonVariants({ variant: "outline" }),
+ "size-7 bg-transparent p-0 opacity-50 hover:opacity-100",
+ ),
+ nav_button_previous: "absolute left-1",
+ nav_button_next: "absolute right-1",
+ table: "w-full border-collapse space-x-1",
+ head_row: "flex",
+ head_cell:
+ "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
+ row: "flex w-full mt-2",
+ cell: cn(
+ "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",
+ props.mode === "range"
+ ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
+ : "[&:has([aria-selected])]:rounded-md",
+ ),
+ day: cn(
+ buttonVariants({ variant: "ghost" }),
+ "size-8 p-0 font-normal aria-selected:opacity-100",
+ ),
+ day_range_start:
+ "day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",
+ day_range_end:
+ "day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",
+ day_selected:
+ "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
+ day_today: "bg-accent text-accent-foreground",
+ day_outside:
+ "day-outside text-muted-foreground aria-selected:text-muted-foreground",
+ day_disabled: "text-muted-foreground opacity-50",
+ day_range_middle:
+ "aria-selected:bg-accent aria-selected:text-accent-foreground",
+ day_hidden: "invisible",
+ ...classNames,
+ }}
+ components={{
+ IconLeft: ({ className, ...props }) => (
+ <ChevronLeft className={cn("size-4", className)} {...props} />
+ ),
+ IconRight: ({ className, ...props }) => (
+ <ChevronRight className={cn("size-4", className)} {...props} />
+ ),
+ }}
+ {...props}
+ />
+ );
+}
+
+export { Calendar };
diff --git a/apps/status-page/src/components/ui/card.tsx b/apps/status-page/src/components/ui/card.tsx
new file mode 100644
index 000000000..cee9feaeb
--- /dev/null
+++ b/apps/status-page/src/components/ui/card.tsx
@@ -0,0 +1,92 @@
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Card({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card"
+ className={cn(
+ "flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-header"
+ className={cn(
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-title"
+ className={cn("font-semibold leading-none", className)}
+ {...props}
+ />
+ );
+}
+
+function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+function CardAction({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-action"
+ className={cn(
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CardContent({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-content"
+ className={cn("px-6", className)}
+ {...props}
+ />
+ );
+}
+
+function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="card-footer"
+ className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
+ {...props}
+ />
+ );
+}
+
+export {
+ Card,
+ CardHeader,
+ CardFooter,
+ CardTitle,
+ CardAction,
+ CardDescription,
+ CardContent,
+};
diff --git a/apps/status-page/src/components/ui/chart.tsx b/apps/status-page/src/components/ui/chart.tsx
new file mode 100644
index 000000000..9acecd91e
--- /dev/null
+++ b/apps/status-page/src/components/ui/chart.tsx
@@ -0,0 +1,358 @@
+"use client";
+
+import * as React from "react";
+import * as RechartsPrimitive from "recharts";
+
+import { cn } from "@/lib/utils";
+
+// Format: { THEME_NAME: CSS_SELECTOR }
+const THEMES = { light: "", dark: ".dark" } as const;
+
+export type ChartConfig = {
+ [k in string]: {
+ label?: React.ReactNode;
+ icon?: React.ComponentType;
+ } & (
+ | { color?: string; theme?: never }
+ | { color?: never; theme: Record<keyof typeof THEMES, string> }
+ );
+};
+
+type ChartContextProps = {
+ config: ChartConfig;
+};
+
+const ChartContext = React.createContext<ChartContextProps | null>(null);
+
+export function useChart() {
+ const context = React.useContext(ChartContext);
+
+ if (!context) {
+ throw new Error("useChart must be used within a <ChartContainer />");
+ }
+
+ return context;
+}
+
+function ChartContainer({
+ id,
+ className,
+ children,
+ config,
+ ...props
+}: React.ComponentProps<"div"> & {
+ config: ChartConfig;
+ children: React.ComponentProps<
+ typeof RechartsPrimitive.ResponsiveContainer
+ >["children"];
+}) {
+ const uniqueId = React.useId();
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
+
+ return (
+ <ChartContext.Provider value={{ config }}>
+ <div
+ data-slot="chart"
+ data-chart={chartId}
+ className={cn(
+ "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-hidden [&_.recharts-surface]:outline-hidden",
+ className,
+ )}
+ {...props}
+ >
+ <ChartStyle id={chartId} config={config} />
+ <RechartsPrimitive.ResponsiveContainer>
+ {children}
+ </RechartsPrimitive.ResponsiveContainer>
+ </div>
+ </ChartContext.Provider>
+ );
+}
+
+const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
+ const colorConfig = Object.entries(config).filter(
+ ([, config]) => config.theme || config.color,
+ );
+
+ if (!colorConfig.length) {
+ return null;
+ }
+
+ return (
+ <style
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: <explanation>
+ dangerouslySetInnerHTML={{
+ __html: Object.entries(THEMES)
+ .map(
+ ([theme, prefix]) => `
+${prefix} [data-chart=${id}] {
+${colorConfig
+ .map(([key, itemConfig]) => {
+ const color =
+ itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
+ itemConfig.color;
+ return color ? ` --color-${key}: ${color};` : null;
+ })
+ .join("\n")}
+}
+`,
+ )
+ .join("\n"),
+ }}
+ />
+ );
+};
+
+const ChartTooltip = RechartsPrimitive.Tooltip;
+
+function ChartTooltipContent({
+ active,
+ payload,
+ className,
+ indicator = "dot",
+ hideLabel = false,
+ hideIndicator = false,
+ label,
+ labelFormatter,
+ labelClassName,
+ formatter,
+ color,
+ nameKey,
+ labelKey,
+}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
+ React.ComponentProps<"div"> & {
+ hideLabel?: boolean;
+ hideIndicator?: boolean;
+ indicator?: "line" | "dot" | "dashed";
+ nameKey?: string;
+ labelKey?: string;
+ }) {
+ const { config } = useChart();
+
+ const tooltipLabel = React.useMemo(() => {
+ if (hideLabel || !payload?.length) {
+ return null;
+ }
+
+ const [item] = payload;
+ const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
+ const value =
+ !labelKey && typeof label === "string"
+ ? config[label as keyof typeof config]?.label || label
+ : itemConfig?.label;
+
+ if (labelFormatter) {
+ return (
+ <div className={cn("font-medium", labelClassName)}>
+ {labelFormatter(value, payload)}
+ </div>
+ );
+ }
+
+ if (!value) {
+ return null;
+ }
+
+ return <div className={cn("font-medium", labelClassName)}>{value}</div>;
+ }, [
+ label,
+ labelFormatter,
+ payload,
+ hideLabel,
+ labelClassName,
+ config,
+ labelKey,
+ ]);
+
+ if (!active || !payload?.length) {
+ return null;
+ }
+
+ const nestLabel = payload.length === 1 && indicator !== "dot";
+
+ return (
+ <div
+ className={cn(
+ "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
+ className,
+ )}
+ >
+ {!nestLabel ? tooltipLabel : null}
+ <div className="grid gap-1.5">
+ {payload
+ .filter((item) => item.type !== "none")
+ .map((item, index) => {
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
+ const indicatorColor = color || item.payload.fill || item.color;
+
+ return (
+ <div
+ key={item.dataKey}
+ className={cn(
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
+ indicator === "dot" && "items-center",
+ )}
+ >
+ {formatter && item?.value !== undefined && item.name ? (
+ formatter(item.value, item.name, item, index, item.payload)
+ ) : (
+ <>
+ {itemConfig?.icon ? (
+ <itemConfig.icon />
+ ) : (
+ !hideIndicator && (
+ <div
+ className={cn(
+ "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
+ {
+ "h-2.5 w-2.5": indicator === "dot",
+ "w-1": indicator === "line",
+ "w-0 border-[1.5px] border-dashed bg-transparent":
+ indicator === "dashed",
+ "my-0.5": nestLabel && indicator === "dashed",
+ },
+ )}
+ style={
+ {
+ "--color-bg": indicatorColor,
+ "--color-border": indicatorColor,
+ } as React.CSSProperties
+ }
+ />
+ )
+ )}
+ <div
+ className={cn(
+ "flex flex-1 justify-between leading-none",
+ nestLabel ? "items-end" : "items-center",
+ )}
+ >
+ <div className="grid gap-1.5">
+ {nestLabel ? tooltipLabel : null}
+ <span className="text-muted-foreground">
+ {itemConfig?.label || item.name}
+ </span>
+ </div>
+ {item.value && (
+ <span className="font-medium font-mono text-foreground tabular-nums">
+ {item.value.toLocaleString()}
+ </span>
+ )}
+ </div>
+ </>
+ )}
+ </div>
+ );
+ })}
+ </div>
+ </div>
+ );
+}
+
+const ChartLegend = RechartsPrimitive.Legend;
+
+function ChartLegendContent({
+ className,
+ hideIcon = false,
+ payload,
+ verticalAlign = "bottom",
+ nameKey,
+}: React.ComponentProps<"div"> &
+ Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
+ hideIcon?: boolean;
+ nameKey?: string;
+ }) {
+ const { config } = useChart();
+
+ if (!payload?.length) {
+ return null;
+ }
+
+ return (
+ <div
+ className={cn(
+ "flex items-center justify-center gap-4",
+ verticalAlign === "top" ? "pb-3" : "pt-3",
+ className,
+ )}
+ >
+ {payload
+ .filter((item) => item.type !== "none")
+ .map((item) => {
+ const key = `${nameKey || item.dataKey || "value"}`;
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
+
+ return (
+ <div
+ key={item.value}
+ className={cn(
+ "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
+ )}
+ >
+ {itemConfig?.icon && !hideIcon ? (
+ <itemConfig.icon />
+ ) : (
+ <div
+ className="h-2 w-2 shrink-0 rounded-[2px]"
+ style={{
+ backgroundColor: item.color,
+ }}
+ />
+ )}
+ {itemConfig?.label}
+ </div>
+ );
+ })}
+ </div>
+ );
+}
+
+// Helper to extract item config from a payload.
+export function getPayloadConfigFromPayload(
+ config: ChartConfig,
+ payload: unknown,
+ key: string,
+) {
+ if (typeof payload !== "object" || payload === null) {
+ return undefined;
+ }
+
+ const payloadPayload =
+ "payload" in payload &&
+ typeof payload.payload === "object" &&
+ payload.payload !== null
+ ? payload.payload
+ : undefined;
+
+ let configLabelKey: string = key;
+
+ if (
+ key in payload &&
+ typeof payload[key as keyof typeof payload] === "string"
+ ) {
+ configLabelKey = payload[key as keyof typeof payload] as string;
+ } else if (
+ payloadPayload &&
+ key in payloadPayload &&
+ typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
+ ) {
+ configLabelKey = payloadPayload[
+ key as keyof typeof payloadPayload
+ ] as string;
+ }
+
+ return configLabelKey in config
+ ? config[configLabelKey]
+ : config[key as keyof typeof config];
+}
+
+export {
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+ ChartLegend,
+ ChartLegendContent,
+ ChartStyle,
+};
diff --git a/apps/status-page/src/components/ui/checkbox.tsx b/apps/status-page/src/components/ui/checkbox.tsx
new file mode 100644
index 000000000..26fdc1db1
--- /dev/null
+++ b/apps/status-page/src/components/ui/checkbox.tsx
@@ -0,0 +1,32 @@
+"use client";
+
+import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
+import { CheckIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Checkbox({
+ className,
+ ...props
+}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
+ return (
+ <CheckboxPrimitive.Root
+ data-slot="checkbox"
+ className={cn(
+ "peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40",
+ className,
+ )}
+ {...props}
+ >
+ <CheckboxPrimitive.Indicator
+ data-slot="checkbox-indicator"
+ className="flex items-center justify-center text-current transition-none"
+ >
+ <CheckIcon className="size-3.5" />
+ </CheckboxPrimitive.Indicator>
+ </CheckboxPrimitive.Root>
+ );
+}
+
+export { Checkbox };
diff --git a/apps/status-page/src/components/ui/collapsible.tsx b/apps/status-page/src/components/ui/collapsible.tsx
new file mode 100644
index 000000000..90935c6b2
--- /dev/null
+++ b/apps/status-page/src/components/ui/collapsible.tsx
@@ -0,0 +1,33 @@
+"use client";
+
+import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
+
+function Collapsible({
+ ...props
+}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
+ return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
+}
+
+function CollapsibleTrigger({
+ ...props
+}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
+ return (
+ <CollapsiblePrimitive.CollapsibleTrigger
+ data-slot="collapsible-trigger"
+ {...props}
+ />
+ );
+}
+
+function CollapsibleContent({
+ ...props
+}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
+ return (
+ <CollapsiblePrimitive.CollapsibleContent
+ data-slot="collapsible-content"
+ {...props}
+ />
+ );
+}
+
+export { Collapsible, CollapsibleTrigger, CollapsibleContent };
diff --git a/apps/status-page/src/components/ui/command.tsx b/apps/status-page/src/components/ui/command.tsx
new file mode 100644
index 000000000..49a009fca
--- /dev/null
+++ b/apps/status-page/src/components/ui/command.tsx
@@ -0,0 +1,177 @@
+"use client";
+
+import { Command as CommandPrimitive } from "cmdk";
+import { SearchIcon } from "lucide-react";
+import type * as React from "react";
+
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog";
+import { cn } from "@/lib/utils";
+
+function Command({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive>) {
+ return (
+ <CommandPrimitive
+ data-slot="command"
+ className={cn(
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CommandDialog({
+ title = "Command Palette",
+ description = "Search for a command to run...",
+ children,
+ ...props
+}: React.ComponentProps<typeof Dialog> & {
+ title?: string;
+ description?: string;
+}) {
+ return (
+ <Dialog {...props}>
+ <DialogHeader className="sr-only">
+ <DialogTitle>{title}</DialogTitle>
+ <DialogDescription>{description}</DialogDescription>
+ </DialogHeader>
+ <DialogContent className="overflow-hidden p-0">
+ <Command className="**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
+ {children}
+ </Command>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+function CommandInput({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.Input>) {
+ return (
+ <div
+ data-slot="command-input-wrapper"
+ className="flex h-9 items-center gap-2 border-b px-3"
+ >
+ <SearchIcon className="size-4 shrink-0 opacity-50" />
+ <CommandPrimitive.Input
+ data-slot="command-input"
+ className={cn(
+ "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
+ className,
+ )}
+ {...props}
+ />
+ </div>
+ );
+}
+
+function CommandList({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.List>) {
+ return (
+ <CommandPrimitive.List
+ data-slot="command-list"
+ className={cn(
+ "max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CommandEmpty({
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
+ return (
+ <CommandPrimitive.Empty
+ data-slot="command-empty"
+ className="py-6 text-center text-sm"
+ {...props}
+ />
+ );
+}
+
+function CommandGroup({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.Group>) {
+ return (
+ <CommandPrimitive.Group
+ data-slot="command-group"
+ className={cn(
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CommandSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
+ return (
+ <CommandPrimitive.Separator
+ data-slot="command-separator"
+ className={cn("-mx-1 h-px bg-border", className)}
+ {...props}
+ />
+ );
+}
+
+function CommandItem({
+ className,
+ ...props
+}: React.ComponentProps<typeof CommandPrimitive.Item>) {
+ return (
+ <CommandPrimitive.Item
+ data-slot="command-item"
+ className={cn(
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function CommandShortcut({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="command-shortcut"
+ className={cn(
+ "ml-auto text-muted-foreground text-xs tracking-widest",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export {
+ Command,
+ CommandDialog,
+ CommandInput,
+ CommandList,
+ CommandEmpty,
+ CommandGroup,
+ CommandItem,
+ CommandShortcut,
+ CommandSeparator,
+};
diff --git a/apps/status-page/src/components/ui/data-table/data-table-action-bar.tsx b/apps/status-page/src/components/ui/data-table/data-table-action-bar.tsx
new file mode 100644
index 000000000..a4d7fe7a8
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-action-bar.tsx
@@ -0,0 +1,173 @@
+"use client";
+
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { cn } from "@/lib/utils";
+import type { Table } from "@tanstack/react-table";
+import { Loader, X } from "lucide-react";
+import * as React from "react";
+import * as ReactDOM from "react-dom";
+
+export interface DataTableActionBarProps<TData>
+ extends React.ComponentProps<"div"> {
+ table: Table<TData>;
+ visible?: boolean;
+ container?: Element | DocumentFragment | null;
+}
+
+function DataTableActionBar<TData>({
+ table,
+ visible: visibleProp,
+ container: containerProp,
+ children,
+ className,
+ ...props
+}: DataTableActionBarProps<TData>) {
+ const [mounted, setMounted] = React.useState(false);
+
+ React.useLayoutEffect(() => {
+ setMounted(true);
+ }, []);
+
+ React.useEffect(() => {
+ function onKeyDown(event: KeyboardEvent) {
+ if (event.key === "Escape") {
+ table.toggleAllRowsSelected(false);
+ }
+ }
+
+ window.addEventListener("keydown", onKeyDown);
+ return () => window.removeEventListener("keydown", onKeyDown);
+ }, [table]);
+
+ const container =
+ containerProp ?? (mounted ? globalThis.document?.body : null);
+
+ if (!container) return null;
+
+ const visible =
+ visibleProp ?? table.getFilteredSelectedRowModel().rows.length > 0;
+
+ return ReactDOM.createPortal(
+ <div>
+ {visible && (
+ <div
+ role="toolbar"
+ aria-orientation="horizontal"
+ className={cn(
+ "fixed inset-x-0 bottom-6 z-50 mx-auto flex w-fit flex-wrap items-center justify-center gap-2 rounded-md border bg-background p-2 text-foreground shadow-sm",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ )}
+ </div>,
+ container,
+ );
+}
+
+interface DataTableActionBarActionProps
+ extends React.ComponentProps<typeof Button> {
+ tooltip?: string;
+ isPending?: boolean;
+}
+
+function DataTableActionBarAction({
+ size = "sm",
+ tooltip,
+ isPending,
+ disabled,
+ className,
+ children,
+ ...props
+}: DataTableActionBarActionProps) {
+ const trigger = (
+ <Button
+ variant="secondary"
+ size={size}
+ className={cn(
+ "gap-1.5 border border-secondary bg-secondary/50 hover:bg-secondary/70 [&>svg]:size-3.5",
+ size === "icon" ? "size-7" : "h-7",
+ className,
+ )}
+ disabled={disabled || isPending}
+ {...props}
+ >
+ {isPending ? <Loader className="animate-spin" /> : children}
+ </Button>
+ );
+
+ if (!tooltip) return trigger;
+
+ return (
+ <Tooltip>
+ <TooltipTrigger asChild>{trigger}</TooltipTrigger>
+ <TooltipContent
+ sideOffset={6}
+ className="border bg-accent font-semibold text-foreground dark:bg-zinc-900 [&>span]:hidden"
+ >
+ <p>{tooltip}</p>
+ </TooltipContent>
+ </Tooltip>
+ );
+}
+
+interface DataTableActionBarSelectionProps<TData> {
+ table: Table<TData>;
+}
+
+function DataTableActionBarSelection<TData>({
+ table,
+}: DataTableActionBarSelectionProps<TData>) {
+ const onClearSelection = React.useCallback(() => {
+ table.toggleAllRowsSelected(false);
+ }, [table]);
+
+ return (
+ <div className="flex h-7 items-center rounded-md border pr-1 pl-2.5">
+ <span className="whitespace-nowrap text-xs">
+ {table.getFilteredSelectedRowModel().rows.length} selected
+ </span>
+ <Separator
+ orientation="vertical"
+ className="mr-1 ml-2 data-[orientation=vertical]:h-4"
+ />
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="size-5"
+ onClick={onClearSelection}
+ >
+ <X className="size-3.5" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent
+ sideOffset={10}
+ className="flex items-center gap-2 border bg-accent px-2 py-1 font-semibold text-foreground dark:bg-zinc-900 [&>span]:hidden"
+ >
+ <p>Clear selection</p>
+ <kbd className="select-none rounded border bg-background px-1.5 py-px font-mono font-normal text-[0.7rem] text-foreground shadow-xs">
+ <abbr title="Escape" className="no-underline">
+ Esc
+ </abbr>
+ </kbd>
+ </TooltipContent>
+ </Tooltip>
+ </div>
+ );
+}
+
+export {
+ DataTableActionBar,
+ DataTableActionBarAction,
+ DataTableActionBarSelection,
+};
diff --git a/apps/status-page/src/components/ui/data-table/data-table-column-header.tsx b/apps/status-page/src/components/ui/data-table/data-table-column-header.tsx
new file mode 100644
index 000000000..77df200be
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-column-header.tsx
@@ -0,0 +1,58 @@
+import type { Column } from "@tanstack/react-table";
+import { ChevronDown, ChevronUp } from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+
+import { cn } from "@/lib/utils";
+
+interface DataTableColumnHeaderProps<TData, TValue>
+ extends React.ComponentProps<"button"> {
+ column: Column<TData, TValue>;
+ title: string;
+}
+
+export function DataTableColumnHeader<TData, TValue>({
+ column,
+ title,
+ className,
+ ...props
+}: DataTableColumnHeaderProps<TData, TValue>) {
+ if (!column.getCanSort()) {
+ return <div className={cn(className)}>{title}</div>;
+ }
+
+ return (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => {
+ column.toggleSorting(undefined);
+ }}
+ className={cn(
+ "flex h-7 w-full items-center justify-between gap-2 px-0 py-0 hover:bg-transparent dark:hover:bg-transparent",
+ className,
+ )}
+ {...props}
+ >
+ <span>{title}</span>
+ <span className="flex flex-col">
+ <ChevronUp
+ className={cn(
+ "-mb-0.5 size-3",
+ column.getIsSorted() === "asc"
+ ? "text-accent-foreground"
+ : "text-muted-foreground",
+ )}
+ />
+ <ChevronDown
+ className={cn(
+ "-mt-0.5 size-3",
+ column.getIsSorted() === "desc"
+ ? "text-accent-foreground"
+ : "text-muted-foreground",
+ )}
+ />
+ </span>
+ </Button>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table-faceted-filter.tsx b/apps/status-page/src/components/ui/data-table/data-table-faceted-filter.tsx
new file mode 100644
index 000000000..f71981e6b
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-faceted-filter.tsx
@@ -0,0 +1,149 @@
+import type { Column } from "@tanstack/react-table";
+import { Check, PlusCircle } from "lucide-react";
+import type * as React from "react";
+
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ Command,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+ CommandSeparator,
+} from "@/components/ui/command";
+import {
+ Popover,
+ PopoverContent,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import { Separator } from "@/components/ui/separator";
+import { cn } from "@/lib/utils";
+
+interface DataTableFacetedFilterProps<TData, TValue> {
+ column?: Column<TData, TValue>;
+ title?: string;
+ options: {
+ label: string;
+ value: string | number;
+ icon?: React.ComponentType<{ className?: string }>;
+ }[];
+}
+
+export function DataTableFacetedFilter<TData, TValue>({
+ column,
+ title,
+ options,
+}: DataTableFacetedFilterProps<TData, TValue>) {
+ const facets = column?.getFacetedUniqueValues();
+ const selectedValues = new Set(
+ column?.getFilterValue() as (string | number)[],
+ );
+
+ return (
+ <Popover>
+ <PopoverTrigger asChild>
+ <Button variant="outline" size="sm" className="h-8 border-dashed">
+ <PlusCircle />
+ {title}
+ {selectedValues?.size > 0 && (
+ <>
+ <Separator orientation="vertical" className="mx-2 h-4" />
+ <Badge
+ variant="secondary"
+ className="rounded-sm px-1 font-normal lg:hidden"
+ >
+ {selectedValues.size}
+ </Badge>
+ <div className="hidden space-x-1 lg:flex">
+ {selectedValues.size > 2 ? (
+ <Badge
+ variant="secondary"
+ className="rounded-sm px-1 font-normal"
+ >
+ {selectedValues.size} selected
+ </Badge>
+ ) : (
+ options
+ .filter((option) => selectedValues.has(option.value))
+ .map((option) => (
+ <Badge
+ variant="secondary"
+ key={option.value}
+ className="rounded-sm px-1 font-normal"
+ >
+ {option.label}
+ </Badge>
+ ))
+ )}
+ </div>
+ </>
+ )}
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent className="w-[200px] p-0" align="start">
+ <Command>
+ <CommandInput placeholder={title} />
+ <CommandList>
+ <CommandEmpty>No results found.</CommandEmpty>
+ <CommandGroup>
+ {options.map((option) => {
+ const isSelected = selectedValues.has(option.value);
+ return (
+ <CommandItem
+ key={option.value}
+ onSelect={() => {
+ if (isSelected) {
+ selectedValues.delete(option.value);
+ } else {
+ selectedValues.add(option.value);
+ }
+ const filterValues = Array.from(selectedValues);
+ column?.setFilterValue(
+ filterValues.length ? filterValues : undefined,
+ );
+ }}
+ >
+ <div
+ className={cn(
+ "mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
+ isSelected
+ ? "bg-primary text-primary-foreground"
+ : "opacity-50 [&_svg]:invisible",
+ )}
+ >
+ <Check />
+ </div>
+ {option.icon && (
+ <option.icon className="mr-2 h-4 w-4 text-muted-foreground" />
+ )}
+ <span>{option.label}</span>
+ {facets?.get(option.value) && (
+ <span className="ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs">
+ {facets.get(option.value)}
+ </span>
+ )}
+ </CommandItem>
+ );
+ })}
+ </CommandGroup>
+ {selectedValues.size > 0 && (
+ <>
+ <CommandSeparator />
+ <CommandGroup>
+ <CommandItem
+ onSelect={() => column?.setFilterValue(undefined)}
+ className="justify-center text-center"
+ >
+ Clear filters
+ </CommandItem>
+ </CommandGroup>
+ </>
+ )}
+ </CommandList>
+ </Command>
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table-pagination.tsx b/apps/status-page/src/components/ui/data-table/data-table-pagination.tsx
new file mode 100644
index 000000000..6ab31c182
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-pagination.tsx
@@ -0,0 +1,148 @@
+import type { Table } from "@tanstack/react-table";
+import {
+ ChevronLeft,
+ ChevronRight,
+ ChevronsLeft,
+ ChevronsRight,
+} from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+
+export interface DataTablePaginationProps<TData> {
+ table: Table<TData>;
+}
+
+export function DataTablePagination<TData>({
+ table,
+}: DataTablePaginationProps<TData>) {
+ return (
+ <div className="flex flex-wrap items-center justify-between gap-2">
+ <div className="flex-1 text-muted-foreground text-sm">
+ {table.getFilteredSelectedRowModel().rows.length} of{" "}
+ {table.getFilteredRowModel().rows.length} row(s) selected.
+ </div>
+ <div className="flex items-center space-x-6 lg:space-x-8">
+ <div className="flex items-center space-x-2">
+ <p className="font-medium text-sm">Rows per page</p>
+ <Select
+ value={`${table.getState().pagination.pageSize}`}
+ onValueChange={(value) => {
+ table.setPageSize(Number(value));
+ }}
+ >
+ <SelectTrigger className="h-8 w-[70px]">
+ <SelectValue placeholder={table.getState().pagination.pageSize} />
+ </SelectTrigger>
+ <SelectContent side="top">
+ {[10, 20, 30, 40, 50].map((pageSize) => (
+ <SelectItem key={pageSize} value={`${pageSize}`}>
+ {pageSize}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ <div className="flex items-center justify-center font-medium text-sm">
+ Page {table.getState().pagination.pageIndex + 1} of{" "}
+ {table.getPageCount()}
+ </div>
+ <div className="flex items-center space-x-2">
+ <Button
+ variant="outline"
+ className="hidden h-8 w-8 p-0 lg:flex"
+ onClick={() => table.setPageIndex(0)}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to first page</span>
+ <ChevronsLeft />
+ </Button>
+ <Button
+ variant="outline"
+ className="h-8 w-8 p-0"
+ onClick={() => table.previousPage()}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to previous page</span>
+ <ChevronLeft />
+ </Button>
+ <Button
+ variant="outline"
+ className="h-8 w-8 p-0"
+ onClick={() => table.nextPage()}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to next page</span>
+ <ChevronRight />
+ </Button>
+ <Button
+ variant="outline"
+ className="hidden h-8 w-8 p-0 lg:flex"
+ onClick={() => table.setPageIndex(table.getPageCount() - 1)}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to last page</span>
+ <ChevronsRight />
+ </Button>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export function DataTablePaginationSimple<TData>({
+ table,
+}: DataTablePaginationProps<TData>) {
+ return (
+ <div className="flex items-center justify-between">
+ <div className="flex-1 text-muted-foreground text-sm">
+ {table.getFilteredRowModel().rows.length} of{" "}
+ {table.getPreFilteredRowModel().rows.length} row(s) filtered.
+ </div>
+ <div className="flex items-center space-x-2">
+ <Button
+ variant="outline"
+ className="hidden h-8 w-8 p-0 lg:flex"
+ onClick={() => table.setPageIndex(0)}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to first page</span>
+ <ChevronsLeft />
+ </Button>
+ <Button
+ variant="outline"
+ className="h-8 w-8 p-0"
+ onClick={() => table.previousPage()}
+ disabled={!table.getCanPreviousPage()}
+ >
+ <span className="sr-only">Go to previous page</span>
+ <ChevronLeft />
+ </Button>
+ <Button
+ variant="outline"
+ className="h-8 w-8 p-0"
+ onClick={() => table.nextPage()}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to next page</span>
+ <ChevronRight />
+ </Button>
+ <Button
+ variant="outline"
+ className="hidden h-8 w-8 p-0 lg:flex"
+ onClick={() => table.setPageIndex(table.getPageCount() - 1)}
+ disabled={!table.getCanNextPage()}
+ >
+ <span className="sr-only">Go to last page</span>
+ <ChevronsRight />
+ </Button>
+ </div>
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table-skeleton.tsx b/apps/status-page/src/components/ui/data-table/data-table-skeleton.tsx
new file mode 100644
index 000000000..992265288
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-skeleton.tsx
@@ -0,0 +1,64 @@
+import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+
+interface DataTableSkeletonProps {
+ /**
+ * Number of rows to render
+ * @default 10
+ */
+ rows?: number;
+}
+
+// TODO: add checkbox skeleton (for MonitorTable e.g.)
+
+export function DataTableSkeleton({ rows = 3 }: DataTableSkeletonProps) {
+ return (
+ <Table>
+ <TableHeader className="bg-muted/50">
+ <TableRow className="hover:bg-transparent">
+ <TableHead>
+ <Skeleton className="my-1.5 h-4 w-24" />
+ </TableHead>
+ <TableHead className="hidden sm:table-cell">
+ <Skeleton className="my-1.5 h-4 w-32" />
+ </TableHead>
+ <TableHead className="hidden md:table-cell">
+ <Skeleton className="my-1.5 h-4 w-16" />
+ </TableHead>
+ <TableHead>
+ <Skeleton className="my-1.5 h-4 w-20" />
+ </TableHead>
+ <TableHead className="flex items-center justify-end" />
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {new Array(rows).fill(0).map((_, i) => (
+ <TableRow key={i} className="hover:bg-transparent">
+ <TableCell>
+ <Skeleton className="my-1.5 h-4 w-full max-w-40" />
+ </TableCell>
+ <TableCell className="hidden sm:table-cell">
+ <Skeleton className="my-1.5 h-4 w-full max-w-52" />
+ </TableCell>
+ <TableCell className="hidden md:table-cell">
+ <Skeleton className="my-1.5 h-4 w-24" />
+ </TableCell>
+ <TableCell>
+ <Skeleton className="my-1.5 h-4 w-full max-w-40" />
+ </TableCell>
+ <TableCell className="flex justify-end">
+ <Skeleton className="my-1.5 h-5 w-5" />
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table-toobar.tsx b/apps/status-page/src/components/ui/data-table/data-table-toobar.tsx
new file mode 100644
index 000000000..3655f37aa
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-toobar.tsx
@@ -0,0 +1,60 @@
+"use client";
+
+import type { Table } from "@tanstack/react-table";
+import { X } from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+import { DataTableViewOptions } from "@/components/ui/data-table/data-table-view-options";
+import { Input } from "@/components/ui/input";
+
+import { DataTableFacetedFilter } from "@/components/ui/data-table/data-table-faceted-filter";
+
+export interface DataTableToolbarProps<TData> {
+ table: Table<TData>;
+}
+
+export function DataTableToolbar<TData>({
+ table,
+}: DataTableToolbarProps<TData>) {
+ const isFiltered = table.getState().columnFilters.length > 0;
+
+ return (
+ <div className="flex items-center justify-between">
+ <div className="flex flex-1 items-center space-x-2">
+ <Input
+ placeholder="Filter entries..."
+ value={(table.getColumn("title")?.getFilterValue() as string) ?? ""}
+ onChange={(event) =>
+ table.getColumn("title")?.setFilterValue(event.target.value)
+ }
+ className="h-8 w-[150px] lg:w-[250px]"
+ />
+ {table.getColumn("status") && (
+ <DataTableFacetedFilter
+ column={table.getColumn("status")}
+ title="Status"
+ options={[]}
+ />
+ )}
+ {table.getColumn("tags") && (
+ <DataTableFacetedFilter
+ column={table.getColumn("tags")}
+ title="Tags"
+ options={[]}
+ />
+ )}
+ {isFiltered && (
+ <Button
+ variant="ghost"
+ onClick={() => table.resetColumnFilters()}
+ className="h-8 px-2 lg:px-3"
+ >
+ Reset
+ <X />
+ </Button>
+ )}
+ </div>
+ <DataTableViewOptions table={table} />
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table-view-options.tsx b/apps/status-page/src/components/ui/data-table/data-table-view-options.tsx
new file mode 100644
index 000000000..53faebc6d
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table-view-options.tsx
@@ -0,0 +1,59 @@
+"use client";
+
+import { DropdownMenuTrigger } from "@radix-ui/react-dropdown-menu";
+import type { Table } from "@tanstack/react-table";
+import { Settings2 } from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuCheckboxItem,
+ DropdownMenuContent,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+} from "@/components/ui/dropdown-menu";
+
+interface DataTableViewOptionsProps<TData> {
+ table: Table<TData>;
+}
+
+export function DataTableViewOptions<TData>({
+ table,
+}: DataTableViewOptionsProps<TData>) {
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="outline"
+ size="sm"
+ className="ml-auto hidden h-8 lg:flex"
+ >
+ <Settings2 />
+ View
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-[150px]">
+ <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ {table
+ .getAllColumns()
+ .filter(
+ (column) =>
+ typeof column.accessorFn !== "undefined" && column.getCanHide(),
+ )
+ .map((column) => {
+ return (
+ <DropdownMenuCheckboxItem
+ key={column.id}
+ className="capitalize"
+ checked={column.getIsVisible()}
+ onCheckedChange={(value) => column.toggleVisibility(!!value)}
+ >
+ {column.id}
+ </DropdownMenuCheckboxItem>
+ );
+ })}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/status-page/src/components/ui/data-table/data-table.tsx b/apps/status-page/src/components/ui/data-table/data-table.tsx
new file mode 100644
index 000000000..f823dd384
--- /dev/null
+++ b/apps/status-page/src/components/ui/data-table/data-table.tsx
@@ -0,0 +1,208 @@
+"use client";
+
+import {
+ type ColumnDef,
+ type ColumnFiltersState,
+ type PaginationState,
+ type Row,
+ type SortingState,
+ type VisibilityState,
+ flexRender,
+ getCoreRowModel,
+ getExpandedRowModel,
+ getFacetedRowModel,
+ getFacetedUniqueValues,
+ getFilteredRowModel,
+ getPaginationRowModel,
+ getSortedRowModel,
+ useReactTable,
+} from "@tanstack/react-table";
+import * as React from "react";
+
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
+import { Fragment } from "react";
+import type { DataTableActionBarProps } from "./data-table-action-bar";
+import type { DataTablePaginationProps } from "./data-table-pagination";
+import type { DataTableToolbarProps } from "./data-table-toobar";
+
+export interface DataTableProps<TData, TValue> {
+ columns: ColumnDef<TData, TValue>[];
+ data: TData[];
+ rowComponent?: React.ComponentType<{ row: Row<TData> }>;
+ toolbarComponent?: React.ComponentType<DataTableToolbarProps<TData>>;
+ actionBar?: React.ComponentType<DataTableActionBarProps<TData>>;
+ paginationComponent?: React.ComponentType<DataTablePaginationProps<TData>>;
+ onRowClick?: (row: Row<TData>) => void;
+ defaultSorting?: SortingState;
+ defaultColumnVisibility?: VisibilityState;
+ defaultColumnFilters?: ColumnFiltersState;
+ defaultPagination?: PaginationState;
+ autoResetPageIndex?: boolean;
+
+ /** access the state from the parent component */
+ columnFilters?: ColumnFiltersState;
+ setColumnFilters?: React.Dispatch<React.SetStateAction<ColumnFiltersState>>;
+ sorting?: SortingState;
+ setSorting?: React.Dispatch<React.SetStateAction<SortingState>>;
+ pagination?: PaginationState;
+ setPagination?: React.Dispatch<React.SetStateAction<PaginationState>>;
+}
+
+export function DataTable<TData, TValue>({
+ columns,
+ data,
+ rowComponent,
+ toolbarComponent,
+ actionBar,
+ paginationComponent,
+ onRowClick,
+ defaultSorting = [],
+ defaultColumnVisibility = {},
+ defaultColumnFilters = [],
+ defaultPagination = { pageIndex: 0, pageSize: 10 },
+ autoResetPageIndex = true,
+ columnFilters,
+ setColumnFilters,
+ sorting,
+ setSorting,
+ pagination,
+ setPagination,
+}: DataTableProps<TData, TValue>) {
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
+ const [globalFilter, setGlobalFilter] = React.useState<any>();
+ const [rowSelection, setRowSelection] = React.useState({});
+ const [columnVisibility, setColumnVisibility] =
+ React.useState<VisibilityState>(defaultColumnVisibility);
+ const [internalPagination, setInternalPagination] =
+ React.useState<PaginationState>(defaultPagination);
+ const [internalColumnFilters, setInternalColumnFilters] =
+ React.useState<ColumnFiltersState>(defaultColumnFilters);
+ const [internalSorting, setInternalSorting] =
+ React.useState<SortingState>(defaultSorting);
+
+ // Use controlled or uncontrolled column filters
+ const columnFiltersState = columnFilters ?? internalColumnFilters;
+ const setColumnFiltersState = setColumnFilters ?? setInternalColumnFilters;
+ const sortingState = sorting ?? internalSorting;
+ const setSortingState = setSorting ?? setInternalSorting;
+ const paginationState = pagination ?? internalPagination;
+ const setPaginationState = setPagination ?? setInternalPagination;
+
+ const table = useReactTable({
+ data,
+ columns,
+ state: {
+ sorting: sortingState,
+ columnVisibility,
+ rowSelection,
+ pagination: paginationState,
+ columnFilters: columnFiltersState,
+ globalFilter,
+ },
+ enableRowSelection: true,
+ onRowSelectionChange: setRowSelection,
+ onSortingChange: setSortingState,
+ onColumnFiltersChange: setColumnFiltersState,
+ onColumnVisibilityChange: setColumnVisibility,
+ onPaginationChange: setPaginationState,
+ onGlobalFilterChange: setGlobalFilter,
+ getCoreRowModel: getCoreRowModel(),
+ getFilteredRowModel: getFilteredRowModel(),
+ getPaginationRowModel: getPaginationRowModel(),
+ getSortedRowModel: getSortedRowModel(),
+ getFacetedRowModel: getFacetedRowModel(),
+ getFacetedUniqueValues: getFacetedUniqueValues(),
+ getExpandedRowModel: getExpandedRowModel(),
+ autoResetPageIndex,
+ // @ts-expect-error as we have an id in the data
+ getRowCanExpand: (row) => Boolean(row.original.id),
+ });
+
+ return (
+ <div className="grid gap-2">
+ {toolbarComponent
+ ? React.createElement(toolbarComponent, { table })
+ : null}
+ <Table>
+ <TableHeader>
+ {table.getHeaderGroups().map((headerGroup) => (
+ <TableRow key={headerGroup.id}>
+ {headerGroup.headers.map((header) => {
+ return (
+ <TableHead
+ key={header.id}
+ colSpan={header.colSpan}
+ className={header.column.columnDef.meta?.headerClassName}
+ >
+ {header.isPlaceholder
+ ? null
+ : flexRender(
+ header.column.columnDef.header,
+ header.getContext(),
+ )}
+ </TableHead>
+ );
+ })}
+ </TableRow>
+ ))}
+ </TableHeader>
+ <TableBody>
+ {table.getRowModel().rows?.length ? (
+ table.getRowModel().rows.map((row) => (
+ <Fragment key={row.id}>
+ <TableRow
+ data-state={
+ (row.getIsSelected() || row.getIsExpanded()) && "selected"
+ }
+ onClick={() => onRowClick?.(row)}
+ className="data-[state=selected]:bg-muted/50"
+ >
+ {row.getVisibleCells().map((cell) => (
+ <TableCell
+ key={cell.id}
+ className={cell.column.columnDef.meta?.cellClassName}
+ >
+ {flexRender(
+ cell.column.columnDef.cell,
+ cell.getContext(),
+ )}
+ </TableCell>
+ ))}
+ </TableRow>
+ {row.getIsExpanded() && (
+ <TableRow className="hover:bg-background">
+ <TableCell
+ className="p-0"
+ colSpan={row.getVisibleCells().length}
+ >
+ {rowComponent
+ ? React.createElement(rowComponent, { row })
+ : null}
+ </TableCell>
+ </TableRow>
+ )}
+ </Fragment>
+ ))
+ ) : (
+ <TableRow>
+ <TableCell colSpan={columns.length} className="h-24 text-center">
+ No results.
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ {actionBar ? React.createElement(actionBar, { table }) : null}
+ </Table>
+ {paginationComponent
+ ? React.createElement(paginationComponent, { table })
+ : null}
+ </div>
+ );
+}
diff --git a/apps/status-page/src/components/ui/dialog.tsx b/apps/status-page/src/components/ui/dialog.tsx
new file mode 100644
index 000000000..3f639a55a
--- /dev/null
+++ b/apps/status-page/src/components/ui/dialog.tsx
@@ -0,0 +1,135 @@
+"use client";
+
+import * as DialogPrimitive from "@radix-ui/react-dialog";
+import { XIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Dialog({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Root>) {
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;
+}
+
+function DialogTrigger({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
+}
+
+function DialogPortal({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
+}
+
+function DialogClose({
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Close>) {
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
+}
+
+function DialogOverlay({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
+ return (
+ <DialogPrimitive.Overlay
+ data-slot="dialog-overlay"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function DialogContent({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Content>) {
+ return (
+ <DialogPortal data-slot="dialog-portal">
+ <DialogOverlay />
+ <DialogPrimitive.Content
+ data-slot="dialog-content"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <DialogPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0">
+ <XIcon />
+ <span className="sr-only">Close</span>
+ </DialogPrimitive.Close>
+ </DialogPrimitive.Content>
+ </DialogPortal>
+ );
+}
+
+function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="dialog-header"
+ className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
+ {...props}
+ />
+ );
+}
+
+function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="dialog-footer"
+ className={cn(
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function DialogTitle({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Title>) {
+ return (
+ <DialogPrimitive.Title
+ data-slot="dialog-title"
+ className={cn("font-semibold text-lg leading-none", className)}
+ {...props}
+ />
+ );
+}
+
+function DialogDescription({
+ className,
+ ...props
+}: React.ComponentProps<typeof DialogPrimitive.Description>) {
+ return (
+ <DialogPrimitive.Description
+ data-slot="dialog-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+export {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogOverlay,
+ DialogPortal,
+ DialogTitle,
+ DialogTrigger,
+};
diff --git a/apps/status-page/src/components/ui/dropdown-menu.tsx b/apps/status-page/src/components/ui/dropdown-menu.tsx
new file mode 100644
index 000000000..5b73af0b5
--- /dev/null
+++ b/apps/status-page/src/components/ui/dropdown-menu.tsx
@@ -0,0 +1,257 @@
+"use client";
+
+import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
+import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function DropdownMenu({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
+ return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
+}
+
+function DropdownMenuPortal({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
+ return (
+ <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
+ );
+}
+
+function DropdownMenuTrigger({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
+ return (
+ <DropdownMenuPrimitive.Trigger
+ data-slot="dropdown-menu-trigger"
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuContent({
+ className,
+ sideOffset = 4,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
+ return (
+ <DropdownMenuPrimitive.Portal>
+ <DropdownMenuPrimitive.Content
+ data-slot="dropdown-menu-content"
+ sideOffset={sideOffset}
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ </DropdownMenuPrimitive.Portal>
+ );
+}
+
+function DropdownMenuGroup({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
+ return (
+ <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
+ );
+}
+
+function DropdownMenuItem({
+ className,
+ inset,
+ variant = "default",
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
+ inset?: boolean;
+ variant?: "default" | "destructive";
+}) {
+ return (
+ <DropdownMenuPrimitive.Item
+ data-slot="dropdown-menu-item"
+ data-inset={inset}
+ data-variant={variant}
+ className={cn(
+ "data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuCheckboxItem({
+ className,
+ children,
+ checked,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
+ return (
+ <DropdownMenuPrimitive.CheckboxItem
+ data-slot="dropdown-menu-checkbox-item"
+ className={cn(
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <CheckIcon className="size-4" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.CheckboxItem>
+ );
+}
+
+function DropdownMenuRadioGroup({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
+ return (
+ <DropdownMenuPrimitive.RadioGroup
+ data-slot="dropdown-menu-radio-group"
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuRadioItem({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
+ return (
+ <DropdownMenuPrimitive.RadioItem
+ data-slot="dropdown-menu-radio-item"
+ className={cn(
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ {...props}
+ >
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <CircleIcon className="size-2 fill-current" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.RadioItem>
+ );
+}
+
+function DropdownMenuLabel({
+ className,
+ inset,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
+ inset?: boolean;
+}) {
+ return (
+ <DropdownMenuPrimitive.Label
+ data-slot="dropdown-menu-label"
+ data-inset={inset}
+ className={cn(
+ "px-2 py-1.5 font-medium text-sm data-[inset]:pl-8",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
+ return (
+ <DropdownMenuPrimitive.Separator
+ data-slot="dropdown-menu-separator"
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuShortcut({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ data-slot="dropdown-menu-shortcut"
+ className={cn(
+ "ml-auto text-muted-foreground text-xs tracking-widest",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function DropdownMenuSub({
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
+ return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
+}
+
+function DropdownMenuSubTrigger({
+ className,
+ inset,
+ children,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
+ inset?: boolean;
+}) {
+ return (
+ <DropdownMenuPrimitive.SubTrigger
+ data-slot="dropdown-menu-sub-trigger"
+ data-inset={inset}
+ className={cn(
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[inset]:pl-8 data-[state=open]:text-accent-foreground",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRightIcon className="ml-auto size-4" />
+ </DropdownMenuPrimitive.SubTrigger>
+ );
+}
+
+function DropdownMenuSubContent({
+ className,
+ ...props
+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
+ return (
+ <DropdownMenuPrimitive.SubContent
+ data-slot="dropdown-menu-sub-content"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export {
+ DropdownMenu,
+ DropdownMenuPortal,
+ DropdownMenuTrigger,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuLabel,
+ DropdownMenuItem,
+ DropdownMenuCheckboxItem,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+ DropdownMenuSeparator,
+ DropdownMenuShortcut,
+ DropdownMenuSub,
+ DropdownMenuSubTrigger,
+ DropdownMenuSubContent,
+};
diff --git a/apps/status-page/src/components/ui/form.tsx b/apps/status-page/src/components/ui/form.tsx
new file mode 100644
index 000000000..105428b1a
--- /dev/null
+++ b/apps/status-page/src/components/ui/form.tsx
@@ -0,0 +1,168 @@
+"use client";
+
+import type * as LabelPrimitive from "@radix-ui/react-label";
+import { Slot } from "@radix-ui/react-slot";
+import * as React from "react";
+import {
+ Controller,
+ type ControllerProps,
+ type FieldPath,
+ type FieldValues,
+ FormProvider,
+ useFormContext,
+ useFormState,
+} from "react-hook-form";
+
+import { Label } from "@/components/ui/label";
+import { cn } from "@/lib/utils";
+
+const Form = FormProvider;
+
+type FormFieldContextValue<
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
+> = {
+ name: TName;
+};
+
+const FormFieldContext = React.createContext<FormFieldContextValue>(
+ {} as FormFieldContextValue,
+);
+
+const FormField = <
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
+>({
+ ...props
+}: ControllerProps<TFieldValues, TName>) => {
+ return (
+ <FormFieldContext.Provider value={{ name: props.name }}>
+ <Controller {...props} />
+ </FormFieldContext.Provider>
+ );
+};
+
+const useFormField = () => {
+ const fieldContext = React.useContext(FormFieldContext);
+ const itemContext = React.useContext(FormItemContext);
+ const { getFieldState } = useFormContext();
+ const formState = useFormState({ name: fieldContext.name });
+ const fieldState = getFieldState(fieldContext.name, formState);
+
+ if (!fieldContext) {
+ throw new Error("useFormField should be used within <FormField>");
+ }
+
+ const { id } = itemContext;
+
+ return {
+ id,
+ name: fieldContext.name,
+ formItemId: `${id}-form-item`,
+ formDescriptionId: `${id}-form-item-description`,
+ formMessageId: `${id}-form-item-message`,
+ ...fieldState,
+ };
+};
+
+type FormItemContextValue = {
+ id: string;
+};
+
+const FormItemContext = React.createContext<FormItemContextValue>(
+ {} as FormItemContextValue,
+);
+
+function FormItem({ className, ...props }: React.ComponentProps<"div">) {
+ const id = React.useId();
+
+ return (
+ <FormItemContext.Provider value={{ id }}>
+ <div
+ data-slot="form-item"
+ className={cn("grid gap-2", className)}
+ {...props}
+ />
+ </FormItemContext.Provider>
+ );
+}
+
+function FormLabel({
+ className,
+ ...props
+}: React.ComponentProps<typeof LabelPrimitive.Root>) {
+ const { error, formItemId } = useFormField();
+
+ return (
+ <Label
+ data-slot="form-label"
+ data-error={!!error}
+ className={cn("data-[error=true]:text-destructive", className)}
+ htmlFor={formItemId}
+ {...props}
+ />
+ );
+}
+
+function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
+ const { error, formItemId, formDescriptionId, formMessageId } =
+ useFormField();
+
+ return (
+ <Slot
+ data-slot="form-control"
+ id={formItemId}
+ aria-describedby={
+ !error
+ ? `${formDescriptionId}`
+ : `${formDescriptionId} ${formMessageId}`
+ }
+ aria-invalid={!!error}
+ {...props}
+ />
+ );
+}
+
+function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
+ const { formDescriptionId } = useFormField();
+
+ return (
+ <p
+ data-slot="form-description"
+ id={formDescriptionId}
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
+ const { error, formMessageId } = useFormField();
+ const body = error ? String(error?.message ?? "") : props.children;
+
+ if (!body) {
+ return null;
+ }
+
+ return (
+ <p
+ data-slot="form-message"
+ id={formMessageId}
+ className={cn("text-destructive text-sm", className)}
+ {...props}
+ >
+ {body}
+ </p>
+ );
+}
+
+export {
+ useFormField,
+ Form,
+ FormItem,
+ FormLabel,
+ FormControl,
+ FormDescription,
+ FormMessage,
+ FormField,
+};
diff --git a/apps/status-page/src/components/ui/hover-card.tsx b/apps/status-page/src/components/ui/hover-card.tsx
new file mode 100644
index 000000000..815a2f199
--- /dev/null
+++ b/apps/status-page/src/components/ui/hover-card.tsx
@@ -0,0 +1,44 @@
+"use client";
+
+import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function HoverCard({
+ ...props
+}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
+ return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />;
+}
+
+function HoverCardTrigger({
+ ...props
+}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
+ return (
+ <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
+ );
+}
+
+function HoverCardContent({
+ className,
+ align = "center",
+ sideOffset = 4,
+ ...props
+}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
+ return (
+ <HoverCardPrimitive.Portal data-slot="hover-card-portal">
+ <HoverCardPrimitive.Content
+ data-slot="hover-card-content"
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ </HoverCardPrimitive.Portal>
+ );
+}
+
+export { HoverCard, HoverCardTrigger, HoverCardContent };
diff --git a/apps/status-page/src/components/ui/input.tsx b/apps/status-page/src/components/ui/input.tsx
new file mode 100644
index 000000000..a60356ddd
--- /dev/null
+++ b/apps/status-page/src/components/ui/input.tsx
@@ -0,0 +1,21 @@
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Input({ className, type, ...props }: React.ComponentProps<"input">) {
+ return (
+ <input
+ type={type}
+ data-slot="input"
+ className={cn(
+ "flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Input };
diff --git a/apps/status-page/src/components/ui/label.tsx b/apps/status-page/src/components/ui/label.tsx
new file mode 100644
index 000000000..67f975b6f
--- /dev/null
+++ b/apps/status-page/src/components/ui/label.tsx
@@ -0,0 +1,24 @@
+"use client";
+
+import * as LabelPrimitive from "@radix-ui/react-label";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Label({
+ className,
+ ...props
+}: React.ComponentProps<typeof LabelPrimitive.Root>) {
+ return (
+ <LabelPrimitive.Root
+ data-slot="label"
+ className={cn(
+ "flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Label };
diff --git a/apps/status-page/src/components/ui/popover.tsx b/apps/status-page/src/components/ui/popover.tsx
new file mode 100644
index 000000000..5c5f19968
--- /dev/null
+++ b/apps/status-page/src/components/ui/popover.tsx
@@ -0,0 +1,48 @@
+"use client";
+
+import * as PopoverPrimitive from "@radix-ui/react-popover";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Popover({
+ ...props
+}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />;
+}
+
+function PopoverTrigger({
+ ...props
+}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
+}
+
+function PopoverContent({
+ className,
+ align = "center",
+ sideOffset = 4,
+ ...props
+}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
+ return (
+ <PopoverPrimitive.Portal>
+ <PopoverPrimitive.Content
+ data-slot="popover-content"
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ </PopoverPrimitive.Portal>
+ );
+}
+
+function PopoverAnchor({
+ ...props
+}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
+}
+
+export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
diff --git a/apps/status-page/src/components/ui/progress.tsx b/apps/status-page/src/components/ui/progress.tsx
new file mode 100644
index 000000000..2ee61a1b0
--- /dev/null
+++ b/apps/status-page/src/components/ui/progress.tsx
@@ -0,0 +1,31 @@
+"use client";
+
+import * as ProgressPrimitive from "@radix-ui/react-progress";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Progress({
+ className,
+ value,
+ ...props
+}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
+ return (
+ <ProgressPrimitive.Root
+ data-slot="progress"
+ className={cn(
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
+ className,
+ )}
+ {...props}
+ >
+ <ProgressPrimitive.Indicator
+ data-slot="progress-indicator"
+ className="h-full w-full flex-1 bg-primary transition-all"
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
+ />
+ </ProgressPrimitive.Root>
+ );
+}
+
+export { Progress };
diff --git a/apps/status-page/src/components/ui/radio-group.tsx b/apps/status-page/src/components/ui/radio-group.tsx
new file mode 100644
index 000000000..b1137030b
--- /dev/null
+++ b/apps/status-page/src/components/ui/radio-group.tsx
@@ -0,0 +1,45 @@
+"use client";
+
+import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
+import { CircleIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function RadioGroup({
+ className,
+ ...props
+}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
+ return (
+ <RadioGroupPrimitive.Root
+ data-slot="radio-group"
+ className={cn("grid gap-3", className)}
+ {...props}
+ />
+ );
+}
+
+function RadioGroupItem({
+ className,
+ ...props
+}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
+ return (
+ <RadioGroupPrimitive.Item
+ data-slot="radio-group-item"
+ className={cn(
+ "aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
+ className,
+ )}
+ {...props}
+ >
+ <RadioGroupPrimitive.Indicator
+ data-slot="radio-group-indicator"
+ className="relative flex items-center justify-center"
+ >
+ <CircleIcon className="-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 size-2 fill-primary" />
+ </RadioGroupPrimitive.Indicator>
+ </RadioGroupPrimitive.Item>
+ );
+}
+
+export { RadioGroup, RadioGroupItem };
diff --git a/apps/status-page/src/components/ui/select.tsx b/apps/status-page/src/components/ui/select.tsx
new file mode 100644
index 000000000..ee4e8514e
--- /dev/null
+++ b/apps/status-page/src/components/ui/select.tsx
@@ -0,0 +1,185 @@
+"use client";
+
+import * as SelectPrimitive from "@radix-ui/react-select";
+import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Select({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Root>) {
+ return <SelectPrimitive.Root data-slot="select" {...props} />;
+}
+
+function SelectGroup({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Group>) {
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />;
+}
+
+function SelectValue({
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Value>) {
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />;
+}
+
+function SelectTrigger({
+ className,
+ size = "default",
+ children,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
+ size?: "sm" | "default";
+}) {
+ return (
+ <SelectPrimitive.Trigger
+ data-slot="select-trigger"
+ data-size={size}
+ className={cn(
+ "flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon asChild>
+ <ChevronDownIcon className="size-4 opacity-50" />
+ </SelectPrimitive.Icon>
+ </SelectPrimitive.Trigger>
+ );
+}
+
+function SelectContent({
+ className,
+ children,
+ position = "popper",
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Content>) {
+ return (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Content
+ data-slot="select-content"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
+ position === "popper" &&
+ "data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1",
+ className,
+ )}
+ position={position}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.Viewport
+ className={cn(
+ "p-1",
+ position === "popper" &&
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1",
+ )}
+ >
+ {children}
+ </SelectPrimitive.Viewport>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Content>
+ </SelectPrimitive.Portal>
+ );
+}
+
+function SelectLabel({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Label>) {
+ return (
+ <SelectPrimitive.Label
+ data-slot="select-label"
+ className={cn("px-2 py-1.5 text-muted-foreground text-xs", className)}
+ {...props}
+ />
+ );
+}
+
+function SelectItem({
+ className,
+ children,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Item>) {
+ return (
+ <SelectPrimitive.Item
+ data-slot="select-item"
+ className={cn(
+ "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
+ className,
+ )}
+ {...props}
+ >
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
+ <SelectPrimitive.ItemIndicator>
+ <CheckIcon className="size-4" />
+ </SelectPrimitive.ItemIndicator>
+ </span>
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
+ </SelectPrimitive.Item>
+ );
+}
+
+function SelectSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
+ return (
+ <SelectPrimitive.Separator
+ data-slot="select-separator"
+ className={cn("-mx-1 pointer-events-none my-1 h-px bg-border", className)}
+ {...props}
+ />
+ );
+}
+
+function SelectScrollUpButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
+ return (
+ <SelectPrimitive.ScrollUpButton
+ data-slot="select-scroll-up-button"
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className,
+ )}
+ {...props}
+ >
+ <ChevronUpIcon className="size-4" />
+ </SelectPrimitive.ScrollUpButton>
+ );
+}
+
+function SelectScrollDownButton({
+ className,
+ ...props
+}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
+ return (
+ <SelectPrimitive.ScrollDownButton
+ data-slot="select-scroll-down-button"
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className,
+ )}
+ {...props}
+ >
+ <ChevronDownIcon className="size-4" />
+ </SelectPrimitive.ScrollDownButton>
+ );
+}
+
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectScrollDownButton,
+ SelectScrollUpButton,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+};
diff --git a/apps/status-page/src/components/ui/separator.tsx b/apps/status-page/src/components/ui/separator.tsx
new file mode 100644
index 000000000..8fc1c16d4
--- /dev/null
+++ b/apps/status-page/src/components/ui/separator.tsx
@@ -0,0 +1,28 @@
+"use client";
+
+import * as SeparatorPrimitive from "@radix-ui/react-separator";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Separator({
+ className,
+ orientation = "horizontal",
+ decorative = true,
+ ...props
+}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
+ return (
+ <SeparatorPrimitive.Root
+ data-slot="separator-root"
+ decorative={decorative}
+ orientation={orientation}
+ className={cn(
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Separator };
diff --git a/apps/status-page/src/components/ui/sheet.tsx b/apps/status-page/src/components/ui/sheet.tsx
new file mode 100644
index 000000000..e220a2275
--- /dev/null
+++ b/apps/status-page/src/components/ui/sheet.tsx
@@ -0,0 +1,139 @@
+"use client";
+
+import * as SheetPrimitive from "@radix-ui/react-dialog";
+import { XIcon } from "lucide-react";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />;
+}
+
+function SheetTrigger({
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
+}
+
+function SheetClose({
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Close>) {
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
+}
+
+function SheetPortal({
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Portal>) {
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
+}
+
+function SheetOverlay({
+ className,
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
+ return (
+ <SheetPrimitive.Overlay
+ data-slot="sheet-overlay"
+ className={cn(
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SheetContent({
+ className,
+ children,
+ side = "right",
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Content> & {
+ side?: "top" | "right" | "bottom" | "left";
+}) {
+ return (
+ <SheetPortal>
+ <SheetOverlay />
+ <SheetPrimitive.Content
+ data-slot="sheet-content"
+ className={cn(
+ "fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500",
+ side === "right" &&
+ "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
+ side === "left" &&
+ "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
+ side === "top" &&
+ "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
+ side === "bottom" &&
+ "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
+ <XIcon className="size-4" />
+ <span className="sr-only">Close</span>
+ </SheetPrimitive.Close>
+ </SheetPrimitive.Content>
+ </SheetPortal>
+ );
+}
+
+function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sheet-header"
+ className={cn("flex flex-col gap-1.5 p-4", className)}
+ {...props}
+ />
+ );
+}
+
+function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sheet-footer"
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
+ {...props}
+ />
+ );
+}
+
+function SheetTitle({
+ className,
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Title>) {
+ return (
+ <SheetPrimitive.Title
+ data-slot="sheet-title"
+ className={cn("font-semibold text-foreground", className)}
+ {...props}
+ />
+ );
+}
+
+function SheetDescription({
+ className,
+ ...props
+}: React.ComponentProps<typeof SheetPrimitive.Description>) {
+ return (
+ <SheetPrimitive.Description
+ data-slot="sheet-description"
+ className={cn("text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+export {
+ Sheet,
+ SheetTrigger,
+ SheetClose,
+ SheetContent,
+ SheetHeader,
+ SheetFooter,
+ SheetTitle,
+ SheetDescription,
+};
diff --git a/apps/status-page/src/components/ui/sidebar.tsx b/apps/status-page/src/components/ui/sidebar.tsx
new file mode 100644
index 000000000..059a32b2b
--- /dev/null
+++ b/apps/status-page/src/components/ui/sidebar.tsx
@@ -0,0 +1,731 @@
+"use client";
+
+import { Slot } from "@radix-ui/react-slot";
+import { type VariantProps, cva } from "class-variance-authority";
+import { PanelLeftIcon } from "lucide-react";
+import * as React from "react";
+
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Separator } from "@/components/ui/separator";
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+} from "@/components/ui/sheet";
+import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { useIsMobile } from "@/hooks/use-mobile";
+import { cn } from "@/lib/utils";
+
+const SIDEBAR_COOKIE_NAME = "sidebar_state";
+const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
+const SIDEBAR_WIDTH = "16rem";
+const SIDEBAR_WIDTH_MOBILE = "18rem";
+const SIDEBAR_WIDTH_ICON = "3rem";
+const SIDEBAR_KEYBOARD_SHORTCUT = "b";
+
+type SidebarContextProps = {
+ state: "expanded" | "collapsed";
+ open: boolean;
+ setOpen: (open: boolean) => void;
+ openMobile: boolean;
+ setOpenMobile: (open: boolean) => void;
+ isMobile: boolean;
+ toggleSidebar: () => void;
+};
+
+const SidebarContext = React.createContext<SidebarContextProps | null>(null);
+
+function useSidebar() {
+ const context = React.useContext(SidebarContext);
+ if (!context) {
+ throw new Error("useSidebar must be used within a SidebarProvider.");
+ }
+
+ return context;
+}
+
+function SidebarProvider({
+ defaultOpen = true,
+ open: openProp,
+ onOpenChange: setOpenProp,
+ className,
+ style,
+ children,
+ cookieName,
+ ...props
+}: React.ComponentProps<"div"> & {
+ defaultOpen?: boolean;
+ open?: boolean;
+ onOpenChange?: (open: boolean) => void;
+ // NOTE: change from default shadcn sidebar
+ cookieName?: string;
+}) {
+ const isMobile = useIsMobile();
+ const [openMobile, setOpenMobile] = React.useState(false);
+
+ // This is the internal state of the sidebar.
+ // We use openProp and setOpenProp for control from outside the component.
+ const [_open, _setOpen] = React.useState(defaultOpen);
+ const open = openProp ?? _open;
+ const setOpen = React.useCallback(
+ (value: boolean | ((value: boolean) => boolean)) => {
+ const openState = typeof value === "function" ? value(open) : value;
+ if (setOpenProp) {
+ setOpenProp(openState);
+ } else {
+ _setOpen(openState);
+ }
+
+ // This sets the cookie to keep the sidebar state.
+ document.cookie = `${cookieName ?? SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
+ },
+ [setOpenProp, open, cookieName],
+ );
+
+ // Helper to toggle the sidebar.
+ // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
+ const toggleSidebar = React.useCallback(() => {
+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
+ }, [isMobile, setOpen, setOpenMobile]);
+
+ // Adds a keyboard shortcut to toggle the sidebar.
+ React.useEffect(() => {
+ const handleKeyDown = (event: KeyboardEvent) => {
+ if (
+ event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
+ (event.metaKey || event.ctrlKey)
+ ) {
+ event.preventDefault();
+ toggleSidebar();
+ }
+ };
+
+ window.addEventListener("keydown", handleKeyDown);
+ return () => window.removeEventListener("keydown", handleKeyDown);
+ }, [toggleSidebar]);
+
+ // We add a state so that we can do data-state="expanded" or "collapsed".
+ // This makes it easier to style the sidebar with Tailwind classes.
+ const state = open ? "expanded" : "collapsed";
+
+ // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
+ const contextValue = React.useMemo<SidebarContextProps>(
+ () => ({
+ state,
+ open,
+ setOpen,
+ isMobile,
+ openMobile,
+ setOpenMobile,
+ toggleSidebar,
+ }),
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],
+ );
+
+ return (
+ <SidebarContext.Provider value={contextValue}>
+ <TooltipProvider delayDuration={0}>
+ <div
+ data-slot="sidebar-wrapper"
+ style={
+ {
+ "--sidebar-width": SIDEBAR_WIDTH,
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
+ ...style,
+ } as React.CSSProperties
+ }
+ className={cn(
+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ </TooltipProvider>
+ </SidebarContext.Provider>
+ );
+}
+
+function Sidebar({
+ side = "left",
+ variant = "sidebar",
+ collapsible = "offcanvas",
+ className,
+ children,
+ ...props
+}: React.ComponentProps<"div"> & {
+ side?: "left" | "right";
+ variant?: "sidebar" | "floating" | "inset";
+ collapsible?: "offcanvas" | "icon" | "none";
+}) {
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
+
+ if (collapsible === "none") {
+ return (
+ <div
+ data-slot="sidebar"
+ className={cn(
+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </div>
+ );
+ }
+
+ if (isMobile) {
+ return (
+ <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>
+ <SheetContent
+ data-sidebar="sidebar"
+ data-slot="sidebar"
+ data-mobile="true"
+ className="w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"
+ style={
+ {
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE,
+ } as React.CSSProperties
+ }
+ side={side}
+ >
+ <SheetHeader className="sr-only">
+ <SheetTitle>Sidebar</SheetTitle>
+ <SheetDescription>Displays the mobile sidebar.</SheetDescription>
+ </SheetHeader>
+ <div className="flex h-full w-full flex-col">{children}</div>
+ </SheetContent>
+ </Sheet>
+ );
+ }
+
+ return (
+ <div
+ className="group peer hidden text-sidebar-foreground md:block"
+ data-state={state}
+ data-collapsible={state === "collapsed" ? collapsible : ""}
+ data-variant={variant}
+ data-side={side}
+ data-slot="sidebar"
+ >
+ {/* This is what handles the sidebar gap on desktop */}
+ <div
+ data-slot="sidebar-gap"
+ className={cn(
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
+ "group-data-[collapsible=offcanvas]:w-0",
+ "group-data-[side=right]:rotate-180",
+ variant === "floating" || variant === "inset"
+ ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
+ )}
+ />
+ <div
+ data-slot="sidebar-container"
+ className={cn(
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
+ side === "left"
+ ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
+ : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
+ // Adjust the padding for floating and inset variants.
+ variant === "floating" || variant === "inset"
+ ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
+ className,
+ )}
+ {...props}
+ >
+ <div
+ data-sidebar="sidebar"
+ data-slot="sidebar-inner"
+ className="flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm"
+ >
+ {children}
+ </div>
+ </div>
+ </div>
+ );
+}
+
+function SidebarTrigger({
+ className,
+ onClick,
+ ...props
+}: React.ComponentProps<typeof Button>) {
+ const { toggleSidebar } = useSidebar();
+
+ return (
+ <Button
+ data-sidebar="trigger"
+ data-slot="sidebar-trigger"
+ variant="ghost"
+ size="icon"
+ className={cn("size-7", className)}
+ onClick={(event) => {
+ onClick?.(event);
+ toggleSidebar();
+ }}
+ {...props}
+ >
+ <PanelLeftIcon />
+ <span className="sr-only">Toggle Sidebar</span>
+ </Button>
+ );
+}
+
+function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
+ const { toggleSidebar } = useSidebar();
+
+ return (
+ <button
+ data-sidebar="rail"
+ data-slot="sidebar-rail"
+ aria-label="Toggle Sidebar"
+ tabIndex={-1}
+ onClick={toggleSidebar}
+ title="Toggle Sidebar"
+ className={cn(
+ "-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex",
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
+ "group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full",
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
+ return (
+ <main
+ data-slot="sidebar-inset"
+ className={cn(
+ "relative flex w-full flex-1 flex-col bg-background",
+ "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarInput({
+ className,
+ ...props
+}: React.ComponentProps<typeof Input>) {
+ return (
+ <Input
+ data-slot="sidebar-input"
+ data-sidebar="input"
+ className={cn("h-8 w-full bg-background shadow-none", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-header"
+ data-sidebar="header"
+ className={cn("flex flex-col gap-2 p-2", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-footer"
+ data-sidebar="footer"
+ className={cn("flex flex-col gap-2 p-2", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarSeparator({
+ className,
+ ...props
+}: React.ComponentProps<typeof Separator>) {
+ return (
+ <Separator
+ data-slot="sidebar-separator"
+ data-sidebar="separator"
+ className={cn("mx-2 w-auto bg-sidebar-border", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-content"
+ data-sidebar="content"
+ className={cn(
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarGroup({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-group"
+ data-sidebar="group"
+ className={cn("relative flex w-full min-w-0 flex-col p-2", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarGroupLabel({
+ className,
+ asChild = false,
+ ...props
+}: React.ComponentProps<"div"> & { asChild?: boolean }) {
+ const Comp = asChild ? Slot : "div";
+
+ return (
+ <Comp
+ data-slot="sidebar-group-label"
+ data-sidebar="group-label"
+ className={cn(
+ "flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarGroupAction({
+ className,
+ asChild = false,
+ ...props
+}: React.ComponentProps<"button"> & { asChild?: boolean }) {
+ const Comp = asChild ? Slot : "button";
+
+ return (
+ <Comp
+ data-slot="sidebar-group-action"
+ data-sidebar="group-action"
+ className={cn(
+ "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
+ // Increases the hit area of the button on mobile.
+ "after:-inset-2 after:absolute md:after:hidden",
+ "group-data-[collapsible=icon]:hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarGroupContent({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-group-content"
+ data-sidebar="group-content"
+ className={cn("w-full text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">) {
+ return (
+ <ul
+ data-slot="sidebar-menu"
+ data-sidebar="menu"
+ className={cn("flex w-full min-w-0 flex-col gap-1", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
+ return (
+ <li
+ data-slot="sidebar-menu-item"
+ data-sidebar="menu-item"
+ className={cn("group/menu-item relative", className)}
+ {...props}
+ />
+ );
+}
+
+const sidebarMenuButtonVariants = cva(
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
+ {
+ variants: {
+ variant: {
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
+ outline:
+ "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
+ },
+ size: {
+ default: "h-8 text-sm",
+ sm: "h-7 text-xs",
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ },
+);
+
+function SidebarMenuButton({
+ asChild = false,
+ isActive = false,
+ variant = "default",
+ size = "default",
+ tooltip,
+ className,
+ ...props
+}: React.ComponentProps<"button"> & {
+ asChild?: boolean;
+ isActive?: boolean;
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
+} & VariantProps<typeof sidebarMenuButtonVariants>) {
+ const Comp = asChild ? Slot : "button";
+ const { isMobile, state } = useSidebar();
+
+ const button = (
+ <Comp
+ data-slot="sidebar-menu-button"
+ data-sidebar="menu-button"
+ data-size={size}
+ data-active={isActive}
+ className={cn(sidebarMenuButtonVariants({ variant, size }), className)}
+ {...props}
+ />
+ );
+
+ if (!tooltip) {
+ return button;
+ }
+
+ if (typeof tooltip === "string") {
+ tooltip = {
+ children: tooltip,
+ };
+ }
+
+ return (
+ <Tooltip>
+ <TooltipTrigger asChild>{button}</TooltipTrigger>
+ <TooltipContent
+ side="right"
+ align="center"
+ hidden={state !== "collapsed" || isMobile}
+ {...tooltip}
+ />
+ </Tooltip>
+ );
+}
+
+function SidebarMenuAction({
+ className,
+ asChild = false,
+ showOnHover = false,
+ ...props
+}: React.ComponentProps<"button"> & {
+ asChild?: boolean;
+ showOnHover?: boolean;
+}) {
+ const Comp = asChild ? Slot : "button";
+
+ return (
+ <Comp
+ data-slot="sidebar-menu-action"
+ data-sidebar="menu-action"
+ className={cn(
+ "absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
+ // Increases the hit area of the button on mobile.
+ "after:-inset-2 after:absolute md:after:hidden",
+ "peer-data-[size=sm]/menu-button:top-1",
+ "peer-data-[size=default]/menu-button:top-1.5",
+ "peer-data-[size=lg]/menu-button:top-2.5",
+ "group-data-[collapsible=icon]:hidden",
+ showOnHover &&
+ "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenuBadge({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="sidebar-menu-badge"
+ data-sidebar="menu-badge"
+ className={cn(
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums",
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
+ "peer-data-[size=sm]/menu-button:top-1",
+ "peer-data-[size=default]/menu-button:top-1.5",
+ "peer-data-[size=lg]/menu-button:top-2.5",
+ "group-data-[collapsible=icon]:hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenuSkeleton({
+ className,
+ showIcon = false,
+ ...props
+}: React.ComponentProps<"div"> & {
+ showIcon?: boolean;
+}) {
+ // Random width between 50 to 90%.
+ const width = React.useMemo(() => {
+ return `${Math.floor(Math.random() * 40) + 50}%`;
+ }, []);
+
+ return (
+ <div
+ data-slot="sidebar-menu-skeleton"
+ data-sidebar="menu-skeleton"
+ className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)}
+ {...props}
+ >
+ {showIcon && (
+ <Skeleton
+ className="size-4 rounded-md"
+ data-sidebar="menu-skeleton-icon"
+ />
+ )}
+ <Skeleton
+ className="h-4 max-w-(--skeleton-width) flex-1"
+ data-sidebar="menu-skeleton-text"
+ style={
+ {
+ "--skeleton-width": width,
+ } as React.CSSProperties
+ }
+ />
+ </div>
+ );
+}
+
+function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {
+ return (
+ <ul
+ data-slot="sidebar-menu-sub"
+ data-sidebar="menu-sub"
+ className={cn(
+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5",
+ "group-data-[collapsible=icon]:hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenuSubItem({
+ className,
+ ...props
+}: React.ComponentProps<"li">) {
+ return (
+ <li
+ data-slot="sidebar-menu-sub-item"
+ data-sidebar="menu-sub-item"
+ className={cn("group/menu-sub-item relative", className)}
+ {...props}
+ />
+ );
+}
+
+function SidebarMenuSubButton({
+ asChild = false,
+ size = "md",
+ isActive = false,
+ className,
+ ...props
+}: React.ComponentProps<"a"> & {
+ asChild?: boolean;
+ size?: "sm" | "md";
+ isActive?: boolean;
+}) {
+ const Comp = asChild ? Slot : "a";
+
+ return (
+ <Comp
+ data-slot="sidebar-menu-sub-button"
+ data-sidebar="menu-sub-button"
+ data-size={size}
+ data-active={isActive}
+ className={cn(
+ "-translate-x-px flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
+ size === "sm" && "text-xs",
+ size === "md" && "text-sm",
+ "group-data-[collapsible=icon]:hidden",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export {
+ Sidebar,
+ SidebarContent,
+ SidebarFooter,
+ SidebarGroup,
+ SidebarGroupAction,
+ SidebarGroupContent,
+ SidebarGroupLabel,
+ SidebarHeader,
+ SidebarInput,
+ SidebarInset,
+ SidebarMenu,
+ SidebarMenuAction,
+ SidebarMenuBadge,
+ SidebarMenuButton,
+ SidebarMenuItem,
+ SidebarMenuSkeleton,
+ SidebarMenuSub,
+ SidebarMenuSubButton,
+ SidebarMenuSubItem,
+ SidebarProvider,
+ SidebarRail,
+ SidebarSeparator,
+ SidebarTrigger,
+ useSidebar,
+};
diff --git a/apps/status-page/src/components/ui/skeleton.tsx b/apps/status-page/src/components/ui/skeleton.tsx
new file mode 100644
index 000000000..da6c299b6
--- /dev/null
+++ b/apps/status-page/src/components/ui/skeleton.tsx
@@ -0,0 +1,13 @@
+import { cn } from "@/lib/utils";
+
+function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div
+ data-slot="skeleton"
+ className={cn("animate-pulse rounded-md bg-accent", className)}
+ {...props}
+ />
+ );
+}
+
+export { Skeleton };
diff --git a/apps/status-page/src/components/ui/slider.tsx b/apps/status-page/src/components/ui/slider.tsx
new file mode 100644
index 000000000..2adaa9c59
--- /dev/null
+++ b/apps/status-page/src/components/ui/slider.tsx
@@ -0,0 +1,63 @@
+"use client";
+
+import * as SliderPrimitive from "@radix-ui/react-slider";
+import * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Slider({
+ className,
+ defaultValue,
+ value,
+ min = 0,
+ max = 100,
+ ...props
+}: React.ComponentProps<typeof SliderPrimitive.Root>) {
+ const _values = React.useMemo(
+ () =>
+ Array.isArray(value)
+ ? value
+ : Array.isArray(defaultValue)
+ ? defaultValue
+ : [min, max],
+ [value, defaultValue, min, max],
+ );
+
+ return (
+ <SliderPrimitive.Root
+ data-slot="slider"
+ defaultValue={defaultValue}
+ value={value}
+ min={min}
+ max={max}
+ className={cn(
+ "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",
+ className,
+ )}
+ {...props}
+ >
+ <SliderPrimitive.Track
+ data-slot="slider-track"
+ className={cn(
+ "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5",
+ )}
+ >
+ <SliderPrimitive.Range
+ data-slot="slider-range"
+ className={cn(
+ "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",
+ )}
+ />
+ </SliderPrimitive.Track>
+ {Array.from({ length: _values.length }, (_, index) => (
+ <SliderPrimitive.Thumb
+ data-slot="slider-thumb"
+ key={index}
+ className="block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50"
+ />
+ ))}
+ </SliderPrimitive.Root>
+ );
+}
+
+export { Slider };
diff --git a/apps/status-page/src/components/ui/sonner.tsx b/apps/status-page/src/components/ui/sonner.tsx
new file mode 100644
index 000000000..f96a98d91
--- /dev/null
+++ b/apps/status-page/src/components/ui/sonner.tsx
@@ -0,0 +1,25 @@
+"use client";
+
+import { useTheme } from "next-themes";
+import { Toaster as Sonner, type ToasterProps } from "sonner";
+
+const Toaster = ({ ...props }: ToasterProps) => {
+ const { theme = "system" } = useTheme();
+
+ return (
+ <Sonner
+ theme={theme as ToasterProps["theme"]}
+ className="toaster group"
+ style={
+ {
+ "--normal-bg": "var(--popover)",
+ "--normal-text": "var(--popover-foreground)",
+ "--normal-border": "var(--border)",
+ } as React.CSSProperties
+ }
+ {...props}
+ />
+ );
+};
+
+export { Toaster };
diff --git a/apps/status-page/src/components/ui/sortable.tsx b/apps/status-page/src/components/ui/sortable.tsx
new file mode 100644
index 000000000..9b6ee53a2
--- /dev/null
+++ b/apps/status-page/src/components/ui/sortable.tsx
@@ -0,0 +1,581 @@
+"use client";
+
+import {
+ type Announcements,
+ DndContext,
+ type DndContextProps,
+ type DragEndEvent,
+ DragOverlay,
+ type DraggableSyntheticListeners,
+ type DropAnimation,
+ KeyboardSensor,
+ MouseSensor,
+ type ScreenReaderInstructions,
+ TouchSensor,
+ type UniqueIdentifier,
+ closestCenter,
+ closestCorners,
+ defaultDropAnimationSideEffects,
+ useSensor,
+ useSensors,
+} from "@dnd-kit/core";
+import {
+ restrictToHorizontalAxis,
+ restrictToParentElement,
+ restrictToVerticalAxis,
+} from "@dnd-kit/modifiers";
+import {
+ SortableContext,
+ type SortableContextProps,
+ arrayMove,
+ horizontalListSortingStrategy,
+ sortableKeyboardCoordinates,
+ useSortable,
+ verticalListSortingStrategy,
+} from "@dnd-kit/sortable";
+import { CSS } from "@dnd-kit/utilities";
+import { Slot } from "@radix-ui/react-slot";
+import * as React from "react";
+import * as ReactDOM from "react-dom";
+
+import { composeEventHandlers, useComposedRefs } from "@/lib/composition";
+import { cn } from "@/lib/utils";
+
+const orientationConfig = {
+ vertical: {
+ modifiers: [restrictToVerticalAxis, restrictToParentElement],
+ strategy: verticalListSortingStrategy,
+ collisionDetection: closestCenter,
+ },
+ horizontal: {
+ modifiers: [restrictToHorizontalAxis, restrictToParentElement],
+ strategy: horizontalListSortingStrategy,
+ collisionDetection: closestCenter,
+ },
+ mixed: {
+ modifiers: [restrictToParentElement],
+ strategy: undefined,
+ collisionDetection: closestCorners,
+ },
+};
+
+const ROOT_NAME = "Sortable";
+const CONTENT_NAME = "SortableContent";
+const ITEM_NAME = "SortableItem";
+const ITEM_HANDLE_NAME = "SortableItemHandle";
+const OVERLAY_NAME = "SortableOverlay";
+
+const SORTABLE_ERRORS = {
+ [ROOT_NAME]: `\`${ROOT_NAME}\` components must be within \`${ROOT_NAME}\``,
+ [CONTENT_NAME]: `\`${CONTENT_NAME}\` must be within \`${ROOT_NAME}\``,
+ [ITEM_NAME]: `\`${ITEM_NAME}\` must be within \`${CONTENT_NAME}\``,
+ [ITEM_HANDLE_NAME]: `\`${ITEM_HANDLE_NAME}\` must be within \`${ITEM_NAME}\``,
+ [OVERLAY_NAME]: `\`${OVERLAY_NAME}\` must be within \`${ROOT_NAME}\``,
+} as const;
+
+interface SortableRootContextValue<T> {
+ id: string;
+ items: UniqueIdentifier[];
+ modifiers: DndContextProps["modifiers"];
+ strategy: SortableContextProps["strategy"];
+ activeId: UniqueIdentifier | null;
+ setActiveId: (id: UniqueIdentifier | null) => void;
+ getItemValue: (item: T) => UniqueIdentifier;
+ flatCursor: boolean;
+}
+
+const SortableRootContext =
+ React.createContext<SortableRootContextValue<unknown> | null>(null);
+SortableRootContext.displayName = ROOT_NAME;
+
+function useSortableContext(name: keyof typeof SORTABLE_ERRORS) {
+ const context = React.useContext(SortableRootContext);
+ if (!context) {
+ throw new Error(SORTABLE_ERRORS[name]);
+ }
+ return context;
+}
+
+interface GetItemValue<T> {
+ /**
+ * Callback that returns a unique identifier for each sortable item. Required for array of objects.
+ * @example getItemValue={(item) => item.id}
+ */
+ getItemValue: (item: T) => UniqueIdentifier;
+}
+
+type SortableProps<T> = DndContextProps & {
+ value: T[];
+ onValueChange?: (items: T[]) => void;
+ onMove?: (
+ event: DragEndEvent & { activeIndex: number; overIndex: number },
+ ) => void;
+ strategy?: SortableContextProps["strategy"];
+ orientation?: "vertical" | "horizontal" | "mixed";
+ flatCursor?: boolean;
+} & (T extends object ? GetItemValue<T> : Partial<GetItemValue<T>>);
+
+function Sortable<T>(props: SortableProps<T>) {
+ const {
+ value,
+ onValueChange,
+ collisionDetection,
+ modifiers,
+ strategy,
+ onMove,
+ orientation = "vertical",
+ flatCursor = false,
+ getItemValue: getItemValueProp,
+ accessibility,
+ ...sortableProps
+ } = props;
+ const id = React.useId();
+ const [activeId, setActiveId] = React.useState<UniqueIdentifier | null>(null);
+
+ const sensors = useSensors(
+ useSensor(MouseSensor),
+ useSensor(TouchSensor),
+ useSensor(KeyboardSensor, {
+ coordinateGetter: sortableKeyboardCoordinates,
+ }),
+ );
+ const config = React.useMemo(
+ () => orientationConfig[orientation],
+ [orientation],
+ );
+
+ const getItemValue = React.useCallback(
+ (item: T): UniqueIdentifier => {
+ if (typeof item === "object" && !getItemValueProp) {
+ throw new Error(
+ "getItemValue is required when using array of objects.",
+ );
+ }
+ return getItemValueProp
+ ? getItemValueProp(item)
+ : (item as UniqueIdentifier);
+ },
+ [getItemValueProp],
+ );
+
+ const items = React.useMemo(() => {
+ return value.map((item) => getItemValue(item));
+ }, [value, getItemValue]);
+
+ const onDragEnd = React.useCallback(
+ (event: DragEndEvent) => {
+ const { active, over } = event;
+ if (over && active.id !== over?.id) {
+ const activeIndex = value.findIndex(
+ (item) => getItemValue(item) === active.id,
+ );
+ const overIndex = value.findIndex(
+ (item) => getItemValue(item) === over.id,
+ );
+
+ if (onMove) {
+ onMove({ ...event, activeIndex, overIndex });
+ } else {
+ onValueChange?.(arrayMove(value, activeIndex, overIndex));
+ }
+ }
+ setActiveId(null);
+ },
+ [value, onValueChange, onMove, getItemValue],
+ );
+
+ const announcements: Announcements = React.useMemo(
+ () => ({
+ onDragStart({ active }) {
+ const activeValue = active.id.toString();
+ return `Grabbed sortable item "${activeValue}". Current position is ${
+ active.data.current?.sortable.index + 1
+ } of ${value.length}. Use arrow keys to move, space to drop.`;
+ },
+ onDragOver({ active, over }) {
+ if (over) {
+ const overIndex = over.data.current?.sortable.index ?? 0;
+ const activeIndex = active.data.current?.sortable.index ?? 0;
+ const moveDirection = overIndex > activeIndex ? "down" : "up";
+ const activeValue = active.id.toString();
+ return `Sortable item "${activeValue}" moved ${moveDirection} to position ${
+ overIndex + 1
+ } of ${value.length}.`;
+ }
+ return "Sortable item is no longer over a droppable area. Press escape to cancel.";
+ },
+ onDragEnd({ active, over }) {
+ const activeValue = active.id.toString();
+ if (over) {
+ const overIndex = over.data.current?.sortable.index ?? 0;
+ return `Sortable item "${activeValue}" dropped at position ${
+ overIndex + 1
+ } of ${value.length}.`;
+ }
+ return `Sortable item "${activeValue}" dropped. No changes were made.`;
+ },
+ onDragCancel({ active }) {
+ const activeIndex = active.data.current?.sortable.index ?? 0;
+ const activeValue = active.id.toString();
+ return `Sorting cancelled. Sortable item "${activeValue}" returned to position ${
+ activeIndex + 1
+ } of ${value.length}.`;
+ },
+ onDragMove({ active, over }) {
+ if (over) {
+ const overIndex = over.data.current?.sortable.index ?? 0;
+ const activeIndex = active.data.current?.sortable.index ?? 0;
+ const moveDirection = overIndex > activeIndex ? "down" : "up";
+ const activeValue = active.id.toString();
+ return `Sortable item "${activeValue}" is moving ${moveDirection} to position ${
+ overIndex + 1
+ } of ${value.length}.`;
+ }
+ return "Sortable item is no longer over a droppable area. Press escape to cancel.";
+ },
+ }),
+ [value],
+ );
+
+ const screenReaderInstructions: ScreenReaderInstructions = React.useMemo(
+ () => ({
+ draggable: `
+ To pick up a sortable item, press space or enter.
+ While dragging, use the ${
+ orientation === "vertical"
+ ? "up and down"
+ : orientation === "horizontal"
+ ? "left and right"
+ : "arrow"
+ } keys to move the item.
+ Press space or enter again to drop the item in its new position, or press escape to cancel.
+ `,
+ }),
+ [orientation],
+ );
+
+ const contextValue = React.useMemo(
+ () => ({
+ id,
+ items,
+ modifiers: modifiers ?? config.modifiers,
+ strategy: strategy ?? config.strategy,
+ activeId,
+ setActiveId,
+ getItemValue,
+ flatCursor,
+ }),
+ [
+ id,
+ items,
+ modifiers,
+ strategy,
+ config.modifiers,
+ config.strategy,
+ activeId,
+ getItemValue,
+ flatCursor,
+ ],
+ );
+
+ return (
+ <SortableRootContext.Provider
+ value={contextValue as SortableRootContextValue<unknown>}
+ >
+ <DndContext
+ collisionDetection={collisionDetection ?? config.collisionDetection}
+ modifiers={modifiers ?? config.modifiers}
+ sensors={sensors}
+ {...sortableProps}
+ id={id}
+ onDragStart={composeEventHandlers(
+ sortableProps.onDragStart,
+ ({ active }) => setActiveId(active.id),
+ )}
+ onDragEnd={composeEventHandlers(sortableProps.onDragEnd, onDragEnd)}
+ onDragCancel={composeEventHandlers(sortableProps.onDragCancel, () =>
+ setActiveId(null),
+ )}
+ accessibility={{
+ announcements,
+ screenReaderInstructions,
+ ...accessibility,
+ }}
+ />
+ </SortableRootContext.Provider>
+ );
+}
+
+const SortableContentContext = React.createContext<boolean>(false);
+SortableContentContext.displayName = CONTENT_NAME;
+
+interface SortableContentProps extends React.ComponentPropsWithoutRef<"div"> {
+ strategy?: SortableContextProps["strategy"];
+ children: React.ReactNode;
+ asChild?: boolean;
+ withoutSlot?: boolean;
+}
+
+const SortableContent = React.forwardRef<HTMLDivElement, SortableContentProps>(
+ (props, forwardedRef) => {
+ const {
+ strategy: strategyProp,
+ asChild,
+ withoutSlot,
+ children,
+ ...contentProps
+ } = props;
+ const context = useSortableContext(CONTENT_NAME);
+
+ const ContentPrimitive = asChild ? Slot : "div";
+
+ return (
+ <SortableContentContext.Provider value={true}>
+ <SortableContext
+ items={context.items}
+ strategy={strategyProp ?? context.strategy}
+ >
+ {withoutSlot ? (
+ children
+ ) : (
+ <ContentPrimitive {...contentProps} ref={forwardedRef}>
+ {children}
+ </ContentPrimitive>
+ )}
+ </SortableContext>
+ </SortableContentContext.Provider>
+ );
+ },
+);
+SortableContent.displayName = CONTENT_NAME;
+
+interface SortableItemContextValue {
+ id: string;
+ attributes: React.HTMLAttributes<HTMLElement>;
+ listeners: DraggableSyntheticListeners | undefined;
+ setActivatorNodeRef: (node: HTMLElement | null) => void;
+ isDragging?: boolean;
+ disabled?: boolean;
+}
+
+const SortableItemContext =
+ React.createContext<SortableItemContextValue | null>(null);
+SortableItemContext.displayName = ITEM_NAME;
+
+interface SortableItemProps extends React.ComponentPropsWithoutRef<"div"> {
+ value: UniqueIdentifier;
+ asHandle?: boolean;
+ asChild?: boolean;
+ disabled?: boolean;
+}
+
+const SortableItem = React.forwardRef<HTMLDivElement, SortableItemProps>(
+ (props, forwardedRef) => {
+ const {
+ value,
+ style,
+ asHandle,
+ asChild,
+ disabled,
+ className,
+ ...itemProps
+ } = props;
+ const inSortableContent = React.useContext(SortableContentContext);
+ const inSortableOverlay = React.useContext(SortableOverlayContext);
+
+ if (!inSortableContent && !inSortableOverlay) {
+ throw new Error(SORTABLE_ERRORS[ITEM_NAME]);
+ }
+
+ if (value === "") {
+ throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
+ }
+
+ const context = useSortableContext(ITEM_NAME);
+ const id = React.useId();
+ const {
+ attributes,
+ listeners,
+ setNodeRef,
+ setActivatorNodeRef,
+ transform,
+ transition,
+ isDragging,
+ } = useSortable({ id: value, disabled });
+
+ const composedRef = useComposedRefs(forwardedRef, (node) => {
+ if (disabled) return;
+ setNodeRef(node);
+ if (asHandle) setActivatorNodeRef(node);
+ });
+
+ const composedStyle = React.useMemo<React.CSSProperties>(() => {
+ return {
+ transform: CSS.Translate.toString(transform),
+ transition,
+ ...style,
+ };
+ }, [transform, transition, style]);
+
+ const itemContext = React.useMemo<SortableItemContextValue>(
+ () => ({
+ id,
+ attributes,
+ listeners,
+ setActivatorNodeRef,
+ isDragging,
+ disabled,
+ }),
+ [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled],
+ );
+
+ const ItemPrimitive = asChild ? Slot : "div";
+
+ return (
+ <SortableItemContext.Provider value={itemContext}>
+ <ItemPrimitive
+ id={id}
+ data-dragging={isDragging ? "" : undefined}
+ {...itemProps}
+ {...(asHandle ? attributes : {})}
+ {...(asHandle ? listeners : {})}
+ tabIndex={disabled ? undefined : 0}
+ ref={composedRef}
+ style={composedStyle}
+ className={cn(
+ "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",
+ {
+ "touch-none select-none": asHandle,
+ "cursor-default": context.flatCursor,
+ "data-dragging:cursor-grabbing": !context.flatCursor,
+ "cursor-grab": !isDragging && asHandle && !context.flatCursor,
+ "opacity-50": isDragging,
+ "pointer-events-none opacity-50": disabled,
+ },
+ className,
+ )}
+ />
+ </SortableItemContext.Provider>
+ );
+ },
+);
+SortableItem.displayName = ITEM_NAME;
+
+interface SortableItemHandleProps
+ extends React.ComponentPropsWithoutRef<"button"> {
+ asChild?: boolean;
+}
+
+const SortableItemHandle = React.forwardRef<
+ HTMLButtonElement,
+ SortableItemHandleProps
+>((props, forwardedRef) => {
+ const { asChild, disabled, className, ...itemHandleProps } = props;
+ const itemContext = React.useContext(SortableItemContext);
+ if (!itemContext) {
+ throw new Error(SORTABLE_ERRORS[ITEM_HANDLE_NAME]);
+ }
+ const context = useSortableContext(ITEM_HANDLE_NAME);
+
+ const isDisabled = disabled ?? itemContext.disabled;
+
+ const composedRef = useComposedRefs(forwardedRef, (node) => {
+ if (!isDisabled) return;
+ itemContext.setActivatorNodeRef(node);
+ });
+
+ const HandlePrimitive = asChild ? Slot : "button";
+
+ return (
+ <HandlePrimitive
+ type="button"
+ aria-controls={itemContext.id}
+ data-dragging={itemContext.isDragging ? "" : undefined}
+ {...itemHandleProps}
+ {...itemContext.attributes}
+ {...itemContext.listeners}
+ ref={composedRef}
+ className={cn(
+ "select-none disabled:pointer-events-none disabled:opacity-50",
+ context.flatCursor
+ ? "cursor-default"
+ : "cursor-grab data-dragging:cursor-grabbing",
+ className,
+ )}
+ disabled={isDisabled}
+ />
+ );
+});
+SortableItemHandle.displayName = ITEM_HANDLE_NAME;
+
+const SortableOverlayContext = React.createContext(false);
+SortableOverlayContext.displayName = OVERLAY_NAME;
+
+const dropAnimation: DropAnimation = {
+ sideEffects: defaultDropAnimationSideEffects({
+ styles: {
+ active: {
+ opacity: "0.4",
+ },
+ },
+ }),
+};
+
+interface SortableOverlayProps
+ extends Omit<React.ComponentPropsWithoutRef<typeof DragOverlay>, "children"> {
+ container?: Element | DocumentFragment | null;
+ children?:
+ | ((params: { value: UniqueIdentifier }) => React.ReactNode)
+ | React.ReactNode;
+}
+
+function SortableOverlay(props: SortableOverlayProps) {
+ const { container: containerProp, children, ...overlayProps } = props;
+ const context = useSortableContext(OVERLAY_NAME);
+
+ const [mounted, setMounted] = React.useState(false);
+ React.useLayoutEffect(() => setMounted(true), []);
+
+ const container =
+ containerProp ?? (mounted ? globalThis.document?.body : null);
+
+ if (!container) return null;
+
+ return ReactDOM.createPortal(
+ <DragOverlay
+ dropAnimation={dropAnimation}
+ modifiers={context.modifiers}
+ className={cn(!context.flatCursor && "cursor-grabbing")}
+ {...overlayProps}
+ >
+ <SortableOverlayContext.Provider value={true}>
+ {context.activeId
+ ? typeof children === "function"
+ ? children({ value: context.activeId })
+ : children
+ : null}
+ </SortableOverlayContext.Provider>
+ </DragOverlay>,
+ container,
+ );
+}
+
+const Root = Sortable;
+const Content = SortableContent;
+const Item = SortableItem;
+const ItemHandle = SortableItemHandle;
+const Overlay = SortableOverlay;
+
+export {
+ Root,
+ Content,
+ Item,
+ ItemHandle,
+ Overlay,
+ //
+ Sortable,
+ SortableContent,
+ SortableItem,
+ SortableItemHandle,
+ SortableOverlay,
+};
diff --git a/apps/status-page/src/components/ui/switch.tsx b/apps/status-page/src/components/ui/switch.tsx
new file mode 100644
index 000000000..727e54404
--- /dev/null
+++ b/apps/status-page/src/components/ui/switch.tsx
@@ -0,0 +1,31 @@
+"use client";
+
+import * as SwitchPrimitive from "@radix-ui/react-switch";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Switch({
+ className,
+ ...props
+}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
+ return (
+ <SwitchPrimitive.Root
+ data-slot="switch"
+ className={cn(
+ "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
+ className,
+ )}
+ {...props}
+ >
+ <SwitchPrimitive.Thumb
+ data-slot="switch-thumb"
+ className={cn(
+ "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground",
+ )}
+ />
+ </SwitchPrimitive.Root>
+ );
+}
+
+export { Switch };
diff --git a/apps/status-page/src/components/ui/table.tsx b/apps/status-page/src/components/ui/table.tsx
new file mode 100644
index 000000000..4ea6433d0
--- /dev/null
+++ b/apps/status-page/src/components/ui/table.tsx
@@ -0,0 +1,116 @@
+"use client";
+
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Table({ className, ...props }: React.ComponentProps<"table">) {
+ return (
+ <div
+ data-slot="table-container"
+ className="relative w-full overflow-x-auto"
+ >
+ <table
+ data-slot="table"
+ className={cn("w-full caption-bottom text-sm", className)}
+ {...props}
+ />
+ </div>
+ );
+}
+
+function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
+ return (
+ <thead
+ data-slot="table-header"
+ className={cn("[&_tr]:border-b", className)}
+ {...props}
+ />
+ );
+}
+
+function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
+ return (
+ <tbody
+ data-slot="table-body"
+ className={cn("[&_tr:last-child]:border-0", className)}
+ {...props}
+ />
+ );
+}
+
+function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
+ return (
+ <tfoot
+ data-slot="table-footer"
+ className={cn(
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
+ return (
+ <tr
+ data-slot="table-row"
+ className={cn(
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
+ return (
+ <th
+ data-slot="table-head"
+ className={cn(
+ "h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
+ return (
+ <td
+ data-slot="table-cell"
+ className={cn(
+ "whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TableCaption({
+ className,
+ ...props
+}: React.ComponentProps<"caption">) {
+ return (
+ <caption
+ data-slot="table-caption"
+ className={cn("mt-4 text-muted-foreground text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+};
diff --git a/apps/status-page/src/components/ui/tabs.tsx b/apps/status-page/src/components/ui/tabs.tsx
new file mode 100644
index 000000000..ba16df9e1
--- /dev/null
+++ b/apps/status-page/src/components/ui/tabs.tsx
@@ -0,0 +1,66 @@
+"use client";
+
+import * as TabsPrimitive from "@radix-ui/react-tabs";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Tabs({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Root>) {
+ return (
+ <TabsPrimitive.Root
+ data-slot="tabs"
+ className={cn("flex flex-col gap-2", className)}
+ {...props}
+ />
+ );
+}
+
+function TabsList({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.List>) {
+ return (
+ <TabsPrimitive.List
+ data-slot="tabs-list"
+ className={cn(
+ "inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-[3px] text-muted-foreground",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TabsTrigger({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
+ return (
+ <TabsPrimitive.Trigger
+ data-slot="tabs-trigger"
+ className={cn(
+ "inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 font-medium text-foreground text-sm transition-[color,box-shadow] focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:shadow-sm dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+function TabsContent({
+ className,
+ ...props
+}: React.ComponentProps<typeof TabsPrimitive.Content>) {
+ return (
+ <TabsPrimitive.Content
+ data-slot="tabs-content"
+ className={cn("flex-1 outline-none", className)}
+ {...props}
+ />
+ );
+}
+
+export { Tabs, TabsList, TabsTrigger, TabsContent };
diff --git a/apps/status-page/src/components/ui/textarea.tsx b/apps/status-page/src/components/ui/textarea.tsx
new file mode 100644
index 000000000..fdb92c380
--- /dev/null
+++ b/apps/status-page/src/components/ui/textarea.tsx
@@ -0,0 +1,18 @@
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
+ return (
+ <textarea
+ data-slot="textarea"
+ className={cn(
+ "field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export { Textarea };
diff --git a/apps/status-page/src/components/ui/tooltip.tsx b/apps/status-page/src/components/ui/tooltip.tsx
new file mode 100644
index 000000000..1ae8e37e5
--- /dev/null
+++ b/apps/status-page/src/components/ui/tooltip.tsx
@@ -0,0 +1,61 @@
+"use client";
+
+import * as TooltipPrimitive from "@radix-ui/react-tooltip";
+import type * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+function TooltipProvider({
+ delayDuration = 0,
+ ...props
+}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
+ return (
+ <TooltipPrimitive.Provider
+ data-slot="tooltip-provider"
+ delayDuration={delayDuration}
+ {...props}
+ />
+ );
+}
+
+function Tooltip({
+ ...props
+}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
+ return (
+ <TooltipProvider>
+ <TooltipPrimitive.Root data-slot="tooltip" {...props} />
+ </TooltipProvider>
+ );
+}
+
+function TooltipTrigger({
+ ...props
+}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
+}
+
+function TooltipContent({
+ className,
+ sideOffset = 0,
+ children,
+ ...props
+}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
+ return (
+ <TooltipPrimitive.Portal>
+ <TooltipPrimitive.Content
+ data-slot="tooltip-content"
+ sideOffset={sideOffset}
+ className={cn(
+ "fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs data-[state=closed]:animate-out",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" />
+ </TooltipPrimitive.Content>
+ </TooltipPrimitive.Portal>
+ );
+}
+
+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
diff --git a/apps/status-page/src/data/audit-logs.client.ts b/apps/status-page/src/data/audit-logs.client.ts
new file mode 100644
index 000000000..d934122aa
--- /dev/null
+++ b/apps/status-page/src/data/audit-logs.client.ts
@@ -0,0 +1,40 @@
+import {
+ CircleAlert,
+ CircleCheck,
+ CircleMinus,
+ Send,
+ Siren,
+} from "lucide-react";
+
+export const config = {
+ "incident.created": {
+ icon: Siren,
+ color: "text-destructive",
+ title: "Incident Created",
+ },
+ "incident.resolved": {
+ icon: CircleCheck,
+ color: "text-success",
+ title: "Incident Resolved",
+ },
+ "monitor.failed": {
+ icon: CircleMinus,
+ color: "text-destructive",
+ title: "Monitor Failed",
+ },
+ "notification.sent": {
+ icon: Send,
+ color: "text-info",
+ title: "Notification Sent",
+ },
+ "monitor.recovered": {
+ icon: CircleCheck,
+ color: "text-success",
+ title: "Monitor Recovered",
+ },
+ "monitor.degraded": {
+ icon: CircleAlert,
+ color: "text-warning",
+ title: "Monitor Degraded",
+ },
+} as const;
diff --git a/apps/status-page/src/data/audit-logs.ts b/apps/status-page/src/data/audit-logs.ts
new file mode 100644
index 000000000..f77e2e505
--- /dev/null
+++ b/apps/status-page/src/data/audit-logs.ts
@@ -0,0 +1,90 @@
+export const auditLogs = [
+ {
+ id: 3,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "incident.created" as const,
+ },
+ {
+ id: 2,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.failed" as const,
+ metadata: {
+ region: "ams",
+ status: 500,
+ latency: 1400,
+ } as const,
+ },
+ {
+ id: 1,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "notification.sent" as const,
+ metadata: {
+ provider: "slack",
+ } as const,
+ },
+ {
+ id: 0,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.recovered" as const,
+ metadata: {
+ region: "ams",
+ latency: 140,
+ } as const,
+ },
+ {
+ id: -1,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.degraded" as const,
+ metadata: {
+ region: "ams",
+ latency: 30_000,
+ } as const,
+ },
+ {
+ id: -2,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "incident.resolved" as const,
+ },
+ {
+ id: -3,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "incident.created" as const,
+ },
+ {
+ id: -4,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.degraded" as const,
+ metadata: {
+ region: "ams",
+ latency: 30_000,
+ } as const,
+ },
+ {
+ id: -5,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.degraded" as const,
+ metadata: {
+ region: "ams",
+ latency: 32_000,
+ } as const,
+ },
+ {
+ id: -6,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.degraded" as const,
+ metadata: {
+ region: "ams",
+ latency: 33_000,
+ } as const,
+ },
+ {
+ id: -7,
+ timestamp: new Date("2025-05-05 12:00:00"),
+ action: "monitor.degraded" as const,
+ metadata: {
+ region: "ams",
+ latency: 34_000,
+ } as const,
+ },
+];
+export type AuditLog = (typeof auditLogs)[number];
diff --git a/apps/status-page/src/data/icons.ts b/apps/status-page/src/data/icons.ts
new file mode 100644
index 000000000..32bff55d6
--- /dev/null
+++ b/apps/status-page/src/data/icons.ts
@@ -0,0 +1,14 @@
+"use client";
+
+import { Activity, AlertCircle, SearchCheck } from "lucide-react";
+
+export const status = {
+ operational: SearchCheck,
+ investigating: AlertCircle,
+ identified: AlertCircle,
+ monitoring: Activity,
+} as const;
+
+export const icons = {
+ status,
+};
diff --git a/apps/status-page/src/data/incidents.client.ts b/apps/status-page/src/data/incidents.client.ts
new file mode 100644
index 000000000..fb66628e1
--- /dev/null
+++ b/apps/status-page/src/data/incidents.client.ts
@@ -0,0 +1,33 @@
+import { Bookmark, Check, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "acknowledge",
+ label: "Acknowledge",
+ icon: Bookmark,
+ variant: "default" as const,
+ },
+ {
+ id: "resolve",
+ label: "Resolve",
+ icon: Check,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type IncidentAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<IncidentAction["id"], () => Promise<void> | void>>,
+): (IncidentAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/incidents.ts b/apps/status-page/src/data/incidents.ts
new file mode 100644
index 000000000..d4c242c45
--- /dev/null
+++ b/apps/status-page/src/data/incidents.ts
@@ -0,0 +1,11 @@
+export const incidents = [
+ {
+ id: 1,
+ startedAt: new Date("2025-05-05 12:00:00"),
+ acknowledged: null,
+ resolvedAt: new Date("2025-05-05 14:00:00"),
+ monitor: "OpenStatus API",
+ },
+];
+
+export type Incident = (typeof incidents)[number];
diff --git a/apps/status-page/src/data/invitations.ts b/apps/status-page/src/data/invitations.ts
new file mode 100644
index 000000000..560d4d0c3
--- /dev/null
+++ b/apps/status-page/src/data/invitations.ts
@@ -0,0 +1,12 @@
+export const invitations = [
+ {
+ id: 1,
+ email: "[email protected]",
+ role: "member",
+ createdAt: "2021-01-01",
+ expiresAt: "2021-01-07",
+ acceptedAt: "2021-01-02",
+ },
+];
+
+export type Invitation = (typeof invitations)[number];
diff --git a/apps/status-page/src/data/maintenances.client.ts b/apps/status-page/src/data/maintenances.client.ts
new file mode 100644
index 000000000..013ede965
--- /dev/null
+++ b/apps/status-page/src/data/maintenances.client.ts
@@ -0,0 +1,27 @@
+import { Pencil, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type MaintenanceAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<MaintenanceAction["id"], () => Promise<void> | void>>,
+): (MaintenanceAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/maintenances.ts b/apps/status-page/src/data/maintenances.ts
new file mode 100644
index 000000000..ecd06dd9f
--- /dev/null
+++ b/apps/status-page/src/data/maintenances.ts
@@ -0,0 +1,28 @@
+const today = new Date();
+const week = new Date(today);
+week.setDate(week.getDate() + 7);
+const hour = new Date(week);
+hour.setHours(hour.getHours() + 1);
+
+export const maintenances = [
+ {
+ id: 1,
+ title: "DB Migration",
+ message:
+ "We are performing a db migration on our system and will be down for a an hour.",
+ startDate: week,
+ endDate: hour,
+ affected: ["OpenStatus API"],
+ },
+ {
+ id: 2,
+ title: "System Upgrade",
+ message:
+ "We will be upgrading our core infrastructure to improve performance and reliability. Service interruptions may occur.",
+ startDate: new Date("2025-03-01 11:00:00"),
+ endDate: new Date("2025-03-01 15:30:00"),
+ affected: ["OpenStatus API", "OpenStatus Web"],
+ },
+];
+
+export type Maintenance = (typeof maintenances)[number];
diff --git a/apps/status-page/src/data/members.ts b/apps/status-page/src/data/members.ts
new file mode 100644
index 000000000..389ce7996
--- /dev/null
+++ b/apps/status-page/src/data/members.ts
@@ -0,0 +1,11 @@
+export const members = [
+ {
+ id: 1,
+ name: "Maximilian Kaske",
+ email: "[email protected]",
+ role: "admin",
+ createdAt: "2021-01-01",
+ },
+];
+
+export type Member = (typeof members)[number];
diff --git a/apps/status-page/src/data/monitor-tags.ts b/apps/status-page/src/data/monitor-tags.ts
new file mode 100644
index 000000000..ad2886162
--- /dev/null
+++ b/apps/status-page/src/data/monitor-tags.ts
@@ -0,0 +1,34 @@
+export const monitorTags = [
+ {
+ value: "production",
+ label: "Production",
+ color: "bg-green-500",
+ },
+ {
+ value: "development",
+ label: "Development",
+ color: "bg-blue-500",
+ },
+ {
+ value: "staging",
+ label: "Staging",
+ color: "bg-yellow-500",
+ },
+ {
+ value: "testing",
+ label: "Testing",
+ color: "bg-purple-500",
+ },
+ {
+ value: "api",
+ label: "API",
+ color: "bg-red-500",
+ },
+ {
+ value: "database",
+ label: "Database",
+ color: "bg-orange-500",
+ },
+];
+
+export type MonitorTag = (typeof monitorTags)[number];
diff --git a/apps/status-page/src/data/monitors.client.ts b/apps/status-page/src/data/monitors.client.ts
new file mode 100644
index 000000000..fa373034e
--- /dev/null
+++ b/apps/status-page/src/data/monitors.client.ts
@@ -0,0 +1,45 @@
+import { Code, Copy, CopyPlus, Pencil, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "copy-id",
+ label: "Copy ID",
+ icon: Copy,
+ variant: "default" as const,
+ },
+ {
+ id: "clone",
+ label: "Clone",
+ icon: CopyPlus,
+ variant: "default" as const,
+ },
+ {
+ id: "export",
+ label: "Export Code",
+ icon: Code,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type MonitorAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<MonitorAction["id"], () => Promise<void> | void>>,
+): (MonitorAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/monitors.ts b/apps/status-page/src/data/monitors.ts
new file mode 100644
index 000000000..33351bd38
--- /dev/null
+++ b/apps/status-page/src/data/monitors.ts
@@ -0,0 +1,88 @@
+export const monitors = [
+ {
+ id: 1,
+ name: "OpenStatus Marketing",
+ description: "Marketing website for OpenStatus",
+ public: true,
+ active: true,
+ status: "Normal" as const,
+ url: "https://openstatus.dev",
+ tags: ["Production"],
+ lastIncident: undefined,
+ p50: 110,
+ p90: 200,
+ p99: 250,
+ },
+ {
+ id: 2,
+ name: "OpenStatus API",
+ description: "API for OpenStatus",
+ public: true,
+ active: true,
+ status: "Normal" as const,
+ url: "https://api.openstatus.dev/v1/ping",
+ tags: ["Production", "API"],
+ lastIncident: undefined,
+ p50: 34,
+ p90: 201,
+ p99: 530,
+ },
+ {
+ id: 3,
+ name: "OpenStatus App",
+ description: "Dashboard for OpenStatus",
+ public: true,
+ active: true,
+ status: "Failing" as const,
+ url: "https://openstatus.dev/app",
+ tags: ["Production"],
+ lastIncident: "10 minutes ago",
+ p50: 130,
+ p90: 200,
+ p99: 250,
+ },
+ {
+ id: 4,
+ name: "Lightweight OS",
+ description: "Lightweight Operations System",
+ public: false,
+ active: false,
+ status: "Inactive" as const,
+ url: "https://data-table.openstatus.dev/light",
+ tags: ["Development"],
+ lastIncident: undefined,
+ p50: undefined,
+ p90: undefined,
+ p99: undefined,
+ },
+ {
+ id: 5,
+ name: "Astro Status Page",
+ description: "Status page for Astro",
+ public: false,
+ active: true,
+ status: "Degraded" as const,
+ url: "https://status.openstat.us",
+ tags: ["Development"],
+ lastIncident: undefined,
+ p50: 130,
+ p90: 201,
+ p99: 250,
+ },
+ {
+ id: 6,
+ name: "Vercel Edge Ping",
+ description: "Ping for Vercel Edge",
+ public: false,
+ active: true,
+ status: "Normal" as const,
+ url: "https://light.openstatus.dev",
+ tags: ["Staging"],
+ lastIncident: "15 days ago",
+ p50: 30,
+ p90: 240,
+ p99: 400,
+ },
+];
+
+export type Monitor = (typeof monitors)[number];
diff --git a/apps/status-page/src/data/notifiers.client.ts b/apps/status-page/src/data/notifiers.client.ts
new file mode 100644
index 000000000..0fe85388d
--- /dev/null
+++ b/apps/status-page/src/data/notifiers.client.ts
@@ -0,0 +1,78 @@
+import { FormDiscord } from "@/components/forms/notifier/form-discord";
+import { FormEmail } from "@/components/forms/notifier/form-email";
+import { FormSlack } from "@/components/forms/notifier/form-slack";
+import { FormSms } from "@/components/forms/notifier/form-sms";
+import { FormWebhook } from "@/components/forms/notifier/form-webhook";
+import { DiscordIcon } from "@/components/icons/discord";
+import { OpsGenieIcon } from "@/components/icons/opsgenie";
+import { PagerDutyIcon } from "@/components/icons/pagerduty";
+import { SlackIcon } from "@/components/icons/slack";
+import { Mail, MessageCircle, Pencil, Trash2, Webhook } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type NotifierAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<NotifierAction["id"], () => Promise<void> | void>>,
+): (NotifierAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
+
+// List of the notifiers
+
+export const config = {
+ slack: {
+ icon: SlackIcon,
+ label: "Slack",
+ form: FormSlack,
+ },
+ discord: {
+ icon: DiscordIcon,
+ label: "Discord",
+ form: FormDiscord,
+ },
+ email: {
+ icon: Mail,
+ label: "Email",
+ form: FormEmail,
+ },
+ sms: {
+ icon: MessageCircle,
+ label: "SMS",
+ form: FormSms,
+ },
+ webhook: {
+ icon: Webhook,
+ label: "Webhook",
+ form: FormWebhook,
+ },
+ opsgenie: {
+ icon: OpsGenieIcon,
+ label: "OpsGenie",
+ form: undefined,
+ },
+ pagerduty: {
+ icon: PagerDutyIcon,
+ label: "PagerDuty",
+ form: undefined,
+ },
+};
+
+export type NotifierProvider = keyof typeof config;
diff --git a/apps/status-page/src/data/notifiers.ts b/apps/status-page/src/data/notifiers.ts
new file mode 100644
index 000000000..6937601e2
--- /dev/null
+++ b/apps/status-page/src/data/notifiers.ts
@@ -0,0 +1,10 @@
+export const notifiers = [
+ {
+ id: 1,
+ name: "Email",
+ provider: "email",
+ value: "[email protected]",
+ },
+];
+
+export type Notifier = (typeof notifiers)[number];
diff --git a/apps/status-page/src/data/plans.ts b/apps/status-page/src/data/plans.ts
new file mode 100644
index 000000000..693bea140
--- /dev/null
+++ b/apps/status-page/src/data/plans.ts
@@ -0,0 +1,56 @@
+export const plans = [
+ {
+ title: "Hobby",
+ id: "hobby",
+ description: "Perfect for personal projects",
+ price: 0,
+ limits: {
+ monitors: 1,
+ regions: 35,
+ periodicity: "10m",
+ "status-pages": 1,
+ members: 1,
+ "notification-channels": 1,
+ "custom-domain": false,
+ "password-protection": false,
+ "status-subscribers": false,
+ "audit-log": false,
+ },
+ },
+ {
+ title: "Starter",
+ id: "starter",
+ description: "Perfect for uptime monitoring",
+ price: 30,
+ limits: {
+ monitors: 10,
+ regions: 35,
+ periodicity: "1m",
+ "status-pages": 1,
+ members: Number.POSITIVE_INFINITY,
+ "notification-channels": 10,
+ "custom-domain": true,
+ "password-protection": true,
+ "status-subscribers": true,
+ "audit-log": false,
+ },
+ },
+ {
+ title: "Pro",
+ id: "team",
+ description: "Perfect for global synthetic monitoring",
+ price: 100,
+ limits: {
+ monitors: 100,
+ regions: 35,
+ periodicity: "30s",
+ "status-pages": 5,
+ members: Number.POSITIVE_INFINITY,
+ "notification-channels": 20,
+ "custom-domain": true,
+ "password-protection": true,
+ "status-subscribers": true,
+ "audit-log": true,
+ },
+ },
+];
diff --git a/apps/status-page/src/data/region-metrics.client.ts b/apps/status-page/src/data/region-metrics.client.ts
new file mode 100644
index 000000000..47d92de4f
--- /dev/null
+++ b/apps/status-page/src/data/region-metrics.client.ts
@@ -0,0 +1,27 @@
+import { Filter, Zap } from "lucide-react";
+
+export const actions = [
+ {
+ id: "filter",
+ label: "Filter",
+ icon: Filter,
+ variant: "default" as const,
+ },
+ {
+ id: "trigger",
+ label: "Trigger",
+ icon: Zap,
+ variant: "default" as const,
+ },
+] as const;
+
+export type RegionMetricAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<RegionMetricAction["id"], () => Promise<void> | void>>,
+): (RegionMetricAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/region-metrics.ts b/apps/status-page/src/data/region-metrics.ts
new file mode 100644
index 000000000..babe7139e
--- /dev/null
+++ b/apps/status-page/src/data/region-metrics.ts
@@ -0,0 +1,27 @@
+import type { Region } from "./regions";
+
+export const regionMetrics = [
+ {
+ region: "ams" as const satisfies Region,
+ p50: 100,
+ p90: 150,
+ p99: 200,
+ trend: [{ latency: 100, timestamp: 1716729600 }],
+ },
+ {
+ region: "fra" as const satisfies Region,
+ p50: 110,
+ p90: 155,
+ p99: 220,
+ trend: [{ latency: 100, timestamp: 1716729600 }],
+ },
+ {
+ region: "gru" as const satisfies Region,
+ p50: 120,
+ p90: 160,
+ p99: 230,
+ trend: [{ latency: 100, timestamp: 1716729600 }],
+ },
+];
+
+export type RegionMetric = (typeof regionMetrics)[number];
diff --git a/apps/status-page/src/data/region-percentile.ts b/apps/status-page/src/data/region-percentile.ts
new file mode 100644
index 000000000..763a62cef
--- /dev/null
+++ b/apps/status-page/src/data/region-percentile.ts
@@ -0,0 +1,28 @@
+const randomizer = Math.random() * 10;
+
+export const regionPercentile = Array.from({ length: 30 }, (_, i) => ({
+ timestamp: new Date(
+ new Date().setMinutes(new Date().getMinutes() - i),
+ ).toLocaleString("default", {
+ hour: "numeric",
+ minute: "numeric",
+ }),
+ latency: Math.floor(Math.random() * randomizer + 1) * 100,
+})).map((item, i) => {
+ const baseLatency = item.latency;
+ const randomFactor = () => 0.85 + Math.random() * 0.3; // Random factor between 0.85-1.15
+
+ return {
+ ...item,
+ // More realistic percentile distribution with randomness
+ p50: Math.round(baseLatency * 0.7 * randomFactor()),
+ p75: Math.round(baseLatency * 0.85 * randomFactor()),
+ p90: Math.round(baseLatency * 1.1 * randomFactor()),
+ p95: Math.round(baseLatency * 1.3 * randomFactor()),
+ p99: Math.round(baseLatency * 1.8 * randomFactor()),
+ // REMINDER: for error bars
+ error: [4, 5, 6].includes(i) ? 1 : undefined,
+ };
+});
+
+export type RegionPercentile = (typeof regionPercentile)[number];
diff --git a/apps/status-page/src/data/regions.ts b/apps/status-page/src/data/regions.ts
new file mode 100644
index 000000000..362e0f163
--- /dev/null
+++ b/apps/status-page/src/data/regions.ts
@@ -0,0 +1,226 @@
+export const regions = [
+ {
+ code: "ams",
+ location: "Amsterdam, Netherlands",
+ flag: "🇳🇱",
+ continent: "Europe",
+ },
+ {
+ code: "arn",
+ location: "Stockholm, Sweden",
+ flag: "🇸🇪",
+ continent: "Europe",
+ },
+ {
+ code: "atl",
+ location: "Atlanta, Georgia, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "bog",
+ location: "Bogotá, Colombia",
+ flag: "🇨🇴",
+ continent: "South America",
+ },
+ {
+ code: "bom",
+ location: "Mumbai, India",
+ flag: "🇮🇳",
+ continent: "Asia",
+ },
+ {
+ code: "bos",
+ location: "Boston, Massachusetts, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "cdg",
+ location: "Paris, France",
+ flag: "🇫🇷",
+ continent: "Europe",
+ },
+ {
+ code: "den",
+ location: "Denver, Colorado, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "dfw",
+ location: "Dallas, Texas, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "ewr",
+ location: "Secaucus, New Jersey, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "eze",
+ location: "Ezeiza, Argentina",
+ flag: "🇦🇷",
+ continent: "South America",
+ },
+ {
+ code: "fra",
+ location: "Frankfurt, Germany",
+ flag: "🇩🇪",
+ continent: "Europe",
+ },
+ {
+ code: "gdl",
+ location: "Guadalajara, Mexico",
+ flag: "🇲🇽",
+ continent: "North America",
+ },
+ {
+ code: "gig",
+ location: "Rio de Janeiro, Brazil",
+ flag: "🇧🇷",
+ continent: "South America",
+ },
+ {
+ code: "gru",
+ location: "Sao Paulo, Brazil",
+ flag: "🇧🇷",
+ continent: "South America",
+ },
+ {
+ code: "hkg",
+ location: "Hong Kong, Hong Kong",
+ flag: "🇭🇰",
+ continent: "Asia",
+ },
+ {
+ code: "iad",
+ location: "Ashburn, Virginia, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "jnb",
+ location: "Johannesburg, South Africa",
+ flag: "🇿🇦",
+ continent: "Africa",
+ },
+ {
+ code: "lax",
+ location: "Los Angeles, California, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "lhr",
+ location: "London, United Kingdom",
+ flag: "🇬🇧",
+ continent: "Europe",
+ },
+ {
+ code: "mad",
+ location: "Madrid, Spain",
+ flag: "🇪🇸",
+ continent: "Europe",
+ },
+ {
+ code: "mia",
+ location: "Miami, Florida, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "nrt",
+ location: "Tokyo, Japan",
+ flag: "🇯🇵",
+ continent: "Asia",
+ },
+ {
+ code: "ord",
+ location: "Chicago, Illinois, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "otp",
+ location: "Bucharest, Romania",
+ flag: "🇷🇴",
+ continent: "Europe",
+ },
+ {
+ code: "phx",
+ location: "Phoenix, Arizona, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "qro",
+ location: "Querétaro, Mexico",
+ flag: "🇲🇽",
+ continent: "North America",
+ },
+ {
+ code: "scl",
+ location: "Santiago, Chile",
+ flag: "🇨🇱",
+ continent: "South America",
+ },
+ {
+ code: "sjc",
+ location: "San Jose, California, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "sea",
+ location: "Seattle, Washington, USA",
+ flag: "🇺🇸",
+ continent: "North America",
+ },
+ {
+ code: "sin",
+ location: "Singapore, Singapore",
+ flag: "🇸🇬",
+ continent: "Asia",
+ },
+ {
+ code: "syd",
+ location: "Sydney, Australia",
+ flag: "🇦🇺",
+ continent: "Oceania",
+ },
+ {
+ code: "waw",
+ location: "Warsaw, Poland",
+ flag: "🇵🇱",
+ continent: "Europe",
+ },
+ {
+ code: "yul",
+ location: "Montreal, Canada",
+ flag: "🇨🇦",
+ continent: "North America",
+ },
+ {
+ code: "yyz",
+ location: "Toronto, Canada",
+ flag: "🇨🇦",
+ continent: "North America",
+ },
+] as const;
+
+export type Region = (typeof regions)[number]["code"];
+
+export const groupedRegions = regions.reduce(
+ (acc, region) => {
+ const continent = region.continent;
+ if (!acc[continent]) {
+ acc[continent] = [];
+ }
+ acc[continent].push(region.code);
+ return acc;
+ },
+ {} as Record<string, Region[]>,
+);
diff --git a/apps/status-page/src/data/response-logs.ts b/apps/status-page/src/data/response-logs.ts
new file mode 100644
index 000000000..cf0e5fb78
--- /dev/null
+++ b/apps/status-page/src/data/response-logs.ts
@@ -0,0 +1,60 @@
+export const responseLogs = [
+ {
+ id: 1,
+ url: "https://api.openstatus.dev",
+ method: "GET",
+ status: 200 as const,
+ latency: 150,
+ timing: {
+ dns: 10,
+ connect: 20,
+ tls: 30,
+ ttfb: 40,
+ transfer: 50,
+ },
+ assertions: [],
+ region: "ams" as const,
+ error: false,
+ timestamp: new Date().getTime(),
+ headers: {
+ "Cache-Control":
+ "private, no-cache, no-store, max-age=0, must-revalidate",
+ "Content-Type": "text/html; charset=utf-8",
+ Date: "Sun, 28 Jan 2024 08:50:13 GMT",
+ Server: "Vercel",
+ },
+ type: "scheduled" as const satisfies "scheduled" | "on-demand",
+ },
+ {
+ id: 2,
+ url: "https://api.openstatus.dev",
+ method: "GET",
+ status: 500 as const,
+ latency: 150,
+ timing: {
+ dns: 4,
+ connect: 120,
+ tls: 12,
+ ttfb: 20,
+ transfer: 40,
+ },
+ assertions: [],
+ region: "ams" as const,
+ error: true,
+ timestamp: new Date().getTime(),
+ headers: {
+ "Cache-Control":
+ "private, no-cache, no-store, max-age=0, must-revalidate",
+ "Content-Type": "text/html; charset=utf-8",
+ Date: "Sun, 28 Jan 2024 08:50:13 GMT",
+ Server: "Vercel",
+ },
+ type: "scheduled" as const satisfies "scheduled" | "on-demand",
+ // error message
+ message:
+ "Environment variable 'NEXT_PUBLIC_TEST_KEY' is missing. Please add and redeploy your project.",
+ },
+];
+
+export type ResponseLog = (typeof responseLogs)[number];
+export type Timing = ResponseLog["timing"];
diff --git a/apps/status-page/src/data/status-codes.ts b/apps/status-page/src/data/status-codes.ts
new file mode 100644
index 000000000..1d4fc2f11
--- /dev/null
+++ b/apps/status-page/src/data/status-codes.ts
@@ -0,0 +1,16 @@
+export const statusCodes = [
+ {
+ code: 200 as const,
+ bg: "bg-success",
+ text: "text-success",
+ name: "OK",
+ },
+ {
+ code: 500 as const,
+ bg: "bg-destructive",
+ text: "text-destructive",
+ name: "Internal Server Error",
+ },
+];
+
+export type StatusCode = (typeof statusCodes)[number]["code"];
diff --git a/apps/status-page/src/data/status-pages.client.ts b/apps/status-page/src/data/status-pages.client.ts
new file mode 100644
index 000000000..894038272
--- /dev/null
+++ b/apps/status-page/src/data/status-pages.client.ts
@@ -0,0 +1,39 @@
+import { Copy, Pencil, Tag, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "copy-id",
+ label: "Copy ID",
+ icon: Copy,
+ variant: "default" as const,
+ },
+ {
+ id: "create-badge",
+ label: "Create Badge",
+ icon: Tag,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type StatusPageAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<Record<StatusPageAction["id"], () => Promise<void> | void>>,
+): (StatusPageAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/status-pages.ts b/apps/status-page/src/data/status-pages.ts
new file mode 100644
index 000000000..ef5a7bd1f
--- /dev/null
+++ b/apps/status-page/src/data/status-pages.ts
@@ -0,0 +1,17 @@
+export const statusPages = [
+ {
+ id: 1,
+ name: "OpenStatus Status",
+ description: "See our uptime history and status reports.",
+ slug: "status",
+ favicon: "https://openstatus.dev/favicon.ico",
+ domain: "status.openstatus.dev",
+ protected: true,
+ showValues: false,
+ // NOTE: the worst status of a report
+ status: "degraded" as const,
+ monitors: [],
+ },
+];
+
+export type StatusPage = (typeof statusPages)[number];
diff --git a/apps/status-page/src/data/status-report-updates.client.ts b/apps/status-page/src/data/status-report-updates.client.ts
new file mode 100644
index 000000000..b1b10f9ae
--- /dev/null
+++ b/apps/status-page/src/data/status-report-updates.client.ts
@@ -0,0 +1,29 @@
+import { Pencil, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type StatusReportUpdateAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<
+ Record<StatusReportUpdateAction["id"], () => Promise<void> | void>
+ >,
+): (StatusReportUpdateAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/status-reports.client.ts b/apps/status-page/src/data/status-reports.client.ts
new file mode 100644
index 000000000..b05a95f43
--- /dev/null
+++ b/apps/status-page/src/data/status-reports.client.ts
@@ -0,0 +1,35 @@
+import { Pencil, Plus, Trash2 } from "lucide-react";
+
+export const actions = [
+ {
+ id: "edit",
+ label: "Edit",
+ icon: Pencil,
+ variant: "default" as const,
+ },
+ {
+ id: "create-update",
+ label: "Create Update",
+ icon: Plus,
+ variant: "default" as const,
+ },
+ {
+ id: "delete",
+ label: "Delete",
+ icon: Trash2,
+ variant: "destructive" as const,
+ },
+] as const;
+
+export type StatusReportUpdateAction = (typeof actions)[number];
+
+export const getActions = (
+ props: Partial<
+ Record<StatusReportUpdateAction["id"], () => Promise<void> | void>
+ >,
+): (StatusReportUpdateAction & { onClick?: () => Promise<void> | void })[] => {
+ return actions.map((action) => ({
+ ...action,
+ onClick: props[action.id as keyof typeof props],
+ }));
+};
diff --git a/apps/status-page/src/data/status-reports.ts b/apps/status-page/src/data/status-reports.ts
new file mode 100644
index 000000000..189b4a966
--- /dev/null
+++ b/apps/status-page/src/data/status-reports.ts
@@ -0,0 +1,84 @@
+const today = new Date();
+const lastHour = new Date(new Date().setHours(new Date().getHours() - 1));
+const yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
+
+console.log({ today, lastHour, yesterday });
+
+export const statusReports = [
+ {
+ id: 1,
+ name: "Downtime API due to hosting provider with 400 errors",
+ startedAt: yesterday,
+ updatedAt: today,
+ status: "operational",
+ updates: [
+ {
+ id: 2,
+ status: "operational" as const,
+ message:
+ "Everything is under control, we continue to monitor the situation.",
+ date: today,
+ updatedAt: today,
+ monitors: [1],
+ },
+ {
+ id: 1,
+ status: "investigating" as const,
+ message:
+ "Our hosting provider is having an increase of 400 errors. We are aware of the dependency and will be working on a solution to reduce the risk.",
+ date: lastHour,
+ updatedAt: lastHour,
+ monitors: [1],
+ },
+ ],
+ affected: ["OpenStatus API"],
+ },
+ {
+ id: 3,
+ name: "Downtime API due to hosting provider with 400 errors",
+ startedAt: new Date("2025-08-05 12:10:00"),
+ updatedAt: new Date("2025-08-05 12:30:00"),
+ status: "operational",
+ updates: [
+ {
+ id: 4,
+ status: "operational" as const,
+ message:
+ "Everything is under control, we continue to monitor the situation.",
+ date: new Date("2025-08-06 03:30:00"),
+ updatedAt: new Date("2025-08-06 03:30:00"),
+ monitors: [1],
+ },
+ {
+ id: 3,
+ status: "monitoring" as const,
+ message:
+ "We are continuing to monitor the situation to ensure that the issue is resolved.",
+ date: new Date("2025-08-05 16:00:00"),
+ updatedAt: new Date("2025-08-05 16:00:00"),
+ monitors: [1],
+ },
+ {
+ id: 2,
+ status: "identified" as const,
+ message:
+ "We have identified the root cause of the issue. It is due to a configuration error on our part.",
+ date: new Date("2025-08-05 14:00:00"),
+ updatedAt: new Date("2025-08-05 14:00:00"),
+ monitors: [1],
+ },
+ {
+ id: 1,
+ status: "investigating" as const,
+ message:
+ "Our hosting provider is having an increase of 400 errors. We are working on a solution to reduce the risk.",
+ date: new Date("2025-08-05 12:00:00"),
+ updatedAt: new Date("2025-08-05 12:00:00"),
+ monitors: [1],
+ },
+ ],
+ affected: ["OpenStatus API"],
+ },
+];
+
+export type StatusReport = (typeof statusReports)[number];
diff --git a/apps/status-page/src/data/subscribers.ts b/apps/status-page/src/data/subscribers.ts
new file mode 100644
index 000000000..40c5584c1
--- /dev/null
+++ b/apps/status-page/src/data/subscribers.ts
@@ -0,0 +1,16 @@
+export const subscribers = [
+ {
+ id: "1",
+ email: "[email protected]",
+ createdAt: "2025-05-20",
+ validatedAt: "2025-05-20",
+ },
+ {
+ id: "2",
+ email: "[email protected]",
+ createdAt: "2025-05-20",
+ validatedAt: "2025-05-20",
+ },
+];
+
+export type Subscriber = (typeof subscribers)[number];
diff --git a/apps/status-page/src/hooks/use-cookie-state.ts b/apps/status-page/src/hooks/use-cookie-state.ts
new file mode 100644
index 000000000..926bf8782
--- /dev/null
+++ b/apps/status-page/src/hooks/use-cookie-state.ts
@@ -0,0 +1,41 @@
+"use client";
+
+import { useCallback, useEffect, useState } from "react";
+
+export function useCookieState<T extends string>(
+ name: string,
+ defaultValue?: T,
+ config?: { expires?: number },
+) {
+ const [state, setState] = useState<T | undefined>();
+
+ const handleChange = useCallback(
+ (value: T) => {
+ if (document) {
+ const date = new Date();
+ date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000); // in one year
+ document.cookie = `${name}=${value}; path=/; expires=${
+ config?.expires ?? date.toUTCString()
+ }`;
+ setState(value);
+ }
+ },
+ [name, config],
+ );
+
+ useEffect(() => {
+ if (document) {
+ const cookie = document.cookie
+ .split("; ")
+ .find((row) => row.startsWith(name));
+ if (!cookie) {
+ setState(defaultValue);
+ return;
+ }
+ const value = cookie.split("=")[1] as T;
+ setState(value);
+ }
+ }, [defaultValue, name]);
+
+ return [state, handleChange] as const;
+}
diff --git a/apps/status-page/src/hooks/use-copy-to-clipboard.ts b/apps/status-page/src/hooks/use-copy-to-clipboard.ts
new file mode 100644
index 000000000..656ceefc2
--- /dev/null
+++ b/apps/status-page/src/hooks/use-copy-to-clipboard.ts
@@ -0,0 +1,52 @@
+"use client";
+
+import { useCallback, useState } from "react";
+import { toast } from "sonner";
+
+export function useCopyToClipboard() {
+ const [text, setText] = useState<string | null>(null);
+
+ const copy = useCallback(
+ async (
+ text: string,
+ {
+ timeout = 3000,
+ withToast = true,
+ successMessage = "Copied to clipboard",
+ }: {
+ timeout?: number;
+ withToast?: boolean;
+ successMessage?: string;
+ },
+ ) => {
+ if (!navigator?.clipboard) {
+ console.warn("Clipboard not supported");
+ return false;
+ }
+
+ try {
+ await navigator.clipboard.writeText(text);
+ setText(text);
+
+ if (timeout) {
+ setTimeout(() => {
+ setText(null);
+ }, timeout);
+ }
+
+ if (withToast) {
+ toast.success(successMessage);
+ }
+
+ return true;
+ } catch (error) {
+ console.warn("Copy failed", error);
+ setText(null);
+ return false;
+ }
+ },
+ [],
+ );
+
+ return { text, copy, isCopied: text !== null };
+}
diff --git a/apps/status-page/src/hooks/use-debounce.ts b/apps/status-page/src/hooks/use-debounce.ts
new file mode 100644
index 000000000..3a34896de
--- /dev/null
+++ b/apps/status-page/src/hooks/use-debounce.ts
@@ -0,0 +1,16 @@
+import * as React from "react";
+
+// consider using https://github.com/xnimorz/use-debounce
+export function useDebounce<T>(value: T, delay?: number): T {
+ const [debouncedValue, setDebouncedValue] = React.useState<T>(value);
+
+ React.useEffect(() => {
+ const timer = setTimeout(() => setDebouncedValue(value), delay ?? 500);
+
+ return () => {
+ clearTimeout(timer);
+ };
+ }, [value, delay]);
+
+ return debouncedValue;
+}
diff --git a/apps/status-page/src/hooks/use-media-query.ts b/apps/status-page/src/hooks/use-media-query.ts
new file mode 100644
index 000000000..7ac3915ab
--- /dev/null
+++ b/apps/status-page/src/hooks/use-media-query.ts
@@ -0,0 +1,19 @@
+import * as React from "react";
+
+export function useMediaQuery(query: string) {
+ const [value, setValue] = React.useState(false);
+
+ React.useEffect(() => {
+ function onChange(event: MediaQueryListEvent) {
+ setValue(event.matches);
+ }
+
+ const result = matchMedia(query);
+ result.addEventListener("change", onChange);
+ setValue(result.matches);
+
+ return () => result.removeEventListener("change", onChange);
+ }, [query]);
+
+ return value;
+}
diff --git a/apps/status-page/src/hooks/use-mobile.ts b/apps/status-page/src/hooks/use-mobile.ts
new file mode 100644
index 000000000..a93d58393
--- /dev/null
+++ b/apps/status-page/src/hooks/use-mobile.ts
@@ -0,0 +1,21 @@
+import * as React from "react";
+
+const MOBILE_BREAKPOINT = 768;
+
+export function useIsMobile() {
+ const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
+ undefined,
+ );
+
+ React.useEffect(() => {
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
+ const onChange = () => {
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
+ };
+ mql.addEventListener("change", onChange);
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
+ return () => mql.removeEventListener("change", onChange);
+ }, []);
+
+ return !!isMobile;
+}
diff --git a/apps/status-page/src/instrumentation.ts b/apps/status-page/src/instrumentation.ts
new file mode 100644
index 000000000..ecb65282b
--- /dev/null
+++ b/apps/status-page/src/instrumentation.ts
@@ -0,0 +1,13 @@
+import * as Sentry from "@sentry/nextjs";
+
+export async function register() {
+ if (process.env.NEXT_RUNTIME === "nodejs") {
+ await import("../sentry.server.config");
+ }
+
+ if (process.env.NEXT_RUNTIME === "edge") {
+ await import("../sentry.edge.config");
+ }
+}
+
+export const onRequestError = Sentry.captureRequestError;
diff --git a/apps/status-page/src/lib/composition.ts b/apps/status-page/src/lib/composition.ts
new file mode 100644
index 000000000..b65a7008a
--- /dev/null
+++ b/apps/status-page/src/lib/composition.ts
@@ -0,0 +1,87 @@
+import * as React from "react";
+
+/**
+ * A utility to compose multiple event handlers into a single event handler.
+ * Run originalEventHandler first, then ourEventHandler unless prevented.
+ */
+function composeEventHandlers<E>(
+ originalEventHandler?: (event: E) => void,
+ ourEventHandler?: (event: E) => void,
+ { checkForDefaultPrevented = true } = {},
+) {
+ return function handleEvent(event: E) {
+ originalEventHandler?.(event);
+
+ if (
+ checkForDefaultPrevented === false ||
+ !(event as unknown as Event).defaultPrevented
+ ) {
+ return ourEventHandler?.(event);
+ }
+ };
+}
+
+/**
+ * @see https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx
+ */
+
+type PossibleRef<T> = React.Ref<T> | undefined;
+
+/**
+ * Set a given ref to a given value.
+ * This utility takes care of different types of refs: callback refs and RefObject(s).
+ */
+function setRef<T>(ref: PossibleRef<T>, value: T) {
+ if (typeof ref === "function") {
+ return ref(value);
+ }
+
+ if (ref !== null && ref !== undefined) {
+ ref.current = value;
+ }
+}
+
+/**
+ * A utility to compose multiple refs together.
+ * Accepts callback refs and RefObject(s).
+ */
+function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {
+ return (node) => {
+ let hasCleanup = false;
+ const cleanups = refs.map((ref) => {
+ const cleanup = setRef(ref, node);
+ if (!hasCleanup && typeof cleanup === "function") {
+ hasCleanup = true;
+ }
+ return cleanup;
+ });
+
+ // React <19 will log an error to the console if a callback ref returns a
+ // value. We don't use ref cleanups internally so this will only happen if a
+ // user's ref callback returns a value, which we only expect if they are
+ // using the cleanup functionality added in React 19.
+ if (hasCleanup) {
+ return () => {
+ for (let i = 0; i < cleanups.length; i++) {
+ const cleanup = cleanups[i];
+ if (typeof cleanup === "function") {
+ cleanup();
+ } else {
+ setRef(refs[i], null);
+ }
+ }
+ };
+ }
+ };
+}
+
+/**
+ * A custom hook that composes multiple refs.
+ * Accepts callback refs and RefObject(s).
+ */
+function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ return React.useCallback(composeRefs(...refs), refs);
+}
+
+export { composeEventHandlers, composeRefs, useComposedRefs };
diff --git a/apps/status-page/src/lib/formatter.ts b/apps/status-page/src/lib/formatter.ts
new file mode 100644
index 000000000..781fa29e5
--- /dev/null
+++ b/apps/status-page/src/lib/formatter.ts
@@ -0,0 +1,98 @@
+import { endOfDay, isSameDay, startOfDay } from "date-fns";
+
+export function formatMilliseconds(ms: number) {
+ if (ms > 1000) {
+ return `${Intl.NumberFormat("en-US", {
+ style: "unit",
+ unit: "second",
+ maximumFractionDigits: 2,
+ }).format(ms / 1000)}`;
+ }
+
+ return `${Intl.NumberFormat("en-US", {
+ style: "unit",
+ unit: "millisecond",
+ }).format(ms)}`;
+}
+
+export function formatPercentage(value: number) {
+ if (Number.isNaN(value)) return "100%";
+ return `${Intl.NumberFormat("en-US", {
+ style: "percent",
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ }).format(value)}`;
+}
+
+export function formatNumber(
+ value: number,
+ options?: Intl.NumberFormatOptions,
+) {
+ return `${Intl.NumberFormat("en-US", options).format(value)}`;
+}
+
+// TODO: think of supporting custom formats
+
+export function formatDate(date: Date, options?: Intl.DateTimeFormatOptions) {
+ return date.toLocaleDateString("en-US", {
+ year: "numeric",
+ month: "long",
+ day: "numeric",
+ ...options,
+ });
+}
+
+export function formatDateTime(date: Date) {
+ return date.toLocaleDateString("en-US", {
+ month: "long",
+ day: "numeric",
+ hour: "numeric",
+ minute: "numeric",
+ });
+}
+
+export function formatTime(date: Date) {
+ return date.toLocaleTimeString("en-US", {
+ hour: "numeric",
+ minute: "numeric",
+ });
+}
+
+export function formatDateRange(from?: Date, to?: Date) {
+ const sameDay = from && to && isSameDay(from, to);
+ const isFromStartDay = from && startOfDay(from).getTime() === from.getTime();
+ const isToEndDay = to && endOfDay(to).getTime() === to.getTime();
+
+ if (sameDay) {
+ if (from && to) {
+ return `${formatDateTime(from)} - ${formatTime(to)}`;
+ }
+ }
+
+ if (from && to) {
+ if (isFromStartDay && isToEndDay) {
+ return `${formatDate(from)} - ${formatDate(to)}`;
+ }
+ return `${formatDateTime(from)} - ${formatDateTime(to)}`;
+ }
+
+ if (to) {
+ return `Until ${formatDateTime(to)}`;
+ }
+
+ if (from) {
+ return `Since ${formatDateTime(from)}`;
+ }
+
+ return "All time";
+}
+
+export function formatDateForInput(date: Date): string {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ const hours = String(date.getHours()).padStart(2, "0");
+ const minutes = String(date.getMinutes()).padStart(2, "0");
+
+ return `${year}-${month}-${day}T${hours}:${minutes}`;
+}
diff --git a/apps/status-page/src/lib/trpc/client.tsx b/apps/status-page/src/lib/trpc/client.tsx
new file mode 100644
index 000000000..9d1609037
--- /dev/null
+++ b/apps/status-page/src/lib/trpc/client.tsx
@@ -0,0 +1,65 @@
+"use client";
+
+import { endingLink } from "@/lib/trpc/shared";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { createTRPCClient, loggerLink } from "@trpc/client";
+import { createTRPCContext } from "@trpc/tanstack-react-query";
+import { useState } from "react";
+
+import type { AppRouter } from "@openstatus/api";
+
+export const { TRPCProvider, useTRPC, useTRPCClient } =
+ createTRPCContext<AppRouter>();
+
+function makeQueryClient() {
+ return new QueryClient({
+ defaultOptions: {
+ queries: {
+ // With SSR, we usually want to set some default staleTime
+ // above 0 to avoid refetching immediately on the client
+ staleTime: 60 * 1000,
+ },
+ },
+ });
+}
+let browserQueryClient: QueryClient | undefined = undefined;
+function getQueryClient() {
+ if (typeof window === "undefined") {
+ // Server: always make a new query client
+ return makeQueryClient();
+ }
+ // Browser: make a new query client if we don't already have one
+ // This is very important, so we don't re-make a new client if React
+ // suspends during the initial render. This may not be needed if we
+ // have a suspense boundary BELOW the creation of the query client
+ if (!browserQueryClient) browserQueryClient = makeQueryClient();
+ return browserQueryClient;
+}
+
+export function TRPCReactProvider({ children }: { children: React.ReactNode }) {
+ const queryClient = getQueryClient();
+ const [trpcClient] = useState(() =>
+ createTRPCClient<AppRouter>({
+ links: [
+ loggerLink({
+ enabled: (opts) =>
+ process.env.NODE_ENV === "development" ||
+ (opts.direction === "down" && opts.result instanceof Error),
+ }),
+ endingLink({
+ headers: {
+ "x-trpc-source": "client",
+ },
+ }),
+ ],
+ }),
+ );
+
+ return (
+ <QueryClientProvider client={queryClient}>
+ <TRPCProvider trpcClient={trpcClient} queryClient={queryClient}>
+ {children}
+ </TRPCProvider>
+ </QueryClientProvider>
+ );
+}
diff --git a/apps/status-page/src/lib/trpc/query-client.ts b/apps/status-page/src/lib/trpc/query-client.ts
new file mode 100644
index 000000000..4fd826fe5
--- /dev/null
+++ b/apps/status-page/src/lib/trpc/query-client.ts
@@ -0,0 +1,20 @@
+import {
+ QueryClient,
+ defaultShouldDehydrateQuery,
+} from "@tanstack/react-query";
+
+export function makeQueryClient() {
+ return new QueryClient({
+ defaultOptions: {
+ queries: {
+ staleTime: 60 * 1000,
+ },
+ dehydrate: {
+ shouldDehydrateQuery: (query) =>
+ defaultShouldDehydrateQuery(query) ||
+ query.state.status === "pending",
+ },
+ hydrate: {},
+ },
+ });
+}
diff --git a/apps/status-page/src/lib/trpc/server.tsx b/apps/status-page/src/lib/trpc/server.tsx
new file mode 100644
index 000000000..33cb12c65
--- /dev/null
+++ b/apps/status-page/src/lib/trpc/server.tsx
@@ -0,0 +1,88 @@
+import "server-only";
+
+import type { AppRouter } from "@openstatus/api";
+
+import { HydrationBoundary } from "@tanstack/react-query";
+import { dehydrate } from "@tanstack/react-query";
+import { createTRPCClient, loggerLink } from "@trpc/client";
+import {
+ type TRPCQueryOptions,
+ createTRPCOptionsProxy,
+} from "@trpc/tanstack-react-query";
+import { cookies } from "next/headers";
+import { cache } from "react";
+import { makeQueryClient } from "./query-client";
+import { endingLink } from "./shared";
+
+// IMPORTANT: Create a stable getter for the query client that
+// will return the same client during the same request.
+export const getQueryClient = cache(makeQueryClient);
+
+export const trpc = createTRPCOptionsProxy<AppRouter>({
+ queryClient: getQueryClient,
+ client: createTRPCClient({
+ links: [
+ loggerLink({
+ enabled: (opts) =>
+ process.env.NODE_ENV === "development" ||
+ (opts.direction === "down" && opts.result instanceof Error),
+ }),
+ endingLink({
+ headers: {
+ "x-trpc-source": "server",
+ },
+ async fetch(url, options) {
+ const cookieStore = await cookies();
+ return fetch(url, {
+ ...options,
+ credentials: "include",
+ headers: {
+ ...options?.headers,
+ cookie: cookieStore.toString(),
+ },
+ });
+ },
+ }),
+ ],
+ }),
+});
+
+export function HydrateClient(props: { children: React.ReactNode }) {
+ const queryClient = getQueryClient();
+
+ return (
+ <HydrationBoundary state={dehydrate(queryClient)}>
+ {props.children}
+ </HydrationBoundary>
+ );
+}
+
+// biome-ignore lint/suspicious/noExplicitAny: FIXME: remove any
+export function prefetch<T extends ReturnType<TRPCQueryOptions<any>>>(
+ queryOptions: T,
+) {
+ const queryClient = getQueryClient();
+
+ if (queryOptions.queryKey[1]?.type === "infinite") {
+ // biome-ignore lint/suspicious/noExplicitAny: FIXME: remove any
+ void queryClient.prefetchInfiniteQuery(queryOptions as any);
+ } else {
+ void queryClient.prefetchQuery(queryOptions);
+ }
+}
+
+// biome-ignore lint/suspicious/noExplicitAny: FIXME: remove any
+export function batchPrefetch<T extends ReturnType<TRPCQueryOptions<any>>>(
+ queryOptionsArray: T[],
+) {
+ const queryClient = getQueryClient();
+
+ for (const queryOptions of queryOptionsArray) {
+ if (queryOptions.queryKey[1]?.type === "infinite") {
+ // biome-ignore lint/suspicious/noExplicitAny: FIXME: remove any
+ void queryClient.prefetchInfiniteQuery(queryOptions as any);
+ } else {
+ void queryClient.prefetchQuery(queryOptions);
+ }
+ }
+}
diff --git a/apps/status-page/src/lib/trpc/shared.ts b/apps/status-page/src/lib/trpc/shared.ts
new file mode 100644
index 000000000..a3290046c
--- /dev/null
+++ b/apps/status-page/src/lib/trpc/shared.ts
@@ -0,0 +1,48 @@
+import type { HTTPBatchLinkOptions, HTTPHeaders, TRPCLink } from "@trpc/client";
+import { httpBatchLink } from "@trpc/client";
+
+import type { AppRouter } from "@openstatus/api";
+import superjson from "superjson";
+
+const getBaseUrl = () => {
+ if (typeof window !== "undefined") return "";
+ const vc = process.env.VERCEL_URL;
+ // if (vc) return `https://${vc}`;
+ if (vc) return "https://app.openstatus.dev";
+ return "http://localhost:3000";
+};
+
+const lambdas = ["stripeRouter", "emailRouter"];
+
+export const endingLink = (opts?: {
+ fetch?: typeof fetch;
+ headers?: HTTPHeaders | (() => HTTPHeaders | Promise<HTTPHeaders>);
+}) =>
+ ((runtime) => {
+ const sharedOpts = {
+ headers: opts?.headers,
+ fetch: opts?.fetch,
+ transformer: superjson,
+ // biome-ignore lint/suspicious/noExplicitAny: FIXME: remove any
+ } satisfies Partial<HTTPBatchLinkOptions<any>>;
+
+ const edgeLink = httpBatchLink({
+ ...sharedOpts,
+ url: `${getBaseUrl()}/api/trpc/edge`,
+ })(runtime);
+ const lambdaLink = httpBatchLink({
+ ...sharedOpts,
+ url: `${getBaseUrl()}/api/trpc/lambda`,
+ })(runtime);
+
+ return (ctx) => {
+ const path = ctx.op.path.split(".") as [string, ...string[]];
+ const endpoint = lambdas.includes(path[0]) ? "lambda" : "edge";
+
+ const newCtx = {
+ ...ctx,
+ op: { ...ctx.op, path: path.join(".") },
+ };
+ return endpoint === "edge" ? edgeLink(newCtx) : lambdaLink(newCtx);
+ };
+ }) satisfies TRPCLink<AppRouter>;
diff --git a/apps/status-page/src/lib/utils.ts b/apps/status-page/src/lib/utils.ts
new file mode 100644
index 000000000..365058ceb
--- /dev/null
+++ b/apps/status-page/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from "clsx";
+import { twMerge } from "tailwind-merge";
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs));
+}
diff --git a/apps/status-page/tsconfig.json b/apps/status-page/tsconfig.json
new file mode 100644
index 000000000..48872953b
--- /dev/null
+++ b/apps/status-page/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "target": "ES2017",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "strictNullChecks": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "incremental": true,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules"]
+}
diff --git a/package.json b/package.json
index ea167ad7d..f129b2ef2 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"env": "bun env.ts",
"lint": "biome lint .",
"format": "pnpm biome format . --write && pnpm biome check . --write ",
+ "format:fix": "pnpm biome check --fix --unsafe .",
"lint:fix": "pnpm biome lint --write --unsafe .",
"lint:turbo": "turbo run lint",
"dev:web": "turbo run dev --filter='./apps/web' --filter='./packages/db'",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 78b970d9b..00ea9b554 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -64,7 +64,7 @@ importers:
'@openpanel/nextjs':
specifier: 1.0.8
'@openstatus/analytics':
specifier: workspace:*
version: link:../../packages/analytics
@@ -181,7 +181,7 @@ importers:
'@sentry/nextjs':
specifier: 8.46.0
'@stripe/stripe-js':
specifier: 2.1.6
version: 2.1.6
@@ -196,7 +196,7 @@ importers:
'@trpc/next':
specifier: 11.4.4
'@trpc/react-query':
specifier: 11.4.4
@@ -484,6 +484,268 @@ importers:
specifier: 16.3.1
version: 16.3.1
+ apps/status-page:
+ dependencies:
+ '@date-fns/tz':
+ specifier: 1.2.0
+ version: 1.2.0
+ '@date-fns/utc':
+ specifier: 2.1.0
+ version: 2.1.0
+ '@dnd-kit/core':
+ specifier: 6.3.1
+ '@dnd-kit/modifiers':
+ specifier: 9.0.0
+ '@dnd-kit/sortable':
+ specifier: 10.0.0
+ '@dnd-kit/utilities':
+ specifier: 3.2.2
+ version: 3.2.2([email protected])
+ '@hookform/devtools':
+ specifier: 4.4.0
+ '@hookform/resolvers':
+ specifier: 3.9.1
+ '@libsql/client':
+ specifier: 0.15.9
+ '@openpanel/nextjs':
+ specifier: 1.0.8
+ '@openstatus/analytics':
+ specifier: workspace:*
+ version: link:../../packages/analytics
+ '@openstatus/api':
+ specifier: workspace:*
+ version: link:../../packages/api
+ '@openstatus/assertions':
+ specifier: workspace:*
+ version: link:../../packages/assertions
+ '@openstatus/db':
+ specifier: workspace:*
+ version: link:../../packages/db
+ '@openstatus/emails':
+ specifier: workspace:*
+ version: link:../../packages/emails
+ '@openstatus/error':
+ specifier: workspace:*
+ version: link:../../packages/error
+ '@openstatus/header-analysis':
+ specifier: workspace:*
+ version: link:../../packages/header-analysis
+ '@openstatus/notification-discord':
+ specifier: workspace:*
+ version: link:../../packages/notifications/discord
+ '@openstatus/notification-emails':
+ specifier: workspace:*
+ version: link:../../packages/notifications/email
+ '@openstatus/notification-ntfy':
+ specifier: workspace:*
+ version: link:../../packages/notifications/ntfy
+ '@openstatus/notification-opsgenie':
+ specifier: workspace:*
+ version: link:../../packages/notifications/opsgenie
+ '@openstatus/notification-pagerduty':
+ specifier: workspace:*
+ version: link:../../packages/notifications/pagerduty
+ '@openstatus/notification-slack':
+ specifier: workspace:*
+ version: link:../../packages/notifications/slack
+ '@openstatus/notification-webhook':
+ specifier: workspace:*
+ version: link:../../packages/notifications/webhook
+ '@openstatus/react':
+ specifier: workspace:*
+ version: link:../../packages/react
+ '@openstatus/tinybird':
+ specifier: workspace:*
+ version: link:../../packages/tinybird
+ '@openstatus/tracker':
+ specifier: workspace:*
+ version: link:../../packages/tracker
+ '@openstatus/upstash':
+ specifier: workspace:*
+ version: link:../../packages/upstash
+ '@openstatus/utils':
+ specifier: workspace:*
+ version: link:../../packages/utils
+ '@radix-ui/react-alert-dialog':
+ specifier: 1.1.14
+ '@radix-ui/react-avatar':
+ specifier: 1.1.10
+ '@radix-ui/react-checkbox':
+ specifier: 1.3.2
+ '@radix-ui/react-collapsible':
+ specifier: 1.1.11
+ '@radix-ui/react-dialog':
+ specifier: 1.1.14
+ '@radix-ui/react-dropdown-menu':
+ specifier: 2.1.15
+ '@radix-ui/react-hover-card':
+ specifier: 1.1.14
+ '@radix-ui/react-label':
+ specifier: 2.1.7
+ '@radix-ui/react-popover':
+ specifier: 1.1.14
+ '@radix-ui/react-portal':
+ specifier: 1.1.9
+ '@radix-ui/react-progress':
+ specifier: 1.1.7
+ '@radix-ui/react-radio-group':
+ specifier: 1.3.7
+ '@radix-ui/react-select':
+ specifier: 2.2.5
+ '@radix-ui/react-separator':
+ specifier: 1.1.7
+ '@radix-ui/react-slider':
+ specifier: 1.3.5
+ '@radix-ui/react-slot':
+ specifier: 1.2.3
+ version: 1.2.3(@types/[email protected])([email protected])
+ '@radix-ui/react-switch':
+ specifier: 1.2.5
+ '@radix-ui/react-tabs':
+ specifier: 1.1.12
+ '@radix-ui/react-tooltip':
+ specifier: 1.2.7
+ '@sentry/nextjs':
+ specifier: 8.46.0
+ '@tanstack/react-query':
+ specifier: 5.81.5
+ version: 5.81.5([email protected])
+ '@tanstack/react-table':
+ specifier: 8.21.3
+ '@trpc/client':
+ specifier: 11.4.4
+ '@trpc/next':
+ specifier: 11.4.4
+ '@trpc/react-query':
+ specifier: 11.4.4
+ '@trpc/server':
+ specifier: 11.4.4
+ version: 11.4.4([email protected])
+ '@trpc/tanstack-react-query':
+ specifier: 11.4.4
+ class-variance-authority:
+ specifier: 0.7.1
+ version: 0.7.1
+ clsx:
+ specifier: 2.1.1
+ version: 2.1.1
+ cmdk:
+ specifier: 1.1.1
+ date-fns:
+ specifier: 4.1.0
+ version: 4.1.0
+ lucide-react:
+ specifier: 0.525.0
+ version: 0.525.0([email protected])
+ next:
+ specifier: 15.4.7
+ next-themes:
+ specifier: 0.4.6
+ nuqs:
+ specifier: 2.4.3
+ react:
+ specifier: 19.1.1
+ version: 19.1.1
+ react-day-picker:
+ specifier: 8.10.1
+ react-dom:
+ specifier: 19.1.1
+ version: 19.1.1([email protected])
+ react-hook-form:
+ specifier: 7.54.1
+ version: 7.54.1([email protected])
+ recharts:
+ specifier: 2.15.0
+ rehype-react:
+ specifier: 8.0.0
+ version: 8.0.0
+ remark-gfm:
+ specifier: 4.0.1
+ version: 4.0.1
+ remark-parse:
+ specifier: 11.0.0
+ version: 11.0.0
+ remark-rehype:
+ specifier: 11.1.2
+ version: 11.1.2
+ sonner:
+ specifier: 2.0.5
+ superjson:
+ specifier: 2.2.2
+ version: 2.2.2
+ tailwind-merge:
+ specifier: 3.3.1
+ version: 3.3.1
+ unified:
+ specifier: 11.0.5
+ version: 11.0.5
+ zod:
+ specifier: 3.24.1
+ version: 3.24.1
+ devDependencies:
+ '@tailwindcss/postcss':
+ specifier: 4.1.11
+ version: 4.1.11
+ '@types/node':
+ specifier: 24.0.8
+ version: 24.0.8
+ '@types/react':
+ specifier: 19.1.10
+ version: 19.1.10
+ '@types/react-dom':
+ specifier: 19.1.7
+ version: 19.1.7(@types/[email protected])
+ shadcn:
+ specifier: 2.7.0
+ version: 2.7.0(@types/[email protected])([email protected])
+ tailwindcss:
+ specifier: 4.1.11
+ version: 4.1.11
+ tw-animate-css:
+ specifier: 1.3.4
+ version: 1.3.4
+ typescript:
+ specifier: 5.7.2
+ version: 5.7.2
+
apps/web:
dependencies:
'@auth/core':
@@ -503,7 +765,7 @@ importers:
'@openpanel/nextjs':
specifier: ^1.0.8
'@openstatus/analytics':
specifier: workspace:*
version: link:../../packages/analytics
@@ -1886,10 +2148,6 @@ packages:
resolution: {integrity: sha512-VXAq/Jz8KIrU84+HqsOJhIKZqG0PNTdi6n6PFQ4xJf44ZQHD/5C7ouH4qCFX5XgZXcgbRIcMVVYGC6Jye0dRng==}
engines: {node: '>=14.0.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
engines: {node: '>=6.9.0'}
@@ -1902,10 +2160,6 @@ packages:
resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==}
engines: {node: '>=6.9.0'}
@@ -1989,11 +2243,6 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
- '@babel/[email protected]':
- resolution: {integrity: sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==}
- engines: {node: '>=6.0.0'}
- hasBin: true
-
resolution: {integrity: sha512-qnzXzDXdr/po3bOTbTIQZ7+TxNKxpkN5IifVLXS+r7qwynkZfPyjZfE7hCXbo7IoO9TNcSyibgONsf2HauUd3Q==}
engines: {node: '>=6.0.0'}
@@ -2031,22 +2280,10 @@ packages:
resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==}
- engines: {node: '>=6.9.0'}
-
- '@babel/[email protected]':
- resolution: {integrity: sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-X6ZlfR/O/s5EQ/SnUSLzr+6kGnkg8HXGMzpgsMsrJVcfDtH1vIp6ctCN4eZ1LS5c0+te5Cb6Y514fASjMRJ1nw==}
engines: {node: '>=6.9.0'}
@@ -2055,10 +2292,6 @@ packages:
resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==}
engines: {node: '>=6.9.0'}
- '@babel/[email protected]':
- resolution: {integrity: sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-8OLQgDScAOHXnAz2cV+RfzzNMipuLVBz2biuAJFMV9bfkNf393je3VM8CLkjQodW5+iWsSJdSgSWT6rsZoXHPw==}
engines: {node: '>=6.9.0'}
@@ -3453,10 +3686,6 @@ packages:
resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
engines: {node: '>=6.0.0'}
- '@jridgewell/[email protected]':
- resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==}
- engines: {node: '>=6.0.0'}
-
'@jridgewell/[email protected]':
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
engines: {node: '>=6.0.0'}
@@ -6989,11 +7218,6 @@ packages:
resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==}
- resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==}
- engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
- hasBin: true
-
resolution: {integrity: sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -7062,9 +7286,6 @@ packages:
resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==}
engines: {node: '>=16'}
- resolution: {integrity: sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==}
-
resolution: {integrity: sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==}
@@ -7083,10 +7304,6 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
- engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
-
resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
@@ -7757,9 +7974,6 @@ packages:
resolution: {integrity: sha512-wObbz/ar3Bc6e4X5vf0iO8xTN8YAjN/tgiAOJLr7yjYFtP9wAjq8Mb5h0yn6kResir+VYx2DXBj9NNobs0ETSA==}
- resolution: {integrity: sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==}
-
resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==}
@@ -9399,10 +9613,6 @@ packages:
resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==}
- resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
- engines: {node: '>=8.6'}
-
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
engines: {node: '>=8.6'}
@@ -9701,9 +9911,6 @@ packages:
resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==}
engines: {node: '>=8.9.4'}
- resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
-
resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==}
@@ -11587,12 +11794,6 @@ packages:
uploadthing:
optional: true
- resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==}
- hasBin: true
- peerDependencies:
- browserslist: '>= 4.21.0'
-
resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==}
hasBin: true
@@ -12909,12 +13110,6 @@ snapshots:
'@smithy/types': 2.12.0
tslib: 2.6.2
- '@babel/[email protected]':
- dependencies:
- '@babel/helper-validator-identifier': 7.25.9
- js-tokens: 4.0.0
- picocolors: 1.1.1
-
dependencies:
'@babel/helper-validator-identifier': 7.27.1
@@ -12926,15 +13121,15 @@ snapshots:
dependencies:
'@ampproject/remapping': 2.3.0
- '@babel/code-frame': 7.26.2
- '@babel/generator': 7.26.2
+ '@babel/code-frame': 7.27.1
+ '@babel/generator': 7.27.5
'@babel/helper-compilation-targets': 7.25.9
'@babel/helper-module-transforms': 7.26.0(@babel/[email protected])
'@babel/helpers': 7.26.0
- '@babel/parser': 7.26.3
- '@babel/template': 7.25.9
- '@babel/traverse': 7.25.9
- '@babel/types': 7.26.3
+ '@babel/parser': 7.27.7
+ '@babel/template': 7.27.2
+ '@babel/traverse': 7.27.7
+ '@babel/types': 7.27.7
convert-source-map: 2.0.0
debug: 4.4.1
gensync: 1.0.0-beta.2
@@ -12943,31 +13138,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/[email protected]':
- dependencies:
- '@babel/parser': 7.26.3
- '@babel/types': 7.26.3
- '@jridgewell/gen-mapping': 0.3.8
- '@jridgewell/trace-mapping': 0.3.25
- jsesc: 3.0.2
-
dependencies:
- '@babel/parser': 7.27.5
- '@babel/types': 7.27.6
+ '@babel/parser': 7.27.7
+ '@babel/types': 7.27.7
'@jridgewell/gen-mapping': 0.3.11
'@jridgewell/trace-mapping': 0.3.28
jsesc: 3.0.2
dependencies:
- '@babel/types': 7.27.6
+ '@babel/types': 7.27.7
dependencies:
'@babel/compat-data': 7.26.2
'@babel/helper-validator-option': 7.25.9
- browserslist: 4.24.2
+ browserslist: 4.25.1
lru-cache: 5.1.1
semver: 6.3.1
@@ -12979,22 +13166,22 @@ snapshots:
'@babel/helper-optimise-call-expression': 7.27.1
'@babel/helper-replace-supers': 7.27.1(@babel/[email protected])
'@babel/helper-skip-transparent-expression-wrappers': 7.27.1
- '@babel/traverse': 7.27.4
+ '@babel/traverse': 7.27.7
semver: 6.3.1
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/traverse': 7.27.4
- '@babel/types': 7.27.6
+ '@babel/traverse': 7.27.7
+ '@babel/types': 7.27.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/traverse': 7.25.9
- '@babel/types': 7.26.3
+ '@babel/traverse': 7.27.7
+ '@babel/types': 7.27.7
transitivePeerDependencies:
- supports-color
@@ -13002,14 +13189,14 @@ snapshots:
dependencies:
'@babel/core': 7.26.0
'@babel/helper-module-imports': 7.25.9
- '@babel/helper-validator-identifier': 7.25.9
- '@babel/traverse': 7.25.9
+ '@babel/helper-validator-identifier': 7.27.1
+ '@babel/traverse': 7.27.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/types': 7.27.6
+ '@babel/types': 7.27.7
'@babel/[email protected]': {}
@@ -13020,14 +13207,14 @@ snapshots:
'@babel/core': 7.26.0
'@babel/helper-member-expression-to-functions': 7.27.1
'@babel/helper-optimise-call-expression': 7.27.1
- '@babel/traverse': 7.27.4
+ '@babel/traverse': 7.27.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/traverse': 7.27.4
- '@babel/types': 7.27.6
+ '@babel/traverse': 7.27.7
+ '@babel/types': 7.27.7
transitivePeerDependencies:
- supports-color
@@ -13043,17 +13230,13 @@ snapshots:
dependencies:
- '@babel/template': 7.25.9
- '@babel/types': 7.26.3
+ '@babel/template': 7.27.2
+ '@babel/types': 7.27.7
dependencies:
'@babel/types': 7.26.3
- '@babel/[email protected]':
- dependencies:
- '@babel/types': 7.27.6
-
dependencies:
'@babel/types': 7.27.7
@@ -13093,41 +13276,11 @@ snapshots:
dependencies:
regenerator-runtime: 0.14.1
- '@babel/[email protected]':
- dependencies:
- '@babel/code-frame': 7.26.2
- '@babel/parser': 7.26.3
- '@babel/types': 7.26.3
-
dependencies:
'@babel/code-frame': 7.27.1
- '@babel/parser': 7.27.5
- '@babel/types': 7.27.6
-
- '@babel/[email protected]':
- dependencies:
- '@babel/code-frame': 7.26.2
- '@babel/generator': 7.26.2
- '@babel/parser': 7.26.3
- '@babel/template': 7.25.9
- '@babel/types': 7.26.3
- debug: 4.4.1
- globals: 11.12.0
- transitivePeerDependencies:
- - supports-color
-
- '@babel/[email protected]':
- dependencies:
- '@babel/code-frame': 7.27.1
- '@babel/generator': 7.27.5
- '@babel/parser': 7.27.5
- '@babel/template': 7.27.2
- '@babel/types': 7.27.6
- debug: 4.4.1
- globals: 11.12.0
- transitivePeerDependencies:
- - supports-color
+ '@babel/parser': 7.27.7
+ '@babel/types': 7.27.7
dependencies:
@@ -13146,11 +13299,6 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
- '@babel/[email protected]':
- dependencies:
- '@babel/helper-string-parser': 7.27.1
- '@babel/helper-validator-identifier': 7.27.1
-
dependencies:
'@babel/helper-string-parser': 7.27.1
@@ -14212,12 +14360,6 @@ snapshots:
'@jridgewell/sourcemap-codec': 1.5.3
'@jridgewell/trace-mapping': 0.3.25
- '@jridgewell/[email protected]':
- dependencies:
- '@jridgewell/set-array': 1.2.1
- '@jridgewell/sourcemap-codec': 1.5.3
- '@jridgewell/trace-mapping': 0.3.25
-
'@jridgewell/[email protected]': {}
'@jridgewell/[email protected]': {}
@@ -14521,7 +14663,7 @@ snapshots:
'@openpanel/web': 1.0.1
dependencies:
'@openpanel/web': 1.0.1
@@ -16541,7 +16683,7 @@ snapshots:
'@sentry/types': 8.9.2
'@sentry/utils': 8.9.2
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/semantic-conventions': 1.28.0
@@ -16552,7 +16694,7 @@ snapshots:
'@sentry/opentelemetry': 8.46.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])
'@sentry/react': 8.46.0([email protected])
'@sentry/vercel-edge': 8.46.0
- '@sentry/webpack-plugin': 2.22.7([email protected])([email protected])
+ '@sentry/webpack-plugin': 2.22.7([email protected])([email protected]([email protected]))
chalk: 3.0.0
resolve: 1.22.8
@@ -16567,7 +16709,7 @@ snapshots:
- supports-color
- webpack
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/semantic-conventions': 1.28.0
@@ -16578,7 +16720,7 @@ snapshots:
'@sentry/opentelemetry': 8.46.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])
'@sentry/react': 8.46.0([email protected])
'@sentry/vercel-edge': 8.46.0
- '@sentry/webpack-plugin': 2.22.7([email protected])([email protected]([email protected]))
+ '@sentry/webpack-plugin': 2.22.7([email protected])([email protected])
chalk: 3.0.0
resolve: 1.22.8
@@ -17290,7 +17432,7 @@ snapshots:
'@tanstack/react-query': 5.80.7([email protected])
dependencies:
'@trpc/server': 11.4.4([email protected])
@@ -17401,7 +17543,7 @@ snapshots:
dependencies:
- '@babel/parser': 7.26.3
+ '@babel/parser': 7.27.7
'@babel/types': 7.26.3
@@ -18250,13 +18392,6 @@ snapshots:
dependencies:
base64-js: 1.5.1
- dependencies:
- caniuse-lite: 1.0.30001721
- electron-to-chromium: 1.5.64
- node-releases: 2.0.18
- update-browserslist-db: 1.1.1([email protected])
-
dependencies:
caniuse-lite: 1.0.30001726
@@ -18323,8 +18458,6 @@ snapshots:
-
@@ -18345,8 +18478,6 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
-
@@ -18472,7 +18603,7 @@ snapshots:
dependencies:
'@radix-ui/react-id': 1.1.0(@types/[email protected])([email protected])
react: 19.1.1
@@ -18919,8 +19050,6 @@ snapshots:
-
dependencies:
'@emmetio/abbreviation': 2.3.3
@@ -19338,7 +19467,7 @@ snapshots:
'@nodelib/fs.walk': 1.2.8
glob-parent: 5.1.2
merge2: 1.4.1
- micromatch: 4.0.5
+ micromatch: 4.0.8
@@ -21364,11 +21493,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- braces: 3.0.2
- picomatch: 2.3.1
-
dependencies:
braces: 3.0.3
@@ -21628,8 +21752,6 @@ snapshots:
mkdirp: 0.5.6
resolve: 1.22.10
-
@@ -21747,9 +21869,9 @@ snapshots:
dependencies:
- chalk: 5.3.0
+ chalk: 5.4.1
cli-cursor: 4.0.0
- cli-spinners: 2.9.1
+ cli-spinners: 2.9.2
is-interactive: 2.0.0
is-unicode-supported: 1.3.0
log-symbols: 5.1.0
@@ -21859,7 +21981,7 @@ snapshots:
dependencies:
- '@babel/code-frame': 7.26.2
+ '@babel/code-frame': 7.27.1
error-ex: 1.3.2
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
@@ -22938,7 +23060,7 @@ snapshots:
dependencies:
'@antfu/ni': 23.3.1
'@babel/core': 7.26.0
- '@babel/parser': 7.27.5
+ '@babel/parser': 7.27.7
'@babel/plugin-transform-typescript': 7.27.1(@babel/[email protected])
'@modelcontextprotocol/sdk': 1.12.1
commander: 10.0.1
@@ -23917,12 +24039,6 @@ snapshots:
ofetch: 1.4.1
ufo: 1.5.4
- dependencies:
- browserslist: 4.24.2
- escalade: 3.2.0
- picocolors: 1.1.1
-
dependencies:
browserslist: 4.25.1