Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: more improvements (#458)
Maximilian Kaske459d55f2031f
diff --git a/apps/web/next.config.js b/apps/web/next.config.jsindex 3c52645df..254266706 100644--- a/apps/web/next.config.js+++ b/apps/web/next.config.js@@ -12,6 +12,7 @@ const nextConfig = {level: "verbose",fullUrl: true,},+ optimizePackageImports: ["@tremor/react"],},images: {remotePatterns: [diff --git a/apps/web/src/app/api/og/route.tsx b/apps/web/src/app/api/og/route.tsxindex ef53d7c99..afe014a0a 100644--- a/apps/web/src/app/api/og/route.tsx+++ b/apps/web/src/app/api/og/route.tsx@@ -2,7 +2,7 @@ import { ImageResponse } from "next/server";import { DESCRIPTION, TITLE } from "@/app/shared-metadata";import { getMonitorListData } from "@/lib/tb";-import { cleanData, getStatus, isInBlacklist } from "@/lib/tracker";+import { cleanData, getStatus } from "@/lib/tracker";import { cn, formatDate } from "@/lib/utils";export const runtime = "edge";@@ -76,7 +76,7 @@ export async function GET(req: Request) {{title}</h1><p tw="text-slate-600 text-3xl">{description}</p>- {bars && bars.length > 0 ? (+ {Boolean(data.length) && Boolean(bars.length) ? (<div tw="flex flex-col w-full mt-6"><div tw="flex flex-row items-center justify-between -mb-1 text-black font-light"><p tw="">{formatDate(new Date())}</p>diff --git a/apps/web/src/components/content/article.tsx b/apps/web/src/components/content/article.tsxindex 94859e196..51213124a 100644--- a/apps/web/src/components/content/article.tsx+++ b/apps/web/src/components/content/article.tsx@@ -16,8 +16,8 @@ export function Article({ post }: { post: Post }) {};return (- <article className="grid gap-8">- <div className="mx-auto grid w-full max-w-prose gap-3">+ <article className="relative mx-auto flex max-w-prose flex-col gap-8">+ <div className="grid w-full gap-3"><h1 className="font-cal mb-5 text-3xl">{post.title}</h1><div className="border-border relative h-64 w-full overflow-hidden rounded-lg border"><Image@@ -48,9 +48,7 @@ export function Article({ post }: { post: Post }) {</div></div></div>- <div className="prose-pre:overflow-y-auto prose-pre:max-w-xs md:prose-pre:max-w-none mx-auto max-w-prose">- <Mdx code={post.body.code} />- </div>+ <Mdx code={post.body.code} /></article>);}diff --git a/apps/web/src/components/content/changelog.tsx b/apps/web/src/components/content/changelog.tsxindex f83ebc187..9d8afe4e9 100644--- a/apps/web/src/components/content/changelog.tsx+++ b/apps/web/src/components/content/changelog.tsx@@ -6,8 +6,8 @@ import { formatDate } from "@/lib/utils";export function Changelog({ post }: { post: Changelog }) {return (- <article className="grid gap-8">- <div className="mx-auto grid w-full max-w-prose gap-3">+ <article className="relative mx-auto flex max-w-prose flex-col gap-8">+ <div className="grid w-full gap-3"><p className="text-muted-foreground font-mono text-sm">{formatDate(new Date(post.publishedAt))}</p>@@ -21,9 +21,7 @@ export function Changelog({ post }: { post: Changelog }) {/></div></div>- <div className="prose-pre:overflow-y-auto prose-pre:max-w-xs md:prose-pre:max-w-none mx-auto max-w-prose">- <Mdx code={post.body.code} />- </div>+ <Mdx code={post.body.code} /></article>);}diff --git a/apps/web/src/components/content/mdx-components.tsx b/apps/web/src/components/content/mdx-components.tsxindex fb378c02e..3d65a7efe 100644--- a/apps/web/src/components/content/mdx-components.tsx+++ b/apps/web/src/components/content/mdx-components.tsx@@ -1,4 +1,6 @@import * as React from "react";+import type { ImageProps } from "next/image";+import Image from "next/image";import Link from "next/link";import type { TweetProps } from "react-tweet";import { Tweet } from "react-tweet";@@ -35,4 +37,7 @@ export const components = {</div>);},+ Image: (props: ImageProps) => {+ return <Image {...props} />;+ },};diff --git a/apps/web/src/components/content/timeline.tsx b/apps/web/src/components/content/timeline.tsxindex e96b0e81d..86853a562 100644--- a/apps/web/src/components/content/timeline.tsx+++ b/apps/web/src/components/content/timeline.tsx@@ -55,7 +55,7 @@ function Article({</Link></div><div className="order-3 grid grid-cols-1 gap-4 md:col-span-4 md:col-start-2">- <h3 className="text-foreground font-cal text-2xl">{title}</h3>+ <h2 className="text-foreground font-cal text-2xl">{title}</h2>{children}</div></article>diff --git a/apps/web/src/components/layout/marketing-menu.tsx b/apps/web/src/components/layout/marketing-menu.tsxindex 981682002..41c1f7042 100644--- a/apps/web/src/components/layout/marketing-menu.tsx+++ b/apps/web/src/components/layout/marketing-menu.tsx@@ -34,7 +34,12 @@ export function MarketingMenu() {return (<Sheet open={open} onOpenChange={(value) => setOpen(value)}><SheetTrigger asChild>- <Button size="icon" variant="outline" className="rounded-full">+ <Button+ size="icon"+ variant="outline"+ className="rounded-full"+ aria-label="menu"+ ><Menu className="h-6 w-6" /></Button></SheetTrigger>diff --git a/apps/web/src/content/posts/migration-backend-from-vercel-to-fly.mdx b/apps/web/src/content/posts/migration-backend-from-vercel-to-fly.mdxindex 77ffeea42..70d2e373f 100644--- a/apps/web/src/content/posts/migration-backend-from-vercel-to-fly.mdx+++ b/apps/web/src/content/posts/migration-backend-from-vercel-to-fly.mdx@@ -34,12 +34,22 @@ Pro M1 and takes 110mb of RAM, and it includes unnecessary extra features fromNext.js. Our prod Next.js app takes about 5 seconds to launch on my computer(contentlayer).-+<Image+ alt="Next server"+ src="/assets/posts/migration-backend-from-vercel-to-fly/next-server.png"+ width={650}+ height={200}+/>For comparaison launching our current server takes 0.19ms and only takes 91mb.Our current server stack is Hono + Bun.-+<Image+ alt="Hono server"+ src="/assets/posts/migration-backend-from-vercel-to-fly/hono-server.png"+ width={650}+ height={575}+/>### 💸 Pricingdiff --git a/apps/web/src/content/posts/migration-planetscale-to-turso.mdx b/apps/web/src/content/posts/migration-planetscale-to-turso.mdxindex ce7137d67..3ccd000ae 100644--- a/apps/web/src/content/posts/migration-planetscale-to-turso.mdx+++ b/apps/web/src/content/posts/migration-planetscale-to-turso.mdx@@ -72,9 +72,22 @@ I was playing with this [Vercel tool](https://edge-data-latency.vercel.app/) todetermine the most suitable database for our users. Among the options, Tursoproved to be the fastest.-+<Image+ alt="Turso latency"+ src="/assets/posts/migration-planetscale-to-turso/turso-latency.png"+ width={650}+ height={575}+/>+Turso is around `60ms` for 5 serial queries globally.-++<Image+ alt="PlanetScale latency"+ src="/assets/posts/migration-planetscale-to-turso/planetscale-latency.png"+ width={650}+ height={575}+/>+While PlanetScale is around `450ms` for 5 serial queries in a different region.We considered using read replicas from PlanetScale, but I was also interested indiff --git a/apps/web/src/content/posts/secure-api-with-unkey.mdx b/apps/web/src/content/posts/secure-api-with-unkey.mdxindex c2990fa1e..12f452d10 100644--- a/apps/web/src/content/posts/secure-api-with-unkey.mdx+++ b/apps/web/src/content/posts/secure-api-with-unkey.mdx@@ -172,8 +172,8 @@ monitorApi.get("/:id", async (c) => {});```-Read more about the Hono path parameter `":id"`-[here](https://hono.dev/api/routing#path-parameter).+Read more about the Hono path parameter `":id"` in their+[docs](https://hono.dev/api/routing#path-parameter).### Test itdiff --git a/apps/web/src/content/posts/the-first-48-hours.mdx b/apps/web/src/content/posts/the-first-48-hours.mdxindex b1e0bee4f..0db990602 100644--- a/apps/web/src/content/posts/the-first-48-hours.mdx+++ b/apps/web/src/content/posts/the-first-48-hours.mdx@@ -38,7 +38,12 @@ randomized check interval of 0 to 90 seconds.For the time being, we will keep it to ensure that every check is successfullyprocessed.-+<Image+ alt="Qstash Usage"+ src="/assets/posts/the-first-48-hours/qstash-usage.png"+ width={650}+ height={168}+/>Moreover, our actions caused the `/monitor/[id]/data` data-table to break. Wewere storing the metadata `res.text()` in Tinybird and retrieving it with the@@ -62,7 +67,12 @@ all the regions:- Number of checks every 1h: 5.670 \* 6 = 34.020- Number of checks every day: 34.020 \* 24 = 816.480-+<Image+ alt="Vercel Usage"+ src="/assets/posts/the-first-48-hours/vercel-usage.png"+ width={650}+ height={263}+/>> We have resolved an issue with regex invocation in the edge middleware.> Previously, it was being called whenever an API endpoint was called.@@ -105,5 +115,16 @@ P.S. We are generating your workspace-slug by merging two random names. Createan account on [openstatus](https://openstatus.dev) and share yours on[Discord](https://openstatus.dev/discord) - it's fun to watch! 🍿--+<Image+ alt="wet-grandmother slug"+ src="/assets/posts/the-first-48-hours/wet-grandmother-workspace-slug.png"+ width={400}+ height={100}+/>++<Image+ alt="enough-gas slug"+ src="/assets/posts/the-first-48-hours/enough-gas-workspace-slug.png"+ width={400}+ height={100}+/>diff --git a/apps/web/src/contentlayer/plugins/autolink-headings.ts b/apps/web/src/contentlayer/plugins/autolink-headings.tsindex cca05a535..7d699a5fc 100644--- a/apps/web/src/contentlayer/plugins/autolink-headings.ts+++ b/apps/web/src/contentlayer/plugins/autolink-headings.ts@@ -9,6 +9,7 @@ const autolinkHeadings: unified.Pluggable<any[]> = [className: ["no-underline after:content-['#'] after:text-muted-foreground/50 after:hover:text-muted-foreground ml-1 after:p-1",],+ "aria-hidden": "true",},},];diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.cssindex 57df35928..31bd52034 100644--- a/apps/web/src/styles/globals.css+++ b/apps/web/src/styles/globals.css@@ -1,5 +1,3 @@-@import "@/styles/syntax-highlighting.css";-@tailwind base;@tailwind components;@tailwind utilities;diff --git a/apps/web/src/styles/syntax-highlighting.css b/apps/web/src/styles/syntax-highlighting.cssdeleted file mode 100644index 82c68bd12..000000000--- a/apps/web/src/styles/syntax-highlighting.css+++ /dev/null@@ -1,35 +0,0 @@-@tailwind base;-@tailwind components;-@tailwind utilities;--div[data-rehype-pretty-code-title] {- @apply -mb-5 ml-4 font-mono text-sm;-}--div[data-rehype-pretty-code-fragment] code {- display: grid;- counter-reset: line;-}--div[data-rehype-pretty-code-fragment] code .line {- @apply border-l-2 border-transparent px-5 py-0;-}--div[data-rehype-pretty-code-fragment] code[data-line-numbers] .line::before {- counter-increment: line;- content: counter(line);- @apply mr-8 inline-block w-4 text-right text-gray-500;-}--div[data-rehype-pretty-code-fragment] code .word {- @apply rounded bg-gray-100/50 p-1;-}--div[data-rehype-pretty-code-fragment] code .highlighted {- @apply border-l-2 border-gray-500 bg-gray-100/25;-}--/* OVERWRITE prose-rem default */-/* div[data-rehype-pretty-code-fragment] pre {- @apply px-0 py-5;-} */