diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore new file mode 100644 index 00000000000..aa210b11333 --- /dev/null +++ b/apps/docs/.gitignore @@ -0,0 +1,20 @@ +# build output +dist/ +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/apps/docs/README.md b/apps/docs/README.md new file mode 100644 index 00000000000..e09bf55fefe --- /dev/null +++ b/apps/docs/README.md @@ -0,0 +1,55 @@ +# Starlight Starter Kit: Basics + +[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) + +``` +npm create astro@latest -- --template starlight +``` + +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) +[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs) + +> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! + +## 🚀 Project Structure + +Inside of your Astro + Starlight project, you'll see the following folders and files: + +``` +. +├── public/ +├── src/ +│ ├── assets/ +│ ├── content/ +│ │ ├── docs/ +│ │ └── config.ts +│ └── env.d.ts +├── astro.config.mjs +├── package.json +└── tsconfig.json +``` + +Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. + +Images can be added to `src/assets/` and embedded in Markdown with a relative link. + +Static assets, like favicons, can be placed in the `public/` directory. + +## 🧞 Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :------------------------ | :----------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | +| `npm run astro -- --help` | Get help using the Astro CLI | + +## 👀 Want to learn more? + +Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). diff --git a/apps/docs/api-reference/auth.mdx b/apps/docs/api-reference/auth.mdx deleted file mode 100644 index 2759afbf9f0..00000000000 --- a/apps/docs/api-reference/auth.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Authentication ---- - -In your Settings, you can create and later revoke your API token. Once created, -it will be shown only once so keep it safe. - -On every request to `https://api.openstatus.dev/v1`, you'll have to attach the -token to the header. - -```ts -const monitors = await fetch(`https://api.openstatus.dev/v1/monitor`, { - method: "GET", - headers: new Headers({ - "x-openstatus-key": "os_xxxxxxxxx", - }), -}); -``` - -Use the above snippet to try it out. - -We currently do not have an SDK to make the best out of it. Any contributions -are welcome. - diff --git a/apps/docs/api-reference/check/http/post-http.mdx b/apps/docs/api-reference/check/http/post-http.mdx deleted file mode 100644 index e10327625ee..00000000000 --- a/apps/docs/api-reference/check/http/post-http.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a Check run for a HTTP request -openapi: post /check/http ---- diff --git a/apps/docs/api-reference/errors/code/BAD_REQUEST.mdx b/apps/docs/api-reference/errors/code/BAD_REQUEST.mdx deleted file mode 100644 index eea071f9a8e..00000000000 --- a/apps/docs/api-reference/errors/code/BAD_REQUEST.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: BAD_REQUEST -openapi-schema: ErrBadRequest ---- - -## Problem - -The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). - -## Solution - -Check the request response and making sure it's correct. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). \ No newline at end of file diff --git a/apps/docs/api-reference/errors/code/CONFLICT.mdx b/apps/docs/api-reference/errors/code/CONFLICT.mdx deleted file mode 100644 index 1b0e022e1f8..00000000000 --- a/apps/docs/api-reference/errors/code/CONFLICT.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: CONFLICT -openapi-schema: ErrConflict ---- - -## Problem - -The request could not be completed due to a conflict most likely due to unique constraints like subdomain slugs. - -## Solution - -Make sure to send a unique value for the conflicting field. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). diff --git a/apps/docs/api-reference/errors/code/FORBIDDEN.mdx b/apps/docs/api-reference/errors/code/FORBIDDEN.mdx deleted file mode 100644 index 0dfac7c7a9c..00000000000 --- a/apps/docs/api-reference/errors/code/FORBIDDEN.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: FORBIDDEN -openapi-schema: ErrForbidden ---- - -## Problem - -The server understood the request, but is refusing to fulfill it. Authorization will not help. That most likely indicates your account doesn't have the necessary permissions to execute the request. - -## Solution - -Make sure you have the necessary permissions to execute the request. You might want to upgrade your workspace plan. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). \ No newline at end of file diff --git a/apps/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR.mdx b/apps/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR.mdx deleted file mode 100644 index 4cd5ee035f4..00000000000 --- a/apps/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: INTERNAL_SERVER_ERROR -openapi-schema: ErrInternalServerError ---- - -## Problem - -The server encountered an unexpected condition that prevented it from fulfilling the request. - -## Solution - -Please try again. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). \ No newline at end of file diff --git a/apps/docs/api-reference/errors/code/NOT_FOUND.mdx b/apps/docs/api-reference/errors/code/NOT_FOUND.mdx deleted file mode 100644 index 2515ba6d234..00000000000 --- a/apps/docs/api-reference/errors/code/NOT_FOUND.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: NOT_FOUND -openapi-schema: ErrNotFound ---- - -## Problem - -The requested resource could not be found. You might not be eligible to access the resource or the resource might not exist. - -## Solution - -Make sure you're sending the correct request to the correct endpoint. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). \ No newline at end of file diff --git a/apps/docs/api-reference/errors/code/UNAUTHORIZED.mdx b/apps/docs/api-reference/errors/code/UNAUTHORIZED.mdx deleted file mode 100644 index 38b62a8684d..00000000000 --- a/apps/docs/api-reference/errors/code/UNAUTHORIZED.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UNAUTHORIZED -openapi-schema: ErrUnauthorized ---- - -## Problem - -The request has not been applied because it lacks valid authentication credentials for the target resource. - -## Solution - -Make sure you're sending the correct authentication credentials with your request. - -If that doesn't help, ask for help on [Discord](https://openstatus.dev/discord). \ No newline at end of file diff --git a/apps/docs/api-reference/incident/get-incident-id.mdx b/apps/docs/api-reference/incident/get-incident-id.mdx deleted file mode 100644 index f85fdecf7ac..00000000000 --- a/apps/docs/api-reference/incident/get-incident-id.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Get an incident -openapi: get /incident/:id ---- - -Get an incident by id diff --git a/apps/docs/api-reference/incident/get-incident.mdx b/apps/docs/api-reference/incident/get-incident.mdx deleted file mode 100644 index d8fc62d6eed..00000000000 --- a/apps/docs/api-reference/incident/get-incident.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Get all incidents -openapi: get /incident ---- - -Return all incidents in your workspace diff --git a/apps/docs/api-reference/incident/put-incident-id.mdx b/apps/docs/api-reference/incident/put-incident-id.mdx deleted file mode 100644 index 8b3ece1000a..00000000000 --- a/apps/docs/api-reference/incident/put-incident-id.mdx +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Update an incident -openapi: put /incident/:id ---- - -This endpoint allows you to update an incident. You can acknowledge or resolve -an incident using this endpoint. diff --git a/apps/docs/api-reference/monitor/delete-monitor-id.mdx b/apps/docs/api-reference/monitor/delete-monitor-id.mdx deleted file mode 100644 index 2b78bb2f4f2..00000000000 --- a/apps/docs/api-reference/monitor/delete-monitor-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Delete a monitor -openapi: delete /monitor/:id ---- diff --git a/apps/docs/api-reference/monitor/get-monitor-id.mdx b/apps/docs/api-reference/monitor/get-monitor-id.mdx deleted file mode 100644 index 312a0308da9..00000000000 --- a/apps/docs/api-reference/monitor/get-monitor-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a monitor -openapi: get /monitor/:id ---- diff --git a/apps/docs/api-reference/monitor/get-monitor-id/summary.mdx b/apps/docs/api-reference/monitor/get-monitor-id/summary.mdx deleted file mode 100644 index 99c8dc64f89..00000000000 --- a/apps/docs/api-reference/monitor/get-monitor-id/summary.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a monitor daily summary -openapi: get /monitor/:id/summary ---- diff --git a/apps/docs/api-reference/monitor/get-monitor.mdx b/apps/docs/api-reference/monitor/get-monitor.mdx deleted file mode 100644 index 3cf0fbef71f..00000000000 --- a/apps/docs/api-reference/monitor/get-monitor.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Get all monitors -openapi: get /monitor ---- - -Get all your monitors in a single call. diff --git a/apps/docs/api-reference/monitor/post-monitor.mdx b/apps/docs/api-reference/monitor/post-monitor.mdx deleted file mode 100644 index 0a868196f1c..00000000000 --- a/apps/docs/api-reference/monitor/post-monitor.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a monitor -openapi: post /monitor ---- diff --git a/apps/docs/api-reference/monitor/put-monitor-id.mdx b/apps/docs/api-reference/monitor/put-monitor-id.mdx deleted file mode 100644 index 349530992f6..00000000000 --- a/apps/docs/api-reference/monitor/put-monitor-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Update a monitor -openapi: put /monitor/:id ---- diff --git a/apps/docs/api-reference/notification/get-notification-id.mdx b/apps/docs/api-reference/notification/get-notification-id.mdx deleted file mode 100644 index 8cbc083090e..00000000000 --- a/apps/docs/api-reference/notification/get-notification-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a notification -openapi: get /notification/:id ---- diff --git a/apps/docs/api-reference/notification/get-notification.mdx b/apps/docs/api-reference/notification/get-notification.mdx deleted file mode 100644 index af3634f846a..00000000000 --- a/apps/docs/api-reference/notification/get-notification.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get all notification -openapi: get /notification ---- diff --git a/apps/docs/api-reference/notification/post-notification.mdx b/apps/docs/api-reference/notification/post-notification.mdx deleted file mode 100644 index be0afc08fff..00000000000 --- a/apps/docs/api-reference/notification/post-notification.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a notification -openapi: post /notification ---- diff --git a/apps/docs/api-reference/page/get-page-id.mdx b/apps/docs/api-reference/page/get-page-id.mdx deleted file mode 100644 index ee643df967a..00000000000 --- a/apps/docs/api-reference/page/get-page-id.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Get a Status Page -openapi: get /page/:id ---- - -Get an page by id diff --git a/apps/docs/api-reference/page/get-page.mdx b/apps/docs/api-reference/page/get-page.mdx deleted file mode 100644 index 648d5c9a41f..00000000000 --- a/apps/docs/api-reference/page/get-page.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get all your Status Page -openapi: get /page ---- diff --git a/apps/docs/api-reference/page/post-page-id/update.mdx b/apps/docs/api-reference/page/post-page-id/update.mdx deleted file mode 100644 index 9dbba97ad03..00000000000 --- a/apps/docs/api-reference/page/post-page-id/update.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Add a subscriber -openapi: post /page/:id/update ---- diff --git a/apps/docs/api-reference/page/post-page.mdx b/apps/docs/api-reference/page/post-page.mdx deleted file mode 100644 index 43f613b4196..00000000000 --- a/apps/docs/api-reference/page/post-page.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a status page -openapi: post /page ---- diff --git a/apps/docs/api-reference/page/put-page-id.mdx b/apps/docs/api-reference/page/put-page-id.mdx deleted file mode 100644 index e2b43551dff..00000000000 --- a/apps/docs/api-reference/page/put-page-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Update a Status Page -openapi: put /page/:id ---- diff --git a/apps/docs/api-reference/status_report/delete-status_report-id.mdx b/apps/docs/api-reference/status_report/delete-status_report-id.mdx deleted file mode 100644 index 1b7a491b99c..00000000000 --- a/apps/docs/api-reference/status_report/delete-status_report-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Delete Status Report -openapi: delete /status_report/:id ---- diff --git a/apps/docs/api-reference/status_report/get-status_report-id.mdx b/apps/docs/api-reference/status_report/get-status_report-id.mdx deleted file mode 100644 index a42b385a204..00000000000 --- a/apps/docs/api-reference/status_report/get-status_report-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a Status Report -openapi: get /status_report/:id ---- diff --git a/apps/docs/api-reference/status_report/get-status_report.mdx b/apps/docs/api-reference/status_report/get-status_report.mdx deleted file mode 100644 index a58c137c550..00000000000 --- a/apps/docs/api-reference/status_report/get-status_report.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get all Status Reports -openapi: get /status_report ---- diff --git a/apps/docs/api-reference/status_report/post-status_report-id/update.mdx b/apps/docs/api-reference/status_report/post-status_report-id/update.mdx deleted file mode 100644 index fd97ff5db92..00000000000 --- a/apps/docs/api-reference/status_report/post-status_report-id/update.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Create Status Report Update -openapi: post /status_report/:id/update ---- - -That endpoint is `@deprecated` in favor of [`/status_report_update`](/api-reference/status_report_update/post-status_report_update/) **POST** request. \ No newline at end of file diff --git a/apps/docs/api-reference/status_report/post-status_report.mdx b/apps/docs/api-reference/status_report/post-status_report.mdx deleted file mode 100644 index 3e068be246b..00000000000 --- a/apps/docs/api-reference/status_report/post-status_report.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a Status Report -openapi: post /status_report ---- diff --git a/apps/docs/api-reference/status_report_update/get-status_report_update-id.mdx b/apps/docs/api-reference/status_report_update/get-status_report_update-id.mdx deleted file mode 100644 index 25068b22478..00000000000 --- a/apps/docs/api-reference/status_report_update/get-status_report_update-id.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a Status Report Update -openapi: get /status_report_update/:id ---- diff --git a/apps/docs/api-reference/status_report_update/post-status_report_update.mdx b/apps/docs/api-reference/status_report_update/post-status_report_update.mdx deleted file mode 100644 index 45951cee063..00000000000 --- a/apps/docs/api-reference/status_report_update/post-status_report_update.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Create a Status Report Update -openapi: post /status_report_update ---- diff --git a/apps/docs/api-reference/whoami/get-whoami.mdx b/apps/docs/api-reference/whoami/get-whoami.mdx deleted file mode 100644 index 66444609060..00000000000 --- a/apps/docs/api-reference/whoami/get-whoami.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get a Whoami -openapi: get /whoami ---- diff --git a/apps/docs/astro.config.mjs b/apps/docs/astro.config.mjs new file mode 100644 index 00000000000..21d81e669f2 --- /dev/null +++ b/apps/docs/astro.config.mjs @@ -0,0 +1,205 @@ +import sitemap from "@astrojs/sitemap"; +import starlight from "@astrojs/starlight"; +import tailwind from "@astrojs/tailwind"; +// @ts-check +import { defineConfig } from "astro/config"; +import starlightSidebarTopics from "starlight-sidebar-topics"; +import Icons from "unplugin-icons/vite"; + +// https://astro.build/config +export default defineConfig({ + site: "https://docs.openstatus.dev", + vite: { + plugins: [Icons({ compiler: "astro" })], + }, + integrations: [ + sitemap(), + starlight({ + title: "OpenStatus Docs", + favicon: "/favicon.ico", + social: { + github: "https://github.com/openstatusHQ/openstatus", + blueSky: "https://bsky.app/profile/openstatus.dev", + }, + components: { + SiteTitle: "./src/components/SiteTitle.astro", + Head: "./src/components/Head.astro", + Hero: "./src/components/Hero.astro", + }, + editLink: { + baseUrl: "https://github.com/openstatusHQ/openstatus/app/docs", + }, + customCss: [ + // Path to your Tailwind base styles: + "./src/tailwind.css", + "./src/custom.css", + ], + plugins: [ + starlightSidebarTopics([ + { + label: "Documentation", + link: "/getting-started/introduction", + id: "docs", + icon: "open-book", + items: [ + { + label: "Getting Started", + items: [ + { + label: "Introduction", + slug: "getting-started/introduction", + }, + ], + }, + { + label: "Synthetic Monitoring", + items: [ + { label: "Overview", slug: "monitoring/overview" }, + { + label: "Create you first monitor", + slug: "monitoring/create-monitor", + }, + { + label: "Monitor Types", + collapsed: true, + items: [ + { + label: "HTTP", + slug: "monitoring/type/http", + }, + { + label: "TCP", + slug: "monitoring/type/tcp", + }, + ], + }, + { + label: "Customizations", + collapsed: true, + items: [ + { + label: "Assertions", + slug: "monitoring/customization/assertions", + }, + { + label: "Frequency", + slug: "monitoring/customization/frequency", + }, + { + label: "Regions", + slug: "monitoring/customization/regions", + }, + { + label: "Timing", + slug: "monitoring/customization/timing", + }, + ], + }, + ], + collapsed: false, + }, + { + label: "Status Page", + + items: [ + { label: "Overview", slug: "status-page/overview" }, + { label: "Reports", slug: "status-page/reports" }, + { label: "Maintenances", slug: "status-page/maintenances" }, + { label: "Widget", slug: "status-page/widget" }, + { label: "Custom Domain", slug: "status-page/custom-domain" }, + { + label: "Subscribers", + slug: "status-page/subscribers", + }, + { + label: "Customization", + autogenerate: { directory: "status-page/customization" }, + collapsed: true, + }, + ], + }, + { label: "Incidents", autogenerate: { directory: "incident" } }, + { + label: "Alerting", + items: [ + { label: "Overview", slug: "alerting/overview" }, + { + label: "Notification Channels", + autogenerate: { + directory: "alerting/providers", + collapsed: true, + }, + }, + ], + }, + { + label: "Tools", + autogenerate: { directory: "tools" }, + }, + { + label: "Support", + items: [ + { + label: "Help", + slug: "help/support", + }, + ], + }, + ], + }, + { + label: "Guides", + icon: "rocket", + link: "/guides/introduction", + items: [ + { + label: "Guides", + autogenerate: { directory: "guides" }, + }, + ], + }, + { + label: "Contributing", + icon: "heart", + link: "/contributing/getting-started", + items: [ + { + label: "Contributing", + autogenerate: { directory: "contributing" }, + }, + ], + }, + { + label: "CLI", + icon: "seti:powershell", + link: "/cli/getting-started", + items: [ + { + label: "CLI", + items: [ + { + label: "Getting Started", + slug: "cli/getting-started", + }, + { + label: "Commands", + autogenerate: { directory: "cli/commands" }, + }, + ], + }, + ], + }, + { + label: "API Reference", + icon: "puzzle", + link: "https://api.openstatus.dev/v1", + }, + ]), + ], + }), + tailwind({ + // Disable the default base styles: + applyBaseStyles: false, + }), + ], +}); diff --git a/apps/docs/favicon.svg b/apps/docs/favicon.svg deleted file mode 100644 index 60aa4ab5bc1..00000000000 --- a/apps/docs/favicon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/apps/docs/guides/test-latency-cf-workers-in-github-actions.mdx b/apps/docs/guides/test-latency-cf-workers-in-github-actions.mdx deleted file mode 100644 index de1b70ed414..00000000000 --- a/apps/docs/guides/test-latency-cf-workers-in-github-actions.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: How to use OpenStatus in GitHub Actions to test your Cloudflare Workers latency. -description: Learn how to use OpenStatus for testing latency in your GitHub Actions to verify your Cloudflare Workers' performance. ---- - -## Introduction - -As a developer, you want to make sure your endpoints are fast and reliable after each deployment. - -In this guide, we will show you how to use OpenStatus for testing latency in GitHub Actions to verify your endpoint's performance. - -We'll deploy a basic API endpoint and run a latency test in a GitHub Action with OpenStatus. If the latency is higher than expected, we will roll back the deployment. - -All the code showcased in this guide is available on [GitHub](https://github.com/openstatusHQ/github-action-rollback). - - -## Prerequisites - -- A Cloudflare Account. -- A GitHub Account. -- An [OpenStatus](https://www.openstatus.dev) Account. - - -## Our API Endpoint - -For this guide, we are using a simple [Hono](https://www.hono.dev) server that returns `Hello OpenStatus!`. -We are deploying it on [Cloudflare Workers](https://workers.cloudflare.com/). Cloudflare Workers is a serverless platform that allows you to deploy your code globally. They are fast and reliable. But sometimes you might introduce a bug that slows down your endpoint. - - -```typescript -import { Hono } from "hono"; - -const app = new Hono(); - -app.get("/", async (c) => { - return c.text("Hello OpenStatus!"); -}); - -export default app; -``` - - -## Setting up the test - -For the test, we are using the [OpenStatus API](https://docs.openstatus.dev/api-reference/check/post-check) to run a global latency test on our endpoint. -If the latency is higher than expected, we will roll back the deployment. -We expect our endpoint to have a 75th percentile latency of less than 1000ms in all regions. - -You need to get your OpenStatus API key from the OpenStatus dashboard. - -To get your API key, go to: - -1. Settings -> 2. API Tokens -> 3. Create API Key - - - OpenStatus API Key Creation - - -If you want to run the test locally copy your API key to a `.env` file. - -```env -OPENSTATUS_API_KEY=your-api-key -``` - -Here is our test first we warm up our endpoint and then run the latency test with OpenStatus. - - - -```typescript -test("should fail if p75 > 1000", async () => { - - // Let's warm our endpoint - await fetch("https://github-action-rollback.thibaultleouay.workers.dev/"); - // Run the test - const options = { - method: "POST", - headers: { - "Content-Type": "application/json", - "x-openstatus-key": process.env.OPENSTATUS_API_KEY || "", - }, - body: '{"url":"https://github-action-rollback.thibaultleouay.workers.dev/","method":"GET","regions":["ams","iad","gru","hkg","jnb","syd"],"runCount":2,"aggregated":true}', - }; - - const data = await fetch("https://api.openstatus.dev/v1/check", options); - const json = await data.json(); - const result = schema.parse(json); - expect(result.aggregated.firstByte.p75 < 1000).toBe(true); -}); -``` - -## Setting up the GitHub Actions - -We will use GitHub Actions to deploy our endpoint and run the test. -We are using the package.json command to deploy our endpoint instead of the Cloudflare Workers Action and run the test - -You need to set up your secrets in the GitHub repository settings for the OpenStatus API key and Cloudflare API token. - -Go to 1. Settings -> 2. Secrets and variables -> 3. New repository secret. - - - - GitHub Secrets - - - - -Here is the GitHub Action workflow file: - -```yaml - -name: Deploy - -on: - push: - branches: - - main - -jobs: - deploy: - name: Deploy 🔥 - runs-on: ubuntu-latest - env: - OPENSTATUS_API_KEY: ${{ secrets.OPENSTATUS_API_KEY }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - - steps: - - name: ⬇️ Checkout repo - uses: actions/checkout@v3 - - - name: 🔥 Install bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: 📥 Download deps - run: bun install - - - name: 🔥 Deploy - run: bun run deploy - - - - name: 🧪 Test - run: bun test - id: test - - - name: 🚀 Rollback - if: failure() && steps.test.outcome == 'failure' - run: bun run rollback -``` - -In the workflow file, we have this step it will only run if the test fails: - -```yaml - - name: 🚀 Rollback - if: failure() && steps.test.outcome == 'failure' - run: bun run rollback -``` - -and in our package.json we have the following script: - -```json -{ - "scripts": { - "rollback": "wrangler rollback --message 'Integration test failed'" - } -} -``` - -If you want to see the example in action, you can check the [GitHub repository actions](https://github.com/openstatusHQ/github-action-rollback/actions) - - -## Conclusion - -We have successfully set up a GitHub Action that deploys our endpoint our Cloudflare Workers and runs a latency test against it with OpenStatus. - - -Don't ever let your users experience slow endpoints, use OpenStatus to monitor your endpoint's performance and roll back deployments if needed. \ No newline at end of file diff --git a/apps/docs/integrations.mdx b/apps/docs/integrations.mdx deleted file mode 100644 index 4b11ec47141..00000000000 --- a/apps/docs/integrations.mdx +++ /dev/null @@ -1,3 +0,0 @@ -# Integrations 🔌 - -You can connect with OpenStatus account with other service. diff --git a/apps/docs/introduction.mdx b/apps/docs/introduction.mdx deleted file mode 100644 index cbfc99832e9..00000000000 --- a/apps/docs/introduction.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: What is OpenStatus? ---- - -OpenStatus is an open-source synthetic and frontend performance monitoring -service. - -## Products - -OpenStatus is composed of two products: - - - - Monitor your website or API availability and - performance from different locations around the world. - - - Monitor your website performance from your users' browsers. - - - - -## Trying OpenStatus - -The easiest way to quickly try the app is to signup on -[www.openstatus.dev](https://www.openstatus.dev) diff --git a/apps/docs/mint.json b/apps/docs/mint.json deleted file mode 100644 index 4ce0b559a7b..00000000000 --- a/apps/docs/mint.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "$schema": "https://mintlify.com/schema.json", - "name": "OpenStatus Docs", - "openapi": "https://api.openstatus.dev/v1/openapi", - "logo": { - "dark": "/logo/OpenStatus-dark.svg", - "light": "/logo/OpenStatus-light.svg" - }, - "api": { - "baseUrl": "https://api.openstatus.dev/v1", - "auth": { - "method": "key", - "name": "x-openstatus-key" - } - }, - "metadata": { - "og:image": "https://www.openstatus.dev/api/og" - }, - "feedback": { - "raiseIssue": true, - "suggestEdit": true, - "thumbsRating": true - }, - "favicon": "/favicon.svg", - "colors": { - "primary": "#0D9373", - "light": "#07C983", - "dark": "#0D9373", - "anchors": { - "from": "#0D9373", - "to": "#07C983" - } - }, - "topbarLinks": [ - { - "name": "Discord", - "url": "https://www.openstatus.dev/discord" - }, - { - "name": "GitHub", - "url": "https://github.com/openstatushq/openstatus" - } - ], - "topbarCtaButton": { - "name": "Get Started", - "url": "https://www.openstatus.dev/app" - }, - "tabs": [ - { - "name": "API Reference", - "url": "api-reference" - }, - { - "name": "Guides", - "url": "guides" - }, - { - "name": "Contributor Guides", - "url": "contributing" - } - ], - "anchors": [ - { - "name": "GitHub", - "icon": "github", - "url": "https://github.com/openstatushq/openstatus" - }, - { - "name": "Community", - "icon": "discord", - "url": "https://www.openstatus.dev/discord" - } - ], - "navigation": [ - { - "group": "Introduction", - "pages": ["introduction"] - }, - { - "group": "Synthetic Monitoring", - "pages": [ - "synthetic/overview", - { - "group": "Features", - "pages": [ - "synthetic/features/incident", - "synthetic/features/monitor", - { - "group": "Notifications", - "pages": [ - "synthetic/features/notification", - { - "group": "Notification Channels", - "pages": [ - "synthetic/features/notification/discord", - "synthetic/features/notification/pagerduty", - "synthetic/features/notification/phone-call", - "synthetic/features/notification/slack", - "synthetic/features/notification/sms", - "synthetic/features/notification/telegram" - ] - } - ] - }, - "synthetic/features/status-page", - "synthetic/features/status-report", - "synthetic/features/status-page-subscribers" - ] - } - ] - }, - { - "group": "Real User Monitoring", - "pages": ["rum/overview", "rum/get-started"] - }, - { - "group": "Developer Tools", - "pages": [ - "packages/react", - "packages/status-widget", - "packages/terraform" - ] - }, - { - "group": "Contributor Guides", - "pages": [ - "contributing/requirements", - "contributing/get-started", - "contributing/setup-env" - ] - }, - { - "group": "Help", - "pages": ["help/support"] - }, - { - "group": "API Documentation", - "icon": "code", - "pages": [ - "api-reference/auth", - { - "group": "Monitor", - "pages": [ - "api-reference/monitor/get-monitor-id", - "api-reference/monitor/get-monitor", - "api-reference/monitor/delete-monitor-id", - "api-reference/monitor/post-monitor", - "api-reference/monitor/put-monitor-id" - ] - }, - { - "group": "Check", - "pages": ["api-reference/check/http/post-http"] - }, - { - "group": "Status Page", - "pages": [ - "api-reference/page/get-page", - "api-reference/page/get-page-id", - "api-reference/page/post-page", - "api-reference/page/put-page-id", - "api-reference/page/post-page-id/update" - ] - }, - { - "group": "Status Report", - "pages": [ - "api-reference/status_report/get-status_report-id", - "api-reference/status_report/get-status_report", - "api-reference/status_report/delete-status_report-id", - "api-reference/status_report/post-status_report", - "api-reference/status_report/post-status_report-id/update" - ] - }, - { - "group": "Status Report Update", - "pages": [ - "api-reference/status_report_update/get-status_report_update-id", - "api-reference/status_report_update/post-status_report_update" - ] - }, - { - "group": "Notification", - "pages": [ - "api-reference/notification/get-notification", - "api-reference/notification/get-notification-id", - "api-reference/notification/post-notification" - ] - }, - { - "group": "Incident", - "pages": [ - "api-reference/incident/get-incident-id", - "api-reference/incident/get-incident", - "api-reference/incident/put-incident-id" - ] - }, - { - "group": "Errors", - "pages": [ - "api-reference/errors/code/BAD_REQUEST", - "api-reference/errors/code/UNAUTHORIZED", - "api-reference/errors/code/FORBIDDEN", - "api-reference/errors/code/NOT_FOUND", - "api-reference/errors/code/CONFLICT", - "api-reference/errors/code/INTERNAL_SERVER_ERROR" - ] - } - ] - }, - { - "group": "Guides", - "pages": [ - "guides/introduction", - "guides/how-deploy-checker-koyeb", - "guides/test-latency-cf-workers-in-github-actions", - "guides/how-deploy-status-page-cf-pages" - ] - } - ], - "analytics": { - "plausible": { - "domain": "docs.openstatus.dev" - } - }, - "footerSocials": { - "website": "https://www.openstatus.dev", - "twitter": "https://twitter.com/openstatushq", - "discord": "https://www.openstatus.dev/discord", - "github": "https://github.com/openstatushq/openstatus" - } -} diff --git a/apps/docs/package.json b/apps/docs/package.json index 348cd3b9d7b..1d702347ed1 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,11 +1,28 @@ { "name": "@openstatus/docs", - "version": "0.0.0", - "private": true, + "type": "module", + "version": "0.0.1", "scripts": { - "dev": "pnpm dlx mintlify@latest dev --port 3002", - "verify": "pnpm dlx mintlify@latest broken-links" + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" }, - "keywords": [], - "author": "OpenStatus" + "dependencies": { + "@astrojs/check": "0.9.4", + "@astrojs/sitemap": "^3.2.1", + "@astrojs/starlight": "0.28.6", + "@astrojs/starlight-tailwind": "^2.0.3", + "@astrojs/tailwind": "^5.1.2", + "astro": "4.16.10", + "sharp": "0.33.5", + "starlight-showcases": "0.2.0", + "starlight-sidebar-topics": "0.2.0", + "unplugin-icons": "0.20.1" + }, + "devDependencies": { + "@iconify-json/lucide": "1.2.15", + "typescript": "5.6.3" + } } diff --git a/apps/docs/favicon.ico b/apps/docs/public/favicon.ico similarity index 100% rename from apps/docs/favicon.ico rename to apps/docs/public/favicon.ico diff --git a/apps/docs/public/fonts/CalSans-SemiBold.ttf b/apps/docs/public/fonts/CalSans-SemiBold.ttf new file mode 100644 index 00000000000..4a2950a0451 Binary files /dev/null and b/apps/docs/public/fonts/CalSans-SemiBold.ttf differ diff --git a/apps/docs/public/fonts/Inter-Light.ttf b/apps/docs/public/fonts/Inter-Light.ttf new file mode 100644 index 00000000000..9e265d8905d Binary files /dev/null and b/apps/docs/public/fonts/Inter-Light.ttf differ diff --git a/apps/docs/public/fonts/Inter-Medium.ttf b/apps/docs/public/fonts/Inter-Medium.ttf new file mode 100644 index 00000000000..a01f3777a6f Binary files /dev/null and b/apps/docs/public/fonts/Inter-Medium.ttf differ diff --git a/apps/docs/public/fonts/Inter-Regular.ttf b/apps/docs/public/fonts/Inter-Regular.ttf new file mode 100644 index 00000000000..8d4eebf2066 Binary files /dev/null and b/apps/docs/public/fonts/Inter-Regular.ttf differ diff --git a/apps/docs/rum/get-started.mdx b/apps/docs/rum/get-started.mdx deleted file mode 100644 index 8d3feffcc34..00000000000 --- a/apps/docs/rum/get-started.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Get Started -description: "How to start using OpenStatus' real user monitoring" ---- -## Get Started 🚀 - -In order to start using OpenStatus' real user monitoring, you need to create an new application in your dashboard. - -It will generate a unique Data Source Name (DSN) that you will use to initialize the monitoring in your application. - - -## Setup 🔧 - -We currently only support NextJS applications, other frameworks are coming soon. - -To get started, you need to install our package in your application. - -```bash -pnpm add @openstatus/next-monitoring -E -``` - -Then, you need to add the following snippet to your `layout.tsx` file: - -```tsx -import { OpenStatusProvider } from "@openstatus/next-monitoring"; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - - {children} - - - ); -} -``` - - -What is `YOUR_DSN`? It's your unique Data Source Name that you can find in your OpenStatus dashboard. - - diff --git a/apps/docs/rum/overview.mdx b/apps/docs/rum/overview.mdx deleted file mode 100644 index 2f2ff2da1a0..00000000000 --- a/apps/docs/rum/overview.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Overview -description: "How does OpenStatus' real user monitoring work?" ---- - -With our real user monitoring, you can track the performance of your website -from your users' browsers. - -You install a small JavaScript snippet on your website, and we will record the -performance metrics of your website for each user. - -## Metrics 📊 - -We are currently tracking the following metrics: - -- **TTFB**: Time to First Byte -- **FCP**: First Contentful Paint -- **LCP**: Largest Contentful Paint -- **CLS**: Cumulative Layout Shift -- **INP**: Interaction to Next Paint - diff --git a/apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-1.png b/apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-1.png similarity index 100% rename from apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-1.png rename to apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-1.png diff --git a/apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-2.png b/apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-2.png similarity index 100% rename from apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-2.png rename to apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-2.png diff --git a/apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-3.png b/apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-3.png similarity index 100% rename from apps/docs/images/guides/how-deploy-checker-koyeb/koyeb-3.png rename to apps/docs/src/assets/guides/how-deploy-checker-koyeb/koyeb-3.png diff --git a/apps/docs/images/guides/how-deploy-status-page-cf-pages/status-page.png b/apps/docs/src/assets/guides/how-deploy-status-page-cf-pages/status-page.png similarity index 100% rename from apps/docs/images/guides/how-deploy-status-page-cf-pages/status-page.png rename to apps/docs/src/assets/guides/how-deploy-status-page-cf-pages/status-page.png diff --git a/apps/docs/images/guides/latency-ci-integration-test/github-api-token.png b/apps/docs/src/assets/guides/latency-ci-integration-test/github-api-token.png similarity index 100% rename from apps/docs/images/guides/latency-ci-integration-test/github-api-token.png rename to apps/docs/src/assets/guides/latency-ci-integration-test/github-api-token.png diff --git a/apps/docs/images/guides/latency-ci-integration-test/openstatus-api-token.png b/apps/docs/src/assets/guides/latency-ci-integration-test/openstatus-api-token.png similarity index 100% rename from apps/docs/images/guides/latency-ci-integration-test/openstatus-api-token.png rename to apps/docs/src/assets/guides/latency-ci-integration-test/openstatus-api-token.png diff --git a/apps/docs/src/assets/houston.webp b/apps/docs/src/assets/houston.webp new file mode 100644 index 00000000000..930c164974a Binary files /dev/null and b/apps/docs/src/assets/houston.webp differ diff --git a/apps/docs/src/assets/icon.png b/apps/docs/src/assets/icon.png new file mode 100644 index 00000000000..9f458a6c8c0 Binary files /dev/null and b/apps/docs/src/assets/icon.png differ diff --git a/apps/docs/images/incident/incident-detail.png b/apps/docs/src/assets/incident/incident-detail.png similarity index 100% rename from apps/docs/images/incident/incident-detail.png rename to apps/docs/src/assets/incident/incident-detail.png diff --git a/apps/docs/images/monitor/monitor-detail.png b/apps/docs/src/assets/monitor/monitor-detail.png similarity index 100% rename from apps/docs/images/monitor/monitor-detail.png rename to apps/docs/src/assets/monitor/monitor-detail.png diff --git a/apps/docs/images/monitor/monitor.png b/apps/docs/src/assets/monitor/monitor.png similarity index 100% rename from apps/docs/images/monitor/monitor.png rename to apps/docs/src/assets/monitor/monitor.png diff --git a/apps/docs/images/monitor/public-monitor.png b/apps/docs/src/assets/monitor/public-monitor.png similarity index 100% rename from apps/docs/images/monitor/public-monitor.png rename to apps/docs/src/assets/monitor/public-monitor.png diff --git a/apps/docs/images/monitor/setting-public-monitor.png b/apps/docs/src/assets/monitor/setting-public-monitor.png similarity index 100% rename from apps/docs/images/monitor/setting-public-monitor.png rename to apps/docs/src/assets/monitor/setting-public-monitor.png diff --git a/apps/docs/images/notification/discord-notification.png b/apps/docs/src/assets/notification/discord-notification.png similarity index 100% rename from apps/docs/images/notification/discord-notification.png rename to apps/docs/src/assets/notification/discord-notification.png diff --git a/apps/docs/images/notification/pagerduty/pagerduty-1.png b/apps/docs/src/assets/notification/pagerduty/pagerduty-1.png similarity index 100% rename from apps/docs/images/notification/pagerduty/pagerduty-1.png rename to apps/docs/src/assets/notification/pagerduty/pagerduty-1.png diff --git a/apps/docs/images/notification/pagerduty/pagerduty-2.png b/apps/docs/src/assets/notification/pagerduty/pagerduty-2.png similarity index 100% rename from apps/docs/images/notification/pagerduty/pagerduty-2.png rename to apps/docs/src/assets/notification/pagerduty/pagerduty-2.png diff --git a/apps/docs/images/notification/pagerduty/pagerduty-3.png b/apps/docs/src/assets/notification/pagerduty/pagerduty-3.png similarity index 100% rename from apps/docs/images/notification/pagerduty/pagerduty-3.png rename to apps/docs/src/assets/notification/pagerduty/pagerduty-3.png diff --git a/apps/docs/images/setup-env/clerk-step1.png b/apps/docs/src/assets/setup-env/clerk-step1.png similarity index 100% rename from apps/docs/images/setup-env/clerk-step1.png rename to apps/docs/src/assets/setup-env/clerk-step1.png diff --git a/apps/docs/images/setup-env/clerk-step2.png b/apps/docs/src/assets/setup-env/clerk-step2.png similarity index 100% rename from apps/docs/images/setup-env/clerk-step2.png rename to apps/docs/src/assets/setup-env/clerk-step2.png diff --git a/apps/docs/images/setup-env/clerk-step3.png b/apps/docs/src/assets/setup-env/clerk-step3.png similarity index 100% rename from apps/docs/images/setup-env/clerk-step3.png rename to apps/docs/src/assets/setup-env/clerk-step3.png diff --git a/apps/docs/images/setup-env/clerk.png b/apps/docs/src/assets/setup-env/clerk.png similarity index 100% rename from apps/docs/images/setup-env/clerk.png rename to apps/docs/src/assets/setup-env/clerk.png diff --git a/apps/docs/images/setup-env/drizzle-studio.png b/apps/docs/src/assets/setup-env/drizzle-studio.png similarity index 100% rename from apps/docs/images/setup-env/drizzle-studio.png rename to apps/docs/src/assets/setup-env/drizzle-studio.png diff --git a/apps/docs/images/setup-env/resend.png b/apps/docs/src/assets/setup-env/resend.png similarity index 100% rename from apps/docs/images/setup-env/resend.png rename to apps/docs/src/assets/setup-env/resend.png diff --git a/apps/docs/images/setup-env/tinybird.png b/apps/docs/src/assets/setup-env/tinybird.png similarity index 100% rename from apps/docs/images/setup-env/tinybird.png rename to apps/docs/src/assets/setup-env/tinybird.png diff --git a/apps/docs/images/status-page/status-page-empty.png b/apps/docs/src/assets/status-page/status-page-empty.png similarity index 100% rename from apps/docs/images/status-page/status-page-empty.png rename to apps/docs/src/assets/status-page/status-page-empty.png diff --git a/apps/docs/images/status-widget/widget-example.png b/apps/docs/src/assets/status-widget/widget-example.png similarity index 100% rename from apps/docs/images/status-widget/widget-example.png rename to apps/docs/src/assets/status-widget/widget-example.png diff --git a/apps/docs/src/components/Head.astro b/apps/docs/src/components/Head.astro new file mode 100644 index 00000000000..7b1ecfb8db2 --- /dev/null +++ b/apps/docs/src/components/Head.astro @@ -0,0 +1,12 @@ +--- +import Default from "@astrojs/starlight/components/Head.astro"; +import type { Props } from "@astrojs/starlight/props"; +--- + + + + +