Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
Add more documentation (#158)
johanruizbc4eb4c9c9177
diff --git a/apps/docs/pages/get-started/_meta.json b/apps/docs/pages/get-started/_meta.jsonnew file mode 100644index 000000000..f2e62d4fe--- /dev/null+++ b/apps/docs/pages/get-started/_meta.json@@ -0,0 +1,5 @@+{+ "requirements": "Requirements",+ "setup": "Setup",+ "setup-env": "Setup environment files"+}diff --git a/apps/docs/pages/get-started/requirements.mdx b/apps/docs/pages/get-started/requirements.mdxnew file mode 100644index 000000000..4a2aa0237--- /dev/null+++ b/apps/docs/pages/get-started/requirements.mdx@@ -0,0 +1,76 @@+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):++- Node.js >= 18.0.0+- pnpm >= 8.6.2++## **Installing Node.js**++To install Node.js, follow the instructions based on your operating system:++- For Windows or macOS, visit the official Node.js website:+ [https://nodejs.org/](https://nodejs.org/) and download the latest or LTS+ version (18.0.0 or above). Run the installer and follow the setup wizard.++- For Linux, you can use a package manager+ ([nvm](https://github.com/nvm-sh/nvm.git/)) or download the binaries from the+ official Node.js website. For example, using the package manager `apt` on+ Ubuntu:++ ```bash+ sudo apt update+ sudo apt install nodejs+ ```++ Ensure that the installed version is 18.0.0 or above:++ ```bash+ node --version+ ```++## **Installing pnpm**++To install pnpm, you can use npm, the Node.js package manager. Open your+terminal or command prompt and run the following command:++```bash+npm install -g pnpm+```++Make sure that the installed version of pnpm is 8.6.2 or above:++```bash+pnpm --version+```++Alternatively you can also install it from its official website+[https://pnpm.io/](https://pnpm.io/).++## **Optional Requirements for a Local Database:**++If you want to use a local database, it is recommended to install "brew" and+"sqld".++### **Installing brew**++To install brew, it is recommended to use brew.sh from+[https://brew.sh/](https://brew.sh/) and follow its instructions.++### **Installing sqld**++Once you have installed it and performed updates with brew update --auto-update,+you can install "sqld" as follows:++```bash+brew tap libsql/sqld+brew install sqld-beta+sqld --help+```++This will allow you to work with the local database without modifying the ".env"+file.++Please note that these optional requirements are only necessary if you want to+use a local database. Otherwise, you can continue with the rest of the+configuration as mentioned previously.diff --git a/apps/docs/pages/get-started/setup-env.mdx b/apps/docs/pages/get-started/setup-env.mdxnew file mode 100644index 000000000..c4ad4fead--- /dev/null+++ b/apps/docs/pages/get-started/setup-env.mdx@@ -0,0 +1,215 @@+# **Configuration of the .env file**++The `.env` file contains various environment variables that need to be properly+configured for the application to work correctly. Below, I will explain how to+obtain the values for some of these variables, focusing on the section related+to Cleark Auth.++## **Setting up Clerk for auth**++1. Log in to your Clerk account at [https://clerk.com/](https://clerk.com/) or+ create a new account if you don't have one yet.++2. Once logged in, go to your dashboard at+ [https://dashboard.clerk.com/](https://dashboard.clerk.com/) and create a new+ app if you haven't already.++3. After setting up your app minimally, navigate to the "DEVELOPERS" section in+ the left-hand menu and find "API Keys."++4. In the "Quick Copy" section, make sure that Next.js is selected, then click+ the copy icon to obtain the keys. Copy the values for+ "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY" and "CLERK_SECRET_KEY."++5. Paste these values into the `.env` file under their respective variables. It+ should look something like this (real values without censorship):++```+# CLERK for auth+NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_••••••••••••••••••••••••••••••••••••••••••+CLERK_SECRET_KEY=sk_test_••••••••••••••••••••••••••••••••••••••••••+```++Remember to replace the key values with the actual keys obtained from your Clerk+account.++## **Setting up Resend for sending emails**++The "RESEND for email" section in the `.env` file contains the "RESEND_API_KEY"+variable, which corresponds to the Resend API key that you need to set up to+send emails.++Here's how to obtain the Resend API key:++1. Access the Resend website at [https://resend.com](https://resend.com) and log+ in with your account or create a new account if you don't have one.++2. Once you've logged in, look for the option to add a new API Key. You can do+ this by clicking the corresponding button or navigating to the "API Keys"+ section and creating it from there.++3. Fill in the necessary information to create the API Key, such as the name and+ required permissions.++4. Once the API Key is created, copy its value, which usually starts with "re\_"+ and includes a series of characters.++5. Paste this API Key value into the `.env` file under the "RESEND_API_KEY"+ variable. It should look something like this (real values without+ censorship):++```+# RESEND for email+RESEND_API_KEY=re_••••••••••••••••••••••••••••••••+```++Replace the key with the actual Resend API key you obtained from your Resend+account.++## **Setting up UPSTASH (QStash and Redis)**++The "UPSTASH for queue" section in the `.env` file contains the following+variables related to QStash and Redis:++```+# UPSTASH for queue+QSTASH_CURRENT_SIGNING_KEY=qstash-current-signing-key+QSTASH_NEXT_SIGNING_KEY=qstash-next-signing-key+QSTASH_TOKEN=qstash-token+QSTASH_URL=https://qstash.upstash.io/v1/publish/+++# UPSTASH redis for waiting list+UPSTASH_REDIS_REST_URL=test+UPSTASH_REDIS_REST_TOKEN=test+```++To configure UPSTASH correctly, follow these steps:++### **Obtaining QStash Keys**++1. Log in to your UPSTASH account at+ [https://upstash.com/](https://upstash.com/) or create a new account if you+ don't have one yet.++2. Once logged in, go to+ [https://console.upstash.com/qstash](https://console.upstash.com/qstash) and+ copy the keys you need one by one. These keys are+ "QSTASH_CURRENT_SIGNING_KEY", "QSTASH_NEXT_SIGNING_KEY", and "QSTASH_TOKEN".++3. Paste these keys into the `.env` file under their respective variables. It+ should look something like this (real values without censorship):++```+# UPSTASH for queue+QSTASH_CURRENT_SIGNING_KEY=sig_•••••••••••••••••••••••••+QSTASH_NEXT_SIGNING_KEY=sig_•••••••••••••••••••••••••+QSTASH_TOKEN=ey••••••••••••••••••••••••••••••••+QSTASH_URL=https://qstash.upstash.io/v1/publish/+```++Replace the ellipsis with the actual keys you obtained from UPSTASH.++### **Configuring Redis**++1. Create a Redis database in UPSTASH through+ [https://console.upstash.com/](https://console.upstash.com/).++2. Once the database is created, access "Details" and go to the "API REST"+ section, selecting the `.env` tab.++3. Copy the URL and token information displayed there and paste them in the+ `.env` file under the following variables:++```+# UPSTASH redis for waiting list+UPSTASH_REDIS_REST_URL="https://•••••••••.upstash.io"+UPSTASH_REDIS_REST_TOKEN="•••••••••"+```++Replace the ellipsis with the actual URL and token of Redis you obtained from+UPSTASH.++## **Setting up Turso (SQLite or Cloud Database)**++The "TURSO SQLITE" section in the `.env` file allows you to configure Turso+database, either a local SQLite database or a cloud-based database.++### If you want to use a local database (optional):++To begin, install sqld with brew. If you don't have brew installed, we recommend+installing it from [brew.sh](https://brew.sh/) which works on macOS or Linux, or+WSL if you are using Windows.++```bash+brew tap libsql/sqld+brew install sqld-beta+```++Next, you can use the following command to start Turso with a SQLite database:++```bash+turso dev --db-file openstatus.db+```++By doing this, you'll be able to work with the local database without modifying+the `.env` file.++### **If you want to use a cloud-based database with Turso**++To use a cloud-based database with Turso, follow these steps:++1. Log in to your Turso account at [https://turso.tech/](https://turso.tech/) or+ create a new account if you don't have one yet.++2. If this is your first time using Turso, it may prompt you to install the+ client on your machine. Follow the steps provided on their website or refer+ to their documentation+ [https://docs.turso.tech/tutorials/get-started-turso-cli/step-01-installation](https://docs.turso.tech/tutorials/get-started-turso-cli/step-01-installation)+ for client installation.++3. Once you have successfully installed the Turso client, open your terminal and+ use the following command to authenticate:++```+turso auth login+```++4. Then, create a new database with the following command:++```+turso db create+```++Wait for a moment until the database is created, and you will be shown+information about the database, including a connection URL and an authentication+token.++5. Use the following commands to show the required information and create the+ database in the `.env` file:++```+turso db show db-name+turso db tokens create db-name+```++Replace "db-name" with the name of your database. You should get the generated+URL and token, which should be placed in the `.env` file as follows (real values+without censorship):++```+# TURSO SQLITE+DATABASE_URL=libsql://my-database-example.turso.io+DATABASE_AUTH_TOKEN=ey••••••••••••••••••••••••••••••••+```++Remember to copy this information in both` app/web/.env` and `packages/db/.env`+and save the changes to the `.env` file once you have completed all the+configurations.++## **Conclusion**++Once you have collected all the necessary information, you should save it in the+`.env` file to ensure proper configuration for your application. Following these+steps will enable your application to function effectively with the appropriate+settings for each service.diff --git a/apps/docs/pages/get-started/setup.mdx b/apps/docs/pages/get-started/setup.mdxnew file mode 100644index 000000000..b4cfa04fb--- /dev/null+++ b/apps/docs/pages/get-started/setup.mdx@@ -0,0 +1,60 @@+Follow these steps for setup:++### **Clone the repository**++To get started, clone the OpenStatus repository by running the following command+in your terminal or command prompt:++```bash+git clone https://github.com/openstatusHQ/openstatus.git+```++### **Install dependencies**++Once the repository is cloned, navigate to the `openstatus` directory using the+command:++```bash+cd openstatus+```++Next, use pnpm to install the required dependencies. Execute the following+command:++```bash+pnpm install+```++### **Configure .env files**++To configure the application, you need to set certain environment variables in a+`.env` file. You will find an example file named `.env.example` in the+`apps/web` and `packages/db` directories. Copy this file and rename it to+`.env`. Then, edit the `.env` file with specific values required for your+configuration.++You can use any text editor, or manually copy it into an empty .env file or+whatever you want to do.++For example, you can use a text editor (nano) to open the `.env` file:++```bash+# apps/web+cp apps/web/.env.example apps/web/.env+nano apps/web/.env++# packages/db+cp packages/db/.env.example packages/db/.env+nano packages/db/.env+```++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+shared publicly as it may contain sensitive information such as passwords or+access keys.++Once you have completed these steps, you will have finished the setup and+configuration of OpenStatus, and you'll be ready to start the application.