Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: marketing stuff (#101)
Maximilian Kaske33037f317b4d
diff --git a/apps/web/src/app/blog/layout.tsx b/apps/web/src/app/blog/layout.tsxindex dddfb8022..fe800ca92 100644--- a/apps/web/src/app/blog/layout.tsx+++ b/apps/web/src/app/blog/layout.tsx@@ -1,18 +1,11 @@import * as React from "react";-import { Footer } from "@/components/layout/footer";+import { MarketingLayout } from "@/components/layout/marketing-layout";export default function BlogLayout({children,}: {children: React.ReactNode;}) {- return (- <main className="container mx-auto flex min-h-screen w-full flex-col items-center justify-center space-y-6 p-4 md:p-8">- <div className="z-10 flex w-full flex-1 flex-col items-start justify-center">- <div className="mx-auto w-full max-w-[calc(65ch+8rem)]">{children}</div>- </div>- <Footer />- </main>- );+ return <MarketingLayout>{children}</MarketingLayout>;}diff --git a/apps/web/src/app/monitor/[id]/page.tsx b/apps/web/src/app/monitor/[id]/page.tsxindex e4e8c3c8f..9946f1535 100644--- a/apps/web/src/app/monitor/[id]/page.tsx+++ b/apps/web/src/app/monitor/[id]/page.tsx@@ -28,8 +28,8 @@ export default async function Monitor({}) {const search = searchParamsSchema.safeParse(searchParams);const data = search.success- // TODO: lets hard-code our `monitorId` here- ? await getResponseListData({ monitorId: params.id, ...search.data })+ ? // TODO: lets hard-code our `monitorId` here+ await getResponseListData({ monitorId: params.id, ...search.data }): await getResponseListData({ monitorId: params.id });if (!data || !search.success) return <div>Something went wrong</div>;return <DataTable columns={columns} data={data} />;diff --git a/apps/web/src/app/monitor/layout.tsx b/apps/web/src/app/monitor/layout.tsxindex f76220960..ff66cbefc 100644--- a/apps/web/src/app/monitor/layout.tsx+++ b/apps/web/src/app/monitor/layout.tsx@@ -1,7 +1,8 @@import * as React from "react";+import { Shell } from "@/components/dashboard/shell";import { BackButton } from "@/components/layout/back-button";-import { Footer } from "@/components/layout/footer";+import { MarketingLayout } from "@/components/layout/marketing-layout";// same layout as /playexport default function MonitorLayout({@@ -10,14 +11,9 @@ export default function MonitorLayout({children: React.ReactNode;}) {return (- <main className="container mx-auto flex min-h-screen w-full flex-col items-center justify-center space-y-6 p-4 md:p-8">- <div className="z-10 flex w-full flex-1 flex-col items-start justify-center">- <BackButton href="/play" />- <div className="border-border w-full rounded-lg border p-3 backdrop-blur-[2px] md:p-6">- {children}- </div>- </div>- <Footer />- </main>+ <MarketingLayout>+ <BackButton href="/play" />+ <Shell>{children}</Shell>+ </MarketingLayout>);}diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsxindex 9dd9c6814..2fbde5c81 100644--- a/apps/web/src/app/page.tsx+++ b/apps/web/src/app/page.tsx@@ -1,61 +1,70 @@import Link from "next/link";+import { ChevronRight } from "lucide-react";-import { Footer } from "@/components/layout/footer";+import { Shell } from "@/components/dashboard/shell";+import { MarketingLayout } from "@/components/layout/marketing-layout";+import { Cards } from "@/components/marketing/cards";+import { FAQs } from "@/components/marketing/faqs";+import { Plans } from "@/components/marketing/plans";import { Tracker } from "@/components/tracker";import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { getMonitorListData } from "@/lib/tb";-import { HeroForm } from "./_components/hero-form";export default async function Page() {const data = await getMonitorListData({ monitorId: "openstatusPing" });return (- <main className="flex min-h-screen w-full flex-col space-y-6 p-4 md:p-8">- <div className="flex flex-1 flex-col items-center justify-center gap-8">- <div className="mx-auto max-w-xl text-center">- <div className="border-border rounded-lg border p-8 backdrop-blur-[2px]">- <Badge>Coming Soon</Badge>- <h1 className="text-foreground font-cal mb-6 mt-2 text-3xl">- Open-source monitoring service- </h1>- <p className="text-muted-foreground">- OpenStatus is an open source alternative to your current- monitoring service with a beautiful status page.- </p>- {/* think of using the `A total of X events as Link as well */}- <div className="my-4 flex items-center justify-center gap-2">- <Button asChild variant="outline" className="rounded-full">- <Link href="/play">Playground</Link>- </Button>- <Button asChild variant="link">- <a- href="https://github.com/openstatushq/openstatus"- rel="noreferrer"- target="_blank"- >- Star on GitHub- </a>- </Button>- </div>- <HeroForm />+ <MarketingLayout>+ <div className="grid gap-8">+ <Shell className="text-center">+ <Link+ href="https://twitter.com/thibaultleouay/status/1679026811609464832?s=20"+ target="_blank"+ rel="noreferrer"+ >+ <Badge variant="outline">+ Announcement Post <ChevronRight className="ml-1 h-3 w-3" />+ </Badge>+ </Link>+ <h1 className="text-foreground font-cal mb-6 mt-2 text-3xl">+ Open-source monitoring service+ </h1>+ <p className="text-muted-foreground mx-auto mb-6 max-w-lg text-lg">+ OpenStatus is an open source alternative to your current monitoring+ service with a beautiful status page.+ </p>+ <div className="my-4 flex items-center justify-center gap-2">+ <Button asChild className="rounded-full">+ <Link href="/app">Get Started</Link>+ </Button>+ <Button asChild variant="link">+ <Link href="/github" target="_blank">+ Star on GitHub+ </Link>+ </Button></div>- </div>- <div className="z-10 mx-auto w-full max-w-xl backdrop-blur-[2px]">- <div className="border-border rounded-lg border p-8">- <h1 className="font-cal mb-3 text-center text-2xl">Status</h1>- {data && (- <Tracker- data={data}- id="openstatusPing"- name="Ping"- url="https://www.openstatus.dev/api/ping"- />- )}- </div>- </div>+ </Shell>+ <Shell className="text-center">+ <h2 className="font-cal mb-3 text-2xl">Status</h2>+ <Button asChild variant="outline" className="rounded-full">+ <Link href="/play">Playground</Link>+ </Button>+ {data && (+ <Tracker+ data={data}+ id="openstatusPing"+ name="Ping"+ url="https://www.openstatus.dev/api/ping"+ />+ )}+ </Shell>+ <Cards />+ <Plans />+ <Shell>+ <FAQs />+ </Shell></div>- <Footer />- </main>+ </MarketingLayout>);}diff --git a/apps/web/src/app/play/layout.tsx b/apps/web/src/app/play/layout.tsxindex 69f03b2e3..84b014ee0 100644--- a/apps/web/src/app/play/layout.tsx+++ b/apps/web/src/app/play/layout.tsx@@ -1,8 +1,9 @@import * as React from "react";import type { Metadata } from "next";+import { Shell } from "@/components/dashboard/shell";import { BackButton } from "@/components/layout/back-button";-import { Footer } from "@/components/layout/footer";+import { MarketingLayout } from "@/components/layout/marketing-layout";const TITLE = "OpenStatus";const DESCRIPTION =@@ -34,15 +35,12 @@ export default function PlayLayout({modal: React.ReactNode;}) {return (- <main className="container mx-auto flex min-h-screen w-full flex-col items-center justify-center space-y-6 p-4 md:p-8">- <div className="z-10 flex w-full flex-1 flex-col items-start justify-center">- <BackButton href="/" />- <div className="border-border w-full rounded-lg border p-3 backdrop-blur-[2px] md:p-6">- {children}- {modal}- </div>- </div>- <Footer />- </main>+ <MarketingLayout>+ <BackButton href="/" />+ <Shell>+ {children}+ {modal}+ </Shell>+ </MarketingLayout>);}diff --git a/apps/web/src/app/play/page.tsx b/apps/web/src/app/play/page.tsxindex edd939f0f..9847a8bf1 100644--- a/apps/web/src/app/play/page.tsx+++ b/apps/web/src/app/play/page.tsx@@ -30,9 +30,10 @@ export default async function PlayPage({<div className="absolute right-2 top-2"><ToggleButton groupBy={params?.groupBy} /></div>- <p className="font-cal mb-2 text-3xl">Status</p>- <p className="text-lg font-light">Learn more on how to build your own.</p>-+ <p className="font-cal mb-1 text-3xl">Status</p>+ <p className="text-muted-foreground text-lg font-light">+ Build your own within seconds.+ </p>{data && (<Trackerdata={data}diff --git a/apps/web/src/components/icons.tsx b/apps/web/src/components/icons.tsxindex a48a64cc1..49b3f0d8e 100644--- a/apps/web/src/components/icons.tsx+++ b/apps/web/src/components/icons.tsx@@ -5,6 +5,7 @@ import {PanelTop,Siren,Table,+ ToyBrick,} from "lucide-react";import type { Icon as LucideIcon, LucideProps } from "lucide-react";@@ -18,6 +19,7 @@ export const Icons = {siren: Siren,"panel-top": PanelTop,table: Table,+ "toy-brick": ToyBrick,discord: ({ ...props }: LucideProps) => (<svg viewBox="0 0 640 512" {...props}><pathdiff --git a/apps/web/src/components/layout/app-header.tsx b/apps/web/src/components/layout/app-header.tsxindex 0d0ee7b8f..45927215b 100644--- a/apps/web/src/components/layout/app-header.tsx+++ b/apps/web/src/components/layout/app-header.tsx@@ -16,7 +16,7 @@ export function AppHeader() {<header className="border-border sticky top-3 z-50 w-full"><Shell className="bg-background/70 flex w-full items-center justify-between px-3 py-3 backdrop-blur-lg md:px-6 md:py-3"><Link- href="/app"+ href="/"className="font-cal text-muted-foreground hover:text-foreground text-lg">openstatusdiff --git a/apps/web/src/components/layout/marketing-header.tsx b/apps/web/src/components/layout/marketing-header.tsxnew file mode 100644index 000000000..6a3236843--- /dev/null+++ b/apps/web/src/components/layout/marketing-header.tsx@@ -0,0 +1,39 @@+import Link from "next/link";++import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";++interface Props {+ className?: string;+}++export function MarketingHeader({ className }: Props) {+ return (+ <header+ className={cn(+ "flex w-full items-center justify-between gap-2",+ className,+ )}+ >+ <Link+ href="/"+ className="font-cal text-muted-foreground hover:text-foreground"+ >+ openstatus+ </Link>+ <div className="flex items-center md:gap-3">+ <Button variant="link" asChild>+ <Link href="/discord" target="_blank" rel="noreferrer">+ Discord+ </Link>+ </Button>+ <Button variant="link" asChild className="md:mr-3">+ <Link href="/blog">Blog</Link>+ </Button>+ <Button asChild className="rounded-full">+ <Link href="/app">Sign Up</Link>+ </Button>+ </div>+ </header>+ );+}diff --git a/apps/web/src/components/layout/marketing-layout.tsx b/apps/web/src/components/layout/marketing-layout.tsxnew file mode 100644index 000000000..cadd0d157--- /dev/null+++ b/apps/web/src/components/layout/marketing-layout.tsx@@ -0,0 +1,14 @@+import { Footer } from "./footer";+import { MarketingHeader } from "./marketing-header";++export function MarketingLayout({ children }: { children: React.ReactNode }) {+ return (+ <main className="flex min-h-screen w-full flex-col items-center justify-center space-y-6 p-4 md:p-8">+ <MarketingHeader className="mx-auto w-full max-w-[calc(65ch+8rem)]" />+ <div className="mx-auto flex w-full max-w-[calc(65ch+8rem)] flex-1 flex-col items-start justify-center">+ {children}+ </div>+ <Footer />+ </main>+ );+}diff --git a/apps/web/src/components/marketing/cards.tsx b/apps/web/src/components/marketing/cards.tsxnew file mode 100644index 000000000..07162cfa0--- /dev/null+++ b/apps/web/src/components/marketing/cards.tsx@@ -0,0 +1,63 @@+import { Shell } from "../dashboard/shell";+import { Icons } from "../icons";+import type { ValidIcon } from "../icons";+import { Badge } from "../ui/badge";++const cardConfig: {+ icon: ValidIcon;+ title: string;+ description: string;+ badge?: "Coming soon" | "New";+}[] = [+ {+ icon: "activity",+ title: "Monitors",+ description: "Regularly monitor your website or API.",+ },+ {+ icon: "panel-top",+ title: "Status Pages",+ description:+ "Create your own status page within seconds. Select your endpoints you wish to display.",+ },+ {+ icon: "siren",+ title: "Incidents",+ description: "Inform your users when something goes wrong.",+ badge: "Coming soon",+ },+ {+ icon: "toy-brick",+ title: "Integrations",+ description:+ "Create incident or received failure notification in the tools you already work with.",+ badge: "Coming soon",+ },+];++// TBD: if we need it at the beginning+export function Cards() {+ return (+ <div className="grid grid-cols-1 gap-8 md:grid-cols-2">+ {cardConfig.map(({ icon, title, description, badge }, i) => {+ const Icon = Icons[icon];+ return (+ <Shell key={i} className="relative">+ {badge ? (+ <Badge+ variant={"secondary"}+ className="bg-background text-muted-foreground absolute -top-3 right-2"+ >+ {badge}+ </Badge>+ ) : null}+ <h3 className="font-cal mb-1 flex items-center text-xl">+ <Icon className="mr-2 h-4 w-4" /> {title}+ </h3>+ <p className="text-muted-foreground">{description}</p>+ </Shell>+ );+ })}+ </div>+ );+}diff --git a/apps/web/src/components/marketing/faqs.tsx b/apps/web/src/components/marketing/faqs.tsxnew file mode 100644index 000000000..3e9ce4ee6--- /dev/null+++ b/apps/web/src/components/marketing/faqs.tsx@@ -0,0 +1,51 @@+import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,+} from "@/components/ui/accordion";++// REMINDER: we can create a contentlayer document and the faq into it+const faqsConfig: Record<"q" | "a", string>[] = [+ {+ q: "What are the limits?",+ a: "You will start with a free plan by default which includes a total of <strong>5 monitors</strong> and <strong>1 status</strong> page as well as cron jobs of either <code>10m</code>, <code>30m</code> or <code>1h</code>.",+ },+ {+ q: "Who are we?",+ a: "We are <a href='https://twitter.com/thibaultleouay' target='_blank'>Thibault</a> and <a href='https://twitter.com/mxkaske' target='_blank'>Max</a>. We both have a 9-to-5 job and we are doing that project for the purpose of open source and the community. Of course, it would be nice to make that project self sustainable. It's not a sprint, it's a marathon.",+ },+ {+ q: "How does it work?",+ a: "We will ping your endpoint from multiple region to figure out if it's up or down. We will then display the status on your status page.",+ },+ {+ q: "What regions do we support?",+ a: "We support all the <strong>vercel regions</strong>. Find the full list <a href='https://vercel.com/docs/concepts/edge-network/regions' target='_blank'>here</a>.",+ },+ {+ q: "How can I help?",+ a: "You can star our project on <a href='https://github.com/openstatusHQ/openstatus'>github</a>, or contribute to it. Or you can also become a paid user.",+ },+];++export function FAQs() {+ return (+ <div className="grid gap-1">+ <h2 className="text-foreground font-cal text-center text-2xl">FAQ</h2>+ <Accordion type="single" collapsible className="w-full">+ {faqsConfig.map(({ q, a }, i) => (+ <AccordionItem key={i} value={`item-${i}`}>+ <AccordionTrigger>{q}</AccordionTrigger>+ <AccordionContent>+ <div+ className="prose prose-sm"+ dangerouslySetInnerHTML={{ __html: a }}+ />+ </AccordionContent>+ </AccordionItem>+ ))}+ </Accordion>+ </div>+ );+}diff --git a/apps/web/src/components/marketing/plans.tsx b/apps/web/src/components/marketing/plans.tsxnew file mode 100644index 000000000..f051abe5e--- /dev/null+++ b/apps/web/src/components/marketing/plans.tsx@@ -0,0 +1,139 @@+import Link from "next/link";+import { Check } from "lucide-react";++import { cn } from "@/lib/utils";+import { Shell } from "../dashboard/shell";+import { Button } from "../ui/button";++interface Plan {+ title: string;+ description: string;+ cost: number | string;+ features: string[];+ action?: {+ text: string;+ link: string;+ };+ disabled?: boolean;+}++const plans: Record<"hobby" | "pro" | "enterprise", Plan> = {+ hobby: {+ title: "Hobby",+ description: "Get started now and upgrade once reaching the limits.",+ cost: 0,+ features: [+ "5 monitors",+ "1 status page",+ "subdomain",+ "10m, 30m, 1h checks",+ ],+ action: {+ text: "Start now",+ link: "/app",+ },+ },+ pro: {+ title: "Pro",+ description: "Scale and build monitors for all your services.",+ cost: 29,+ features: [+ "20 monitors",+ "5 status page",+ "custom domain",+ "1m, 5m, 10m, 30m, 1h checks",+ "5 team members",+ ],+ action: {+ text: "Coming soon",+ link: "/",+ },+ disabled: true,+ },+ enterprise: {+ title: "Enterprise",+ description: "Dedicated support and needs for your company.",+ cost: "Lets talk",+ features: [],+ action: {+ text: "Schedule call",+ link: "https://cal.com/thibault-openstatus/30min",+ },+ },+};++export function Plans() {+ return (+ <Shell>+ <div className="grid gap-4 md:grid-cols-2 md:gap-0">+ <Plan+ {...plans.hobby}+ className="md:border-border/50 md:border-r md:pr-4"+ />+ <Plan {...plans.pro} className="md:pl-4" />+ <Plan+ {...plans.enterprise}+ className="md:border-border/50 col-span-full md:mt-4 md:border-t md:pt-4"+ />+ </div>+ </Shell>+ );+}++interface Props extends Plan {+ className?: string;+}++function Plan({+ title,+ description,+ cost,+ features,+ action,+ disabled,+ className,+}: Props) {+ return (+ <div+ key={title}+ className={cn(+ "flex w-full flex-col",+ disabled && "pointer-events-none opacity-70",+ className,+ )}+ >+ <div className="flex-1">+ <div className="flex items-end justify-between gap-4">+ <div>+ <p className="font-cal mb-2 text-xl">{title}</p>+ <p className="text-muted-foreground">{description}</p>+ </div>+ <p className="shrink-0">+ <span className="font-cal text-2xl">{cost}</span>+ {typeof cost === "number" ? (+ <span className="text-muted-foreground font-light">/month</span>+ ) : null}+ </p>+ </div>+ <ul className="border-border/50 grid divide-y py-2">+ {features.map((item) => (+ <li+ key={item}+ className="text-muted-foreground inline-flex items-center py-2 text-sm"+ >+ <Check className="mr-2 h-4 w-4 text-green-500" />+ {item}+ </li>+ ))}+ </ul>+ </div>+ <div>+ {action ? (+ <Button asChild size="sm">+ <Link href={action.link}>{action.text}</Link>+ </Button>+ ) : null}+ </div>+ </div>+ );+}diff --git a/apps/web/src/components/tracker.tsx b/apps/web/src/components/tracker.tsxindex 763e43e7c..b5ebe7854 100644--- a/apps/web/src/components/tracker.tsx+++ b/apps/web/src/components/tracker.tsx@@ -13,6 +13,7 @@ import {HoverCardContent,HoverCardTrigger,} from "@/components/ui/hover-card";+import { Separator } from "@/components/ui/separator";import {Tooltip,TooltipContent,@@ -120,20 +121,15 @@ const MoreInfo = ({<Info className="h-4 w-4" /></TooltipTrigger><TooltipContent>- <>- {description && (- <p className="text-muted-foreground">{description}</p>+ <p className="text-muted-foreground">+ {context === "play" ? (+ <Link href={`/monitor/${id}`} className="hover:text-foreground">+ {link}+ </Link>+ ) : (+ description)}- <p className="text-muted-foreground">- {context === "play" ? (- <Link href={`/monitor/${id}`} className="hover:text-foreground">- {link}- </Link>- ) : (- link- )}- </p>- </>+ </p></TooltipContent></Tooltip></TooltipProvider>@@ -165,7 +161,7 @@ const Bar = ({<HoverCardTrigger onClick={() => setOpen(true)} asChild><div className={tracker({ variant: getStatus(ratio).variant })} /></HoverCardTrigger>- <HoverCardContent side="top" className="w-56">+ <HoverCardContent side="top" className="w-64"><div className="flex justify-between"><p className="text-sm font-semibold">{getStatus(ratio).label}</p>{context === "play" ? (@@ -185,13 +181,20 @@ const Bar = ({avg. <span className="font-mono">{avgLatency}ms</span></p></div>- <div className="flex justify-between">- <p className="text-xs font-light">Failed requests</p>- <p className="text-muted-foreground text-xs">{count - ok}</p>- </div>- <div className="flex justify-between">- <p className="text-xs font-light">Total requests</p>- <p className="text-muted-foreground text-xs">{count}</p>+ <Separator className="my-1.5" />+ <div className="grid grid-cols-2">+ <p className="text-left text-xs">+ <span className="font-mono text-green-600">{count}</span>{" "}+ <span className="text-muted-foreground font-light">+ total requests+ </span>+ </p>+ <p className="text-right text-xs">+ <span className="font-mono text-red-600">{count - ok}</span>{" "}+ <span className="text-muted-foreground font-light">+ failed requests+ </span>+ </p></div></HoverCardContent></HoverCard>