From 6abba91a8f63b453eb45134da521483e2c81d759 Mon Sep 17 00:00:00 2001 From: Mamadou DICKO <63923024+mamadoudicko@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:41:07 +0100 Subject: [PATCH] docs: add auth modes config (#1595) issue: https://github.com/StanGirard/quivr/issues/1580 Screenshot 2023-11-06 at 15 20 31 --- .../Developers/contribution/_category_.json | 2 +- docs/docs/Developers/contribution/install.md | 2 -- .../Developers/selfHosted/Authentication.md | 23 +++++++++++++++++++ .../Developers/selfHosted/_category_.json | 8 +++++++ .../{ => selfHosted}/run_fully_local.md | 2 +- .../{ => selfHosted}/vps_install.md | 11 ++++++++- 6 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 docs/docs/Developers/selfHosted/Authentication.md create mode 100644 docs/docs/Developers/selfHosted/_category_.json rename docs/docs/Developers/{ => selfHosted}/run_fully_local.md (99%) rename docs/docs/Developers/{ => selfHosted}/vps_install.md (97%) diff --git a/docs/docs/Developers/contribution/_category_.json b/docs/docs/Developers/contribution/_category_.json index 4ce7d5734..dc69acf89 100644 --- a/docs/docs/Developers/contribution/_category_.json +++ b/docs/docs/Developers/contribution/_category_.json @@ -1,5 +1,5 @@ { - "label": "Explanation", + "label": "Contributor Onboarding", "position": 1, "link": { "type": "generated-index", diff --git a/docs/docs/Developers/contribution/install.md b/docs/docs/Developers/contribution/install.md index 84032884f..eaf213a51 100644 --- a/docs/docs/Developers/contribution/install.md +++ b/docs/docs/Developers/contribution/install.md @@ -3,8 +3,6 @@ sidebar_position: 2 title: Install Quivr --- -Sure, here's an improved version of your markdown document: - # Prerequisites 📋 Before you begin, make sure you have the following tools and accounts installed and set up: diff --git a/docs/docs/Developers/selfHosted/Authentication.md b/docs/docs/Developers/selfHosted/Authentication.md new file mode 100644 index 000000000..24ea8937f --- /dev/null +++ b/docs/docs/Developers/selfHosted/Authentication.md @@ -0,0 +1,23 @@ +--- +sidebar_position: 3 +title: Authentication +--- + +# Authentication Methods + +Quivr offers three authentication methods when self-hosting. You can choose which authentication methods you want to offer to your users from these three options: + +1. **Email/Password Authentication** +2. **Google Authentication** +3. **Magic Link Authentication** + +To enable one or more of these methods, you need to configure the following environment variables in your `.env` file: + +```bash +# Authentication Configuration +NEXT_PUBLIC_AUTH_MODES=magic_link,google_sso,password +``` + +Since each of these methods uses Supabase, you should configure your Supabase instance to support the chosen methods. + +Please refer to the [Supabase documentation](https://supabase.com/docs/guides/auth) for more information on how to configure each authentication method. diff --git a/docs/docs/Developers/selfHosted/_category_.json b/docs/docs/Developers/selfHosted/_category_.json new file mode 100644 index 000000000..8ef7f32e7 --- /dev/null +++ b/docs/docs/Developers/selfHosted/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Self host Quivr", + "position": 3, + "link": { + "type": "generated-index", + "description": "How to use Quivr as a Dev ?" + } +} \ No newline at end of file diff --git a/docs/docs/Developers/run_fully_local.md b/docs/docs/Developers/selfHosted/run_fully_local.md similarity index 99% rename from docs/docs/Developers/run_fully_local.md rename to docs/docs/Developers/selfHosted/run_fully_local.md index c6035d2b0..e6d9cd3d1 100644 --- a/docs/docs/Developers/run_fully_local.md +++ b/docs/docs/Developers/selfHosted/run_fully_local.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 2 title: Run Quivr fully locally --- diff --git a/docs/docs/Developers/vps_install.md b/docs/docs/Developers/selfHosted/vps_install.md similarity index 97% rename from docs/docs/Developers/vps_install.md rename to docs/docs/Developers/selfHosted/vps_install.md index 120fb1786..a33cbed92 100644 --- a/docs/docs/Developers/vps_install.md +++ b/docs/docs/Developers/selfHosted/vps_install.md @@ -1,4 +1,5 @@ --- +sidebar_position: 1 title: Install on your Server --- @@ -7,6 +8,7 @@ title: Install on your Server Welcome to the installation guide for Quivr, your go-to open-source project . This tutorial will walk you through the process of setting up Quivr on an Ubuntu 22.04 server with Docker and Traefik, ensuring a secure HTTPS connection for your domains. ## Table of Contents + - [Quivr Installation Guide on Ubuntu 22 Server](#quivr-installation-guide-on-ubuntu-22-server) - [Table of Contents](#table-of-contents) - [Prerequisites](#prerequisites) @@ -19,6 +21,7 @@ Welcome to the installation guide for Quivr, your go-to open-source project . Th - [Additional Information](#additional-information) ## Prerequisites + Before diving into the installation process, please ensure you have the following ready: - An **Ubuntu 22.04 server** with at least **20 GB of free disk space**. @@ -33,6 +36,7 @@ Before diving into the installation process, please ensure you have the followin ## Step-by-Step Installation ### Step 1: Clone Quivr Repository + Let's get started by cloning the Quivr repository onto your server. Open your terminal and run: ```bash @@ -41,6 +45,7 @@ cd quivr ``` ### Step 2: Create `.env` File + Now, let's set up your environment variables. In the root directory of the Quivr project, create a `.env` file: ```bash @@ -54,14 +59,17 @@ EMAIL=your-email@example.com DOMAIN_NAME=yourdomain.com API_DOMAIN_NAME=api.yourdomain.com ``` + note: in this file if you used a subdomain, DOMAIN_NAME would be `bot.` and API_DOMAIN_NAME would be `api.` Don't forget to save your changes (`Ctrl+X`, then `Y`, and `Enter`). ### Step 3: Configure `.env` Files for Backend and Frontend + Next, configure the `backend/.env` and `frontend/.env` files as per the Quivr documentation. You'll fill in various settings specific to your setup. ### Step 4: Launch Quivr with Docker Compose + With your `.env` files ready, it's time to start up Quivr using Docker Compose. This step is exciting because it's when things come to life! ```bash @@ -71,9 +79,10 @@ docker-compose -f docker-compose.local.yml up The `docker-compose.local.yml` file includes **Traefik**, which automagically handles HTTPS certificates for you. ### Step 5: Verify Installation + Once everything is up and running, give yourself a pat on the back and verify that the services are accessible: -- Visit `https://yourdomain.com` or `https://bot.yourdomain.com` +- Visit `https://yourdomain.com` or `https://bot.yourdomain.com` - And `https://api.yourdomain.com` You should be greeted by your new Quivr setup, all shiny and secure!