Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
feat: testing card gradient (#529)
Maximilian Kaske75e7db1005c9
diff --git a/.vscode/settings.json b/.vscode/settings.jsonindex 65882390a..52af1ea16 100644--- a/.vscode/settings.json+++ b/.vscode/settings.json@@ -1,6 +1,6 @@{"editor.codeActionsOnSave": {- "source.fixAll.eslint": true+ "source.fixAll.eslint": "explicit"},"editor.defaultFormatter": "esbenp.prettier-vscode","editor.formatOnSave": true,diff --git a/apps/web/package.json b/apps/web/package.jsonindex 85c4fb06d..d31a2382a 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -46,6 +46,7 @@"class-variance-authority": "0.7.0","clsx": "2.0.0","cmdk": "0.2.0",+ "cobe": "0.6.3","contentlayer": "0.3.4","date-fns": "2.30.0","lucide-react": "0.279.0",diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsxindex 37e23872f..5b2d74d1d 100644--- a/apps/web/src/app/page.tsx+++ b/apps/web/src/app/page.tsx@@ -1,13 +1,12 @@-import { Shell } from "@/components/dashboard/shell";import { MarketingLayout } from "@/components/layout/marketing-layout";-import { Cards, SpecialCard } from "@/components/marketing/cards";-import { Example } from "@/components/marketing/example";+import { AlertCard } from "@/components/marketing/alert/card";import { FAQs } from "@/components/marketing/faqs";import { Hero } from "@/components/marketing/hero";+import { MonitoringCard } from "@/components/marketing/monitor/card";import { Partners } from "@/components/marketing/partners";import { Plans } from "@/components/marketing/plans";import { Stats } from "@/components/marketing/stats";-import { cardConfig, specialCardConfig } from "@/config/features";+import { StatusPageCard } from "@/components/marketing/status-page/card";export const revalidate = 600;@@ -16,18 +15,13 @@ export default async function Page() {<MarketingLayout><div className="grid gap-8"><Hero />- <Example />- <Cards {...cardConfig.monitors} />- <Stats />- {/* TODO: rename to `reports` */}- <Cards {...cardConfig.incidents} /><Partners />- <Cards {...cardConfig.pages} />- <SpecialCard {...specialCardConfig} />+ <MonitoringCard />+ <Stats />+ <StatusPageCard />+ <AlertCard /><Plans />- <Shell>- <FAQs />- </Shell>+ <FAQs /></div></MarketingLayout>);diff --git a/apps/web/src/components/icons.tsx b/apps/web/src/components/icons.tsxindex 2a805f173..a08564fe2 100644--- a/apps/web/src/components/icons.tsx+++ b/apps/web/src/components/icons.tsx@@ -25,12 +25,14 @@ import {Search,SearchCheck,Siren,+ Sparkles,SunMedium,Table,Tag,ToyBrick,Trash,TwitterIcon,+ Webhook,Zap,} from "lucide-react";import type { LucideIcon, LucideProps } from "lucide-react";@@ -68,10 +70,12 @@ export const Icons = {zap: Zap,"alert-triangle": AlertTriangle,megaphone: Megaphone,+ webhook: Webhook,minus: Minus,sun: SunMedium,moon: Moon,laptop: Laptop,+ sparkles: Sparkles,discord: ({ ...props }: LucideProps) => (<svg viewBox="0 0 640 512" {...props}><pathdiff --git a/apps/web/src/components/marketing/alert/card.tsx b/apps/web/src/components/marketing/alert/card.tsxnew file mode 100644index 000000000..6dc4abfff--- /dev/null+++ b/apps/web/src/components/marketing/alert/card.tsx@@ -0,0 +1,29 @@+import { cardConfig } from "@/config/features";+import {+ CardContainer,+ CardContent,+ CardFeature,+ CardFeatureContainer,+ CardHeader,+ CardIcon,+ CardTitle,+} from "../card";+import { Timeline } from "./timeline";++export function AlertCard() {+ const { icon, title, features } = cardConfig.alerts;+ return (+ <CardContainer>+ <CardHeader>+ <CardIcon icon={icon} />+ <CardTitle>{title}</CardTitle>+ </CardHeader>+ <CardContent>+ <Timeline />+ <CardFeatureContainer>+ {features?.map((feature, i) => <CardFeature key={i} {...feature} />)}+ </CardFeatureContainer>+ </CardContent>+ </CardContainer>+ );+}diff --git a/apps/web/src/components/marketing/alert/timeline.tsx b/apps/web/src/components/marketing/alert/timeline.tsxnew file mode 100644index 000000000..273f083ba--- /dev/null+++ b/apps/web/src/components/marketing/alert/timeline.tsx@@ -0,0 +1,117 @@+import * as React from "react";+import { format } from "date-fns";++import type { ValidIcon } from "@/components/icons";+import { Icons } from "@/components/icons";+import { cn } from "@/lib/utils";++export function TimelineContainer({ children }: { children: React.ReactNode }) {+ return (+ // first:md:order-2 does not work+ <div className="mx-auto flex max-w-md flex-col justify-center gap-3 md:order-2">+ {children}+ </div>+ );+}++export function TimelineEvent({+ label,+ date,+ message,+ icon,+ isLast = false,+}: Event & {+ isLast?: boolean;+}) {+ const Icon = Icons[icon.name];+ return (+ <div className="group relative -m-2 flex gap-4 border border-transparent p-2">+ <div className="relative">+ <div+ className={cn(+ "bg-background rounded-full border p-2",+ icon.borderColor,+ )}+ >+ <Icon className={cn("h-4 w-4", icon.textColor)} />+ </div>+ {!isLast ? (+ <div className="bg-muted absolute inset-x-0 mx-auto h-full w-[2px]" />+ ) : null}+ </div>+ <div className="mt-1 flex flex-1 flex-col gap-1">+ <div className="flex items-center justify-between gap-4">+ <p className="text-sm font-semibold">{label}</p>+ <p className="text-muted-foreground mt-px text-right text-[10px]">+ <code>{format(new Date(date), "LLL dd, y HH:mm:ss")}</code>+ </p>+ </div>+ <p className="text-muted-foreground text-sm">{message}</p>+ </div>+ </div>+ );+}++export function Timeline() {+ return (+ <TimelineContainer>+ {timeline.map((event, i) => (+ <TimelineEvent key={i} isLast={i === timeline.length - 1} {...event} />+ ))}+ </TimelineContainer>+ );+}++type Event = {+ label: string;+ date: Date;+ message: string;+ icon: {+ name: ValidIcon;+ textColor: string;+ borderColor: string;+ };+};++const timeline = [+ {+ label: "Monitor down",+ date: new Date("03.12.2023, 19:14:45"),+ message: "We couldn't reach your endpoint in Amsterdam.",+ icon: {+ name: "alert-triangle",+ textColor: "text-orange-500",+ borderColor: "border-orange-500/40",+ },+ },+ {+ label: "Grafana alert",+ date: new Date("03.12.2023, 19:14:55"),+ message: "3 incoming notifications from Grafana.",+ icon: {+ name: "webhook",+ textColor: "text-yellow-500",+ borderColor: "border-yellow-500/40",+ },+ },+ {+ label: "Notification sent",+ date: new Date("03.12.2023, 19:15:01"),+ message: "Smart notification with summary sent to your Slack channel.",+ icon: {+ name: "sparkles",+ textColor: "text-blue-500",+ borderColor: "border-blue-500/40",+ },+ },+ {+ label: "Monitor recovered",+ date: new Date("03.12.2023, 19:21:30"),+ message: "The enpoint response is back.",+ icon: {+ name: "check",+ textColor: "text-green-500",+ borderColor: "border-green-500/40",+ },+ },+] satisfies Event[];diff --git a/apps/web/src/components/marketing/card.tsx b/apps/web/src/components/marketing/card.tsxnew file mode 100644index 000000000..1eb81705a--- /dev/null+++ b/apps/web/src/components/marketing/card.tsx@@ -0,0 +1,105 @@+import { Badge } from "@openstatus/ui";++import type { FeatureDescription } from "@/config/features";+import { cn } from "@/lib/utils";+import { Shell } from "../dashboard/shell";+import type { ValidIcon } from "../icons";+import { Icons } from "../icons";++export function CardContainer({ children }: { children: React.ReactNode }) {+ return (+ <Shell className="grid gap-6 bg-gradient-to-br from-[hsl(var(--muted))] from-0% to-transparent to-20%">+ {children}+ </Shell>+ );+}++export function CardHeader({ children }: { children: React.ReactNode }) {+ return (+ <div className="flex flex-col items-center justify-center gap-3">+ {children}+ </div>+ );+}++export function CardIcon({ icon }: { icon: ValidIcon }) {+ const Icon = Icons[icon];+ return (+ <div className="border-border rounded-full border p-2">+ <Icon className="h-5 w-5" />+ </div>+ );+}++export function CardTitle({ children }: { children: React.ReactNode }) {+ return (+ <h3 className="font-cal bg-gradient-to-tl from-[hsl(var(--muted))] from-0% to-[hsl(var(--foreground))] to-40% bg-clip-text text-center text-3xl text-transparent">+ {children}+ </h3>+ );+}++export function CardDescription({ children }: { children: React.ReactNode }) {+ return <p className="text-muted-foreground mt-2">{children}</p>;+}++export function CardContent({+ children,+ dir = "cols",+}: {+ children: React.ReactNode;+ dir?: "rows" | "cols";+}) {+ return (+ <div+ className={cn("grid gap-10", {+ "grid-cols-none md:grid-cols-2": dir === "cols",+ "grid-rows-none md:grid-rows-2": dir === "rows",+ })}+ >+ {children}+ </div>+ );+}++export function CardFeatureContainer({+ children,+ dir = "rows",+}: {+ children: React.ReactNode;+ dir?: "rows" | "cols";+}) {+ return (+ <ul+ className={cn("gap-4 md:gap-6", {+ "grid md:grid-cols-3": dir === "cols",+ "flex flex-col": dir === "rows",+ })}+ >+ {children}+ </ul>+ );+}++// TODO: rename type a bit appropriately+export function CardFeature(props: FeatureDescription) {+ const FeatureIcon = Icons[props.icon];+ return (+ <li>+ <p className="flex flex-col">+ <span>+ <FeatureIcon className="text-foreground/80 mb-1 mr-1.5 inline-flex h-4 w-4" />+ <span className="text-foreground font-medium">+ {props.catchline.replace(".", "")}+ </span>{" "}+ </span>+ <span className="text-muted-foreground">{props.description}</span>+ </p>+ {props.badge ? (+ <Badge variant="secondary" className="-ml-2 mt-1">+ {props.badge}+ </Badge>+ ) : null}+ </li>+ );+}diff --git a/apps/web/src/components/marketing/cards.tsx b/apps/web/src/components/marketing/cards.tsxdeleted file mode 100644index 891147177..000000000--- a/apps/web/src/components/marketing/cards.tsx+++ /dev/null@@ -1,62 +0,0 @@-import { Badge } from "@openstatus/ui";--import type { Feature, SpecialFeature } from "@/config/features";-import { Shell } from "../dashboard/shell";-import { Icons } from "../icons";--export function Cards(props: Feature) {- const Icon = Icons[props.icon];- return (- <Shell className="grid gap-6">- <div className="flex flex-col items-center justify-center gap-3">- <div className="border-border rounded-full border p-2">- <Icon className="h-5 w-5" />- </div>- <h3 className="font-cal text-center text-3xl">{props.title}</h3>- </div>- <ul className="grid gap-4 md:grid-cols-3 md:gap-6">- {props.features?.map((feature, i) => {- const FeatureIcon = Icons[feature.icon];- return (- <li key={i}>- <p className="flex flex-col">- <span>- <FeatureIcon className="text-foreground/80 mb-1 mr-1.5 inline-flex h-4 w-4" />- <span className="text-foreground font-medium">- {feature.catchline.replace(".", "")}- </span>{" "}- </span>- <span className="text-muted-foreground">- {feature.description}- </span>- </p>- {feature.badge ? (- <Badge variant="secondary" className="-ml-2 mt-1">- {feature.badge}- </Badge>- ) : null}- </li>- );- })}- </ul>- </Shell>- );-}--export function SpecialCard(props: SpecialFeature) {- const Icon = Icons[props.icon];- return (- <Shell className="relative flex items-center justify-between">- <div>- <div className="flex items-center gap-3">- <h3 className="font-cal text-3xl">{props.title}</h3>- <div className="border-border rounded-full border p-2">- <Icon className="h-5 w-5" />- </div>- </div>- <p className="text-muted-foreground mt-2">{props.description}</p>- </div>- <div />- </Shell>- );-}diff --git a/apps/web/src/components/marketing/faqs.tsx b/apps/web/src/components/marketing/faqs.tsxindex 0aac1c3fb..6d6157319 100644--- a/apps/web/src/components/marketing/faqs.tsx+++ b/apps/web/src/components/marketing/faqs.tsx@@ -5,6 +5,8 @@ import {AccordionTrigger,} from "@openstatus/ui";+import { Shell } from "@/components/dashboard/shell";+// REMINDER: we can create a contentlayer document and the faq into itconst faqsConfig: Record<"q" | "a", string>[] = [{@@ -31,7 +33,7 @@ const faqsConfig: Record<"q" | "a", string>[] = [export function FAQs() {return (- <div className="grid gap-1">+ <Shell 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) => (@@ -46,6 +48,6 @@ export function FAQs() {</AccordionItem>))}</Accordion>- </div>+ </Shell>);}diff --git a/apps/web/src/components/marketing/hero.tsx b/apps/web/src/components/marketing/hero.tsxindex d59a09ba0..d1f955938 100644--- a/apps/web/src/components/marketing/hero.tsx+++ b/apps/web/src/components/marketing/hero.tsx@@ -4,31 +4,39 @@ import { ChevronRight } from "lucide-react";import { Badge, Button } from "@openstatus/ui";-import { Shell } from "@/components/dashboard/shell";import { getGitHubStars } from "@/lib/github";-import { numberFormatter } from "@/lib/utils";+import { cn, numberFormatter } from "@/lib/utils";export function Hero() {return (- <Shell className="text-center">- <Link- href="https://github.com/openstatusHQ/openstatus/stargazers"- target="_blank"- rel="noreferrer"- >- <Badge variant="outline">- Proudly Open Source - Support us on GitHub- <ChevronRight className="ml-1 h-3 w-3" />+ <div className="my-10 flex w-full flex-col justify-center gap-1 px-3 py-4 text-center md:my-20 md:p-6">+ <div>+ <Badge variant="outline" className="backdrop-blur-[2px]">+ <Link+ href="https://github.com/openstatusHQ/openstatus/stargazers"+ target="_blank"+ rel="noreferrer"+ className="flex items-center"+ >+ Proudly Open Source+ <ChevronRight className="ml-1 h-3 w-3" />+ </Link></Badge>- </Link>- <h1 className="text-foreground font-cal mb-6 mt-2 text-3xl">- A better way to monitor your services.- </h1>- <p className="text-muted-foreground mx-auto mb-6 max-w-lg text-lg">- Reduce alert fatigue by triggering only relevant alerts when your- services experience downtime.- </p>- {/* much better than using flex without text alignment, text stays center even thought not same length */}+ </div>+ <div className="flex flex-col gap-6">+ <h1+ className={cn(+ "text-foreground font-cal text-4xl md:text-6xl",+ "bg-gradient-to-tl from-[hsl(var(--muted))] from-0% to-[hsl(var(--foreground))] to-40% bg-clip-text text-transparent",+ )}+ >+ A better way to monitor your services.+ </h1>+ <p className="text-muted-foreground mx-auto max-w-md text-lg md:max-w-lg md:text-xl">+ Reduce alert fatigue by triggering only relevant alerts when your+ services experience downtime.+ </p>+ </div><div className="my-4 grid gap-2 sm:grid-cols-2"><div className="text-center sm:block sm:text-right"><Button className="w-48 rounded-full sm:w-auto" asChild>@@ -50,7 +58,7 @@ export function Hero() {</Button></div></div>- </Shell>+ </div>);}diff --git a/apps/web/src/components/marketing/monitor/card.tsx b/apps/web/src/components/marketing/monitor/card.tsxnew file mode 100644index 000000000..f50ed61f3--- /dev/null+++ b/apps/web/src/components/marketing/monitor/card.tsx@@ -0,0 +1,29 @@+import { cardConfig } from "@/config/features";+import {+ CardContainer,+ CardContent,+ CardFeature,+ CardFeatureContainer,+ CardHeader,+ CardIcon,+ CardTitle,+} from "../card";+import { Globe } from "./globe";++export function MonitoringCard() {+ const { icon, title, features } = cardConfig.monitors;+ return (+ <CardContainer>+ <CardHeader>+ <CardIcon icon={icon} />+ <CardTitle>{title}</CardTitle>+ </CardHeader>+ <CardContent>+ <Globe />+ <CardFeatureContainer>+ {features?.map((feature, i) => <CardFeature key={i} {...feature} />)}+ </CardFeatureContainer>+ </CardContent>+ </CardContainer>+ );+}diff --git a/apps/web/src/components/marketing/monitor/globe.tsx b/apps/web/src/components/marketing/monitor/globe.tsxnew file mode 100644index 000000000..525cd3150--- /dev/null+++ b/apps/web/src/components/marketing/monitor/globe.tsx@@ -0,0 +1,76 @@+"use client";++import { useEffect, useRef } from "react";+import createGlobe from "cobe";++const SIZE = 350;++export function Globe() {+ const canvasRef = useRef<HTMLCanvasElement>(null);++ useEffect(() => {+ let phi = 0;+ if (!canvasRef.current) return;++ const globe = createGlobe(canvasRef.current, {+ devicePixelRatio: 2,+ width: SIZE * 2,+ height: SIZE * 2,+ phi: 0,+ theta: 0,+ dark: 1,+ diffuse: 1.2,+ mapSamples: 16000,+ mapBrightness: 6,+ baseColor: [0.3, 0.3, 0.3],+ markerColor: [1, 1, 1],+ glowColor: [1, 1, 1],+ markers: [+ // AMS+ { location: [52.3676, 4.9041], size: 0.05 },+ // IAD+ { location: [39.0438, -77.4874], size: 0.05 },+ // JNB+ { location: [-26.2041, 28.0473], size: 0.05 },+ // HKG+ { location: [22.3193, 114.1694], size: 0.05 },+ // SYD+ { location: [-33.8688, 151.2093], size: 0.05 },+ // GRU+ { location: [-23.5558, -46.6396], size: 0.05 },+ ],+ onRender: (state) => {+ // Called on every animation frame.+ // `state` will be an empty object, return updated params.+ state.phi = phi;+ phi += 0.003;+ },+ });++ setTimeout(() => {+ const canvas = canvasRef.current;+ if (!canvas) return;+ canvas.style.opacity = "1";+ });++ return () => {+ globe.destroy();+ };+ }, []);++ return (+ <div className="flex justify-center">+ <canvas+ ref={canvasRef}+ style={{+ width: SIZE,+ height: SIZE,+ maxWidth: "100%",+ aspectRatio: 1,+ opacity: 0,+ transition: "opacity 1s ease",+ }}+ />+ </div>+ );+}diff --git a/apps/web/src/components/marketing/partners.tsx b/apps/web/src/components/marketing/partners.tsxindex f8f8988c1..76088a44c 100644--- a/apps/web/src/components/marketing/partners.tsx+++ b/apps/web/src/components/marketing/partners.tsx@@ -10,7 +10,7 @@ export function Partners() {<h3 className="text-muted-foreground font-cal text-center text-sm">Trusted By</h3>- <div className="grid grid-cols-1 gap-8 sm:grid-cols-4 sm:gap-16">+ <div className="grid grid-cols-2 gap-8 sm:grid-cols-4 sm:gap-16"><div className="flex items-center justify-center"><ahref="https://status.hanko.io"@@ -18,7 +18,7 @@ export function Partners() {rel="noreferrer"className="group inline-flex items-center justify-center underline underline-offset-4 hover:no-underline">- <Hanko className="h-8 w-24" />+ <Hanko className="h-6 w-[3.75rem] sm:h-8 sm:w-24" /><ArrowUpRight className="text-muted-foreground group-hover:text-foreground ml-1 h-4 w-4 flex-shrink-0" /></a></div>@@ -29,7 +29,7 @@ export function Partners() {rel="noreferrer"className="group inline-flex items-center justify-center underline underline-offset-4 hover:no-underline">- <Documenso className="h-8 w-32" />+ <Documenso className="h-6 w-24 sm:h-8 sm:w-32" /><ArrowUpRight className="text-muted-foreground group-hover:text-foreground ml-1 h-4 w-4 flex-shrink-0" /></a></div>@@ -40,7 +40,7 @@ export function Partners() {rel="noreferrer"className="group inline-flex items-center justify-center underline underline-offset-4 hover:no-underline">- <Trigger className="h-8 w-32" />+ <Trigger className="h-6 w-24 sm:h-8 sm:w-32" /><ArrowUpRight className="text-muted-foreground group-hover:text-foreground ml-1 h-4 w-4 flex-shrink-0" /></a></div>diff --git a/apps/web/src/components/marketing/plans.tsx b/apps/web/src/components/marketing/plans.tsxindex 7ba68d8ad..f66edcf0a 100644--- a/apps/web/src/components/marketing/plans.tsx+++ b/apps/web/src/components/marketing/plans.tsx@@ -3,26 +3,24 @@ import { Check } from "lucide-react";import { Button } from "@openstatus/ui";+import { Shell } from "@/components/dashboard/shell";+import { LoadingAnimation } from "@/components/loading-animation";import type { PlanProps } from "@/config/plans";import { plansConfig } from "@/config/plans";import { cn } from "@/lib/utils";-import { Shell } from "../dashboard/shell";-import { LoadingAnimation } from "../loading-animation";export function Plans() {return (- <Shell>- <div className="grid gap-4 md:grid-cols-2 md:gap-0">- <Plan- {...plansConfig.free}- className="md:border-border/50 md:border-r md:pr-4"- />- <Plan {...plansConfig.pro} className="md:pl-4" />- <Plan- {...plansConfig.enterprise}- className="md:border-border/50 col-span-full md:mt-4 md:border-t md:pt-4"- />- </div>+ <Shell className="grid gap-4 md:grid-cols-2 md:gap-0">+ <Plan+ {...plansConfig.free}+ className="md:border-border/50 md:border-r md:pr-4"+ />+ <Plan {...plansConfig.pro} className="md:pl-4" />+ <Plan+ {...plansConfig.enterprise}+ className="md:border-border/50 col-span-full md:mt-4 md:border-t md:pt-4"+ /></Shell>);}diff --git a/apps/web/src/components/marketing/stats.tsx b/apps/web/src/components/marketing/stats.tsxindex 4d75c0ada..ddb588970 100644--- a/apps/web/src/components/marketing/stats.tsx+++ b/apps/web/src/components/marketing/stats.tsx@@ -1,33 +1,25 @@import { Shell } from "@/components/dashboard/shell";import { getHomeStatsData } from "@/lib/tb";import { numberFormatter } from "@/lib/utils";--// import { api } from "@/trpc/server";+import { api } from "@/trpc/server";export async function Stats() {const tbTotalStats = await getHomeStatsData({});const tbLastHourStats = await getHomeStatsData({ period: "1h" });- // FIXME: is it time?- // const totalActiveMonitors = await api.monitor.getTotalActiveMonitors.query(- // {},- // );+ // const totalActiveMonitors = await api.monitor.getTotalActiveMonitors.query();return (<Shell><div className="grid grid-cols-1 gap-8 sm:grid-cols-3 sm:gap-16"><div className="text-center"><h3 className="font-cal text-3xl">- {tbTotalStats && tbTotalStats?.length > 0- ? numberFormatter(tbTotalStats[0].count)- : 0}+ {numberFormatter(tbTotalStats?.[0].count || 0)}</h3><p className="text-muted-foreground font-light">Total pings</p></div><div className="text-center"><h3 className="font-cal text-3xl">- {tbLastHourStats && tbLastHourStats?.length > 0- ? numberFormatter(tbLastHourStats[0].count)- : 0}+ {numberFormatter(tbLastHourStats?.[0].count || 0)}</h3><p className="text-muted-foreground font-light">Pings in the last hourdiff --git a/apps/web/src/components/marketing/status-page/card.tsx b/apps/web/src/components/marketing/status-page/card.tsxnew file mode 100644index 000000000..13bb64f62--- /dev/null+++ b/apps/web/src/components/marketing/status-page/card.tsx@@ -0,0 +1,29 @@+import { cardConfig } from "@/config/features";+import {+ CardContainer,+ CardContent,+ CardFeature,+ CardFeatureContainer,+ CardHeader,+ CardIcon,+ CardTitle,+} from "../card";+import { TrackerExample } from "./tracker-example";++export function StatusPageCard() {+ const { icon, title, features } = cardConfig.pages;+ return (+ <CardContainer>+ <CardHeader>+ <CardIcon icon={icon} />+ <CardTitle>{title}</CardTitle>+ </CardHeader>+ <CardContent dir="rows">+ <TrackerExample />+ <CardFeatureContainer dir="cols">+ {features?.map((feature, i) => <CardFeature key={i} {...feature} />)}+ </CardFeatureContainer>+ </CardContent>+ </CardContainer>+ );+}diff --git a/apps/web/src/components/marketing/example.tsx b/apps/web/src/components/marketing/status-page/tracker-example.tsxsimilarity index 83%rename from apps/web/src/components/marketing/example.tsxrename to apps/web/src/components/marketing/status-page/tracker-example.tsxindex d1e2ef728..8da9f24cb 100644--- a/apps/web/src/components/marketing/example.tsx+++ b/apps/web/src/components/marketing/status-page/tracker-example.tsx@@ -4,25 +4,23 @@ import Link from "next/link";import { Button } from "@openstatus/ui";-import { Shell } from "@/components/dashboard/shell";import { Tracker } from "@/components/tracker";import { getHomeMonitorListData } from "@/lib/tb";const currentTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;-export async function Example() {+export async function TrackerExample() {return (- <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>- <div className="mx-auto max-w-md">+ <div className="flex w-full flex-col items-center justify-center gap-8">+ <div className="mx-auto w-full max-w-md"><Suspense fallback={<ExampleTrackerFallback />}><ExampleTracker /></Suspense></div>- </Shell>+ <Button asChild variant="outline" className="rounded-full">+ <Link href="/play">Playground</Link>+ </Button>+ </div>);}diff --git a/apps/web/src/components/svg/trigger.tsx b/apps/web/src/components/svg/trigger.tsxindex 2963dc988..8e2db371e 100644--- a/apps/web/src/components/svg/trigger.tsx+++ b/apps/web/src/components/svg/trigger.tsx@@ -62,8 +62,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint1_linear_228_1439"@@ -73,8 +73,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint2_linear_228_1439"@@ -84,8 +84,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint3_linear_228_1439"@@ -95,8 +95,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint4_linear_228_1439"@@ -106,8 +106,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint5_linear_228_1439"@@ -117,8 +117,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint6_linear_228_1439"@@ -128,8 +128,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="13.9297"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient><linearGradientid="paint7_linear_228_1439"@@ -139,8 +139,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="25.9719"gradientUnits="userSpaceOnUse">- <stop stop-color="#2563EB"></stop>- <stop offset="1" stop-color="#A855F7"></stop>+ <stop stopColor="#2563EB"></stop>+ <stop offset="1" stopColor="#A855F7"></stop></linearGradient><linearGradientid="paint8_linear_228_1439"@@ -150,8 +150,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="25.9719"gradientUnits="userSpaceOnUse">- <stop stop-color="#2563EB"></stop>- <stop offset="1" stop-color="#A855F7"></stop>+ <stop stopColor="#2563EB"></stop>+ <stop offset="1" stopColor="#A855F7"></stop></linearGradient><linearGradientid="paint9_linear_228_1439"@@ -161,8 +161,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="25.9719"gradientUnits="userSpaceOnUse">- <stop stop-color="#2563EB"></stop>- <stop offset="1" stop-color="#A855F7"></stop>+ <stop stopColor="#2563EB"></stop>+ <stop offset="1" stopColor="#A855F7"></stop></linearGradient><linearGradientid="paint10_linear_228_1439"@@ -172,8 +172,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="25.9719"gradientUnits="userSpaceOnUse">- <stop stop-color="#2563EB"></stop>- <stop offset="1" stop-color="#A855F7"></stop>+ <stop stopColor="#2563EB"></stop>+ <stop offset="1" stopColor="#A855F7"></stop></linearGradient><linearGradientid="paint11_linear_228_1439"@@ -183,8 +183,8 @@ export function Trigger(props: SVGAttributes<SVGSVGElement>) {y2="31.2381"gradientUnits="userSpaceOnUse">- <stop stop-color="#41FF54"></stop>- <stop offset="1" stop-color="#E7FF52"></stop>+ <stop stopColor="#41FF54"></stop>+ <stop offset="1" stopColor="#E7FF52"></stop></linearGradient></defs></svg>diff --git a/apps/web/src/config/features.ts b/apps/web/src/config/features.tsindex d2705f4e8..ff72437dd 100644--- a/apps/web/src/config/features.ts+++ b/apps/web/src/config/features.ts@@ -4,12 +4,14 @@ export type Feature = {icon: ValidIcon;title: string;// description?: string;- features?: {- icon: ValidIcon;- catchline: string;- description: string;- badge?: "Coming soon" | "New";- }[];+ features?: FeatureDescription[];+};++export type FeatureDescription = {+ icon: ValidIcon;+ catchline: string;+ description: string;+ badge?: "Coming soon" | "New";};export type SpecialFeature = {@@ -29,24 +31,26 @@ export const specialCardConfig = {export const cardConfig = {monitors: {icon: "activity",- title: "Monitors",+ title: "Monitoring",features: [{- icon: "cog",- catchline: "Custom Headers.",+ icon: "globe",+ catchline: "Global Monitoring.",description:- "Add your own headers to the request and access secured endpoints.",+ "Monitor your endpoints from all over the world. We currently support all the continents.",},{icon: "play",- catchline: "Run on demand.",- description: "Check if your endpoint is up and running with one click.",+ catchline: "Monitor anything.",+ description:+ "API, DNS, domain, SLL, SMTP, ping, webpage,... , we can monitor it all.",},{icon: "bot",- catchline: "Automatic checks.",+ catchline: "Cron Monitoring.",+ badge: "Coming soon",description:- "Define the region where to call the request and the frequency how often to call it.",+ "Never let a cron job fail you. Get notified when a jobs did not run successfully.",},],},@@ -56,42 +60,46 @@ export const cardConfig = {features: [{icon: "puzzle",- catchline: "Custom slug.",+ catchline: "Build trust",description:- "Create your own sudomain and inform your users about the uptime of your endpoints.",+ "Showcase your reliability to your users, and reduce the numbers of customers service tickets.",},{icon: "globe",catchline: "Custom domain.",description:- "Give the status page a personal touch. Including the favicon.",+ "Bring your own domain, give the status page a personal touch.",},{icon: "image",- catchline: "OG images.",+ catchline: "Subscription",description:- "Get a custom image with the current uptime of your first monitor.",+ "Let your users subscribe to your status page, to automatically receive updates about the status of your services.",},],},- incidents: {+ alerts: {icon: "siren",- title: "Incidents",+ title: "Alerting",features: [{- icon: "bell",- catchline: "Alerts.",- description: "Be informed if your endpoint fails.",+ icon: "sparkles",+ catchline: "Connect.",+ description:+ "Aggregate alerts from all your monitoring services (Grafana, Datadog) and use our AI to make them actionnable.",+ badge: "Coming soon",},{- icon: "message-circle",- catchline: "Status Reports.",- description: "Keep your teams and users updated with status updates.",+ icon: "zap",+ catchline: "Escalatation.",+ description: "Notify and escalate an alert to the right team member.",+ badge: "Coming soon",},{- icon: "zap",- catchline: "Blazingly Fast.",- description: "Respond to incident faster than ever.",+ icon: "bell",+ catchline: "Get alerted.",+ description:+ "Get notified via Email, SMS, Slack, Discord,... before your users do.",},],},diff --git a/apps/web/src/config/plans.ts b/apps/web/src/config/plans.tsindex dbd1daedd..41d60bf7c 100644--- a/apps/web/src/config/plans.ts+++ b/apps/web/src/config/plans.ts@@ -28,6 +28,7 @@ export const plansConfig: Record<Plans, PlanProps> = {"1 status page","subdomain","10m, 30m, 1h checks",+ "email, slack, discord notifications",],action: {text: "Start Now",@@ -40,9 +41,11 @@ export const plansConfig: Record<Plans, PlanProps> = {cost: 29,features: ["20 monitors",- "5 status page",+ "5 status pages","custom domain","1m, 5m, 10m, 30m, 1h checks",+ "email, slack, discord, sms notifications",+ "status page subscription","5 team members",],action: {diff --git a/packages/tinybird/pipes/home_stats.pipe b/packages/tinybird/pipes/home_stats.pipeindex 4a5573d85..c28336454 100644--- a/packages/tinybird/pipes/home_stats.pipe+++ b/packages/tinybird/pipes/home_stats.pipe@@ -14,7 +14,5 @@ SQL >{% else %}WHERE cronTimestamp > 0{% end %}- {% else %}- WHERE cronTimestamp > {{ Int64(cronTimestamp, 0) }}{% end %}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 0849e38ca..a2a246724 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -212,6 +212,9 @@ importers:cmdk:specifier: 0.2.0+ cobe:+ specifier: 0.6.3+ version: 0.6.3contentlayer:specifier: 0.3.4version: 0.3.4([email protected])@@ -6267,6 +6270,12 @@ packages:- '@types/react'dev: false+ resolution: {integrity: sha512-WHr7X4o1ym94GZ96h7b1pNemZJacbOzd02dZtnVwuC4oWBaLg96PBmp2rIS1SAhUDhhC/QyS9WEqkpZIs/ZBTg==}+ dependencies:+ phenomenon: 1.6.0+ dev: false+resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}dependencies:@@ -10715,6 +10724,10 @@ packages:is-reference: 3.0.2dev: false+ resolution: {integrity: sha512-7h9/fjPD3qNlgggzm88cY58l9sudZ6Ey+UmZsizfhtawO6E3srZQXywaNm2lBwT72TbpHYRPy7ytIHeBUD/G0A==}+ dev: false+resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}