Skip to content

Open-source status page, incident response and uptime monitoring

[Docs] Improve setup documentation DX (#355)

Gaurav Chadha7140e85272b5
diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs
index e672c9ce4..d4eedad7e 100644
--- a/apps/docs/next.config.mjs
+++ b/apps/docs/next.config.mjs
@@ -15,6 +15,7 @@ const withNextra = nextra({
flexsearch: {
codeblock: false,
},
+ defaultShowCopyCode: true
});
export default withNextra({
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 904a8ec50..0400a2cd5 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -25,6 +25,7 @@
"devDependencies": {
"@openstatus/tsconfig": "workspace:*",
"@types/node": "18.11.10",
+ "@types/react": "18.2.12",
"@types/swagger-ui-react": "4.18.1",
"typescript": "5.1.6"
}
diff --git a/apps/docs/pages/developer-guide/get-started.mdx b/apps/docs/pages/developer-guide/get-started.mdx
index c14acf7cc..28bc8fd47 100644
--- a/apps/docs/pages/developer-guide/get-started.mdx
+++ b/apps/docs/pages/developer-guide/get-started.mdx
@@ -1,9 +1,10 @@
## Setup
-1. Clone the repository
+1. Clone the repository and open the created directory
```sh
git clone https://github.com/openstatushq/openstatus.git
+ cd openstatus
```
2. Install dependencies
@@ -43,9 +44,23 @@ pnpm migrate
5. Set up your .env file
-from `apps/web` and `packages/db` you will find .env.example create your own.
+from `apps/web` and `packages/db` you will find .env.example. Please create your own.
-6. Clerk Authentication
+6. Start the web app locally
+
+```sh
+pnpm dev
+```
+> 💡 If you are getting this error - ` ERROR run failed: error preparing engine: Invalid persistent task configuration:
+You have 15 persistent tasks but `turbo` is configured for concurrency of 10. Set --concurrency to at least 16
+`
+Then `cd` into web directory and then start the web app
+> ```sh
+> cd apps/web
+> pnpm dev
+> ```
+
+7. Clerk Authentication
For authentication we are using [Clerk](https://clerk.dev/), you will need to
create an account and get your API keys. If you want to work on the backend and
diff --git a/apps/docs/pages/developer-guide/requirements.mdx b/apps/docs/pages/developer-guide/requirements.mdx
index dad2de777..fe1a4ea86 100644
--- a/apps/docs/pages/developer-guide/requirements.mdx
+++ b/apps/docs/pages/developer-guide/requirements.mdx
@@ -1,9 +1,11 @@
-To begin with, you need to consider the following prerequisites with minimum
-versions of certain applications (in addition to Node.js and pnpm which were
-already mentioned earlier):
+## System Requirements
-- Node.js >= 18.0.0
-- pnpm >= 8.6.2
+Before you start, make sure you have the following applications and their minimum versions installed,
+in addition to Node.js and pnpm (as mentioned earlier):
+
+- [Node.js 18.0.0](https://nodejs.org/) or later.
+- [pnpm 8.6.2](https://nodejs.org/) or later.
+- macOS, Windows (including WSL), and Linux are supported.
## Installing Node.js
@@ -67,6 +69,7 @@ brew tap libsql/sqld
brew install sqld-beta
sqld --help
```
+> *Note: Please ensure to add sqld to you system PATH*
This will allow you to work with the local database without modifying the ".env"
file.
diff --git a/apps/docs/pages/developer-guide/setup-env.mdx b/apps/docs/pages/developer-guide/setup-env.mdx
index 584f47855..13862ddfd 100644
--- a/apps/docs/pages/developer-guide/setup-env.mdx
+++ b/apps/docs/pages/developer-guide/setup-env.mdx
@@ -30,6 +30,8 @@ to Cleark Auth.
6. Paste these values into the `.env` file under their respective variables. It
should look something like this (real values without censorship):
+![Create your monitor](/img/setup-env/clerk.png)
+
```
# CLERK for auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_••••••••••••••••••••••••••••••••••••••••••
@@ -64,6 +66,8 @@ Here's how to obtain the Resend API key:
variable. It should look something like this (real values without
censorship):
+![Create your monitor](/img/setup-env/resend.png)
+
```
# RESEND for email
RESEND_API_KEY=re_••••••••••••••••••••••••••••••••
@@ -141,8 +145,10 @@ UPSTASH.
## Setting up Tinybird
-You will need to create an API token under Auth tokens > Workspace tokens > Add
-a new token.
+You will need to create an API token, Go to Auth tokens > Workspace tokens > Add
+a new token > Select your token
+
+![Create your monitor](/img/setup-env/tinybird.png)
```
# TinyBird
@@ -255,7 +261,7 @@ and save the changes to the `.env` file once you have completed all the
configurations.
-## **Setting up tinybird**
+## **Connect datasource using tinybird-cli**
1. Log in to your tinybird account at https://www.tinybird.co/ or create a new account if you don't have one yet.
diff --git a/apps/docs/pages/developer-guide/setup.mdx b/apps/docs/pages/developer-guide/setup.mdx
index d7b5ddbd4..6145a774b 100644
--- a/apps/docs/pages/developer-guide/setup.mdx
+++ b/apps/docs/pages/developer-guide/setup.mdx
@@ -52,7 +52,7 @@ Make sure to provide appropriate values for each variable defined in the `.env`
file. These variables may include configurations related to the database, API
credentials, etc.
-Keep in mind that the `.env` file should be kept private and should not be
+⚠️ Keep in mind that the `.env` file should be kept **private** and should not be
shared publicly as it may contain sensitive information such as passwords or
access keys.
diff --git a/apps/docs/public/img/setup-env/clerk.png b/apps/docs/public/img/setup-env/clerk.png
new file mode 100644
index 000000000..3814bcd8e
Binary files /dev/null and b/apps/docs/public/img/setup-env/clerk.png differ
diff --git a/apps/docs/public/img/setup-env/resend.png b/apps/docs/public/img/setup-env/resend.png
new file mode 100644
index 000000000..9b4650560
Binary files /dev/null and b/apps/docs/public/img/setup-env/resend.png differ
diff --git a/apps/docs/public/img/setup-env/tinybird.png b/apps/docs/public/img/setup-env/tinybird.png
new file mode 100644
index 000000000..48e6082d1
Binary files /dev/null and b/apps/docs/public/img/setup-env/tinybird.png differ
diff --git a/apps/docs/theme.config.tsx b/apps/docs/theme.config.tsx
index e87a8c11c..20eda4f57 100644
--- a/apps/docs/theme.config.tsx
+++ b/apps/docs/theme.config.tsx
@@ -11,7 +11,15 @@ const config: DocsThemeConfig = {
docsRepositoryBase:
"https://github.com/openstatusHQ/openstatus/tree/main/apps/docs",
footer: {
- text: "OpenStatus Documentation",
+ text: (
+ <span>
+ Copyright {new Date().getFullYear()} ©{' '}
+ <a href="https://www.openstatus.dev/" target="_blank">
+ OpenStatus
+ </a>
+ .
+ </span>
+ )
},
head: (
<>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e9bb3a816..86b3d5dfd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,7 +58,7 @@ importers:
version: 18.2.0([email protected])
swagger-ui-react:
specifier: 5.9.0
devDependencies:
'@openstatus/tsconfig':
specifier: workspace:*
@@ -66,6 +66,9 @@ importers:
'@types/node':
specifier: 18.11.10
version: 18.11.10
+ '@types/react':
+ specifier: 18.2.12
+ version: 18.2.12
'@types/swagger-ui-react':
specifier: 4.18.1
version: 4.18.1
@@ -12475,7 +12478,7 @@ packages:
resolution: {integrity: sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw==}
dev: false
resolution: {integrity: sha512-xJKYI189VwfsFc4CJvHqHlDrzyFTY/3vZACbE+rr/zQ34Xx1wQfB4OTOSeOSNrF6BDVe8OOdxIrAnMGXA3ggfw==}
peerDependencies:
'@types/react': ^16.8 || ^17.0 || ^18.0
@@ -12498,6 +12501,7 @@ packages:
dependencies:
'@babel/runtime': 7.22.15
'@types/hoist-non-react-statics': 3.3.2
+ '@types/react': 18.2.12
'@types/use-sync-external-store': 0.0.3
hoist-non-react-statics: 3.3.2
react: 18.2.0
@@ -13615,7 +13619,7 @@ packages:
- debug
dev: false
resolution: {integrity: sha512-j45ceuGHMRmI8nhOaG71VeQwrPutFHDq6QhgrxOmf4BRMOdOQgVY1POQY9ksnXZtskbD9J2NHURs4BLEDIs8gA==}
peerDependencies:
react: '>=17.0.0'
@@ -13644,7 +13648,7 @@ packages:
react-immutable-proptypes: 2.2.0([email protected])
react-immutable-pure-component: 2.2.2([email protected])([email protected])([email protected])
react-inspector: 6.0.2([email protected])
react-syntax-highlighter: 15.5.0([email protected])
redux: 4.2.1
redux-immutable: 4.0.0([email protected])