Skip to content

Commit

Permalink
docs: update Quivr doc (#1531)
Browse files Browse the repository at this point in the history
Issue: #1526
  • Loading branch information
mamadoudicko authored Oct 31, 2023
1 parent 91a3faf commit be87177
Show file tree
Hide file tree
Showing 34 changed files with 365 additions and 376 deletions.
8 changes: 0 additions & 8 deletions docs/docs/Developers/backend/_category_.json

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/Developers/backend/api/_category_.json

This file was deleted.

9 changes: 0 additions & 9 deletions docs/docs/Developers/backend/brains/_category_.json

This file was deleted.

39 changes: 0 additions & 39 deletions docs/docs/Developers/backend/brains/brains.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/docs/Developers/contribution/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "⌨️ Contribute to Quivr",
"position": 1,
"link": {
"type": "generated-index",
"description": "Want to contribute to Quivr? Here's how to get started."
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
title: Architecture
sidebar_position: 3
title: 🏛️ Architecture
---

Quivr is using FastAPI to provide a RESTful API for the backend. The API is currently in beta and is subject to change. The API is available at [https://api.quivr.app](https://api.quivr.app).
Expand All @@ -11,14 +11,12 @@ You can find the Swagger documentation for the API at [https://api.quivr.app/doc

This documentation outlines the key points and usage instructions for interacting with the API backend. Please follow the guidelines below to use the backend services effectively.


## FastAPI

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. FastAPI is a class-based API framework that is built on top of Starlette and Pydantic. FastAPI is a great choice for building APIs because it is easy to use, fast, and has a lot of great features.

We decided to choose FastAPI because it is a modern, fast, and easy-to-use API framework. FastAPI is also very well documented and has a lot of great features that make it easy to build APIs. FastAPI is also very well supported by the community and has a lot of great features that make it easy to build APIs.


## Authentication

The API uses API keys for authentication. You can generate an API key by signing in to the frontend application and navigating to the `/config` page. The API key will be required to authenticate your requests to the backend.
Expand All @@ -31,5 +29,4 @@ Authorization: Bearer {api_key}

Replace `{api_key}` with the generated API key obtained from the frontend

You can find more information in the [Authentication](/docs/Developers/backend/api/getting_started) section of the documentation.

You can find more information in the [Authentication](/docs/Developers/useQuivr/get_your_api_key) section of the documentation.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Chains",
"position": 4,
"label": "⛓️ Chains",
"position": 5,
"link": {
"type": "generated-index",
"description": "What are chains?"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Frontend",
"position": 2,
"label": "💻 Frontend",
"position": 4,
"link": {
"type": "generated-index"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
sidebar_position: 4
title: 🆘 Contributing
sidebar_position: 1
title: 🆘 Guidelines
---

# Contributing to Quivr

Thanks for your interest in contributing to Quivr! Here you'll find guidelines for contributing and steps on how you can contribute.

### Repo: [Quivr Github](https://github.com/stanGirard/quivr)

## Table of Contents

- [Contributing to Quivr](#contributing-to-quivr)
Expand Down
97 changes: 97 additions & 0 deletions docs/docs/Developers/contribution/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
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:

- Docker
- Docker Compose
- A Supabase account with:
- A new Supabase project
- Supabase Project API key
- Supabase Project URL

## Installation Steps 💽

Follow these steps to install and set up the Quivr project:

### Step 0: Installation Video (Optional)

If needed, you can watch the installation process on YouTube [here](https://www.youtube.com/watch?v=rC-s4QdfY80&feature=youtu.be).

### Step 1: Clone the Repository

Use one of the following commands to clone the Quivr repository:

- If you don't have an SSH key set up:

```
git clone https://github.com/StanGirard/Quivr.git
cd Quivr
```

- If you have an SSH key set up or want to add it (guide [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)):

```
git clone git@github.com:StanGirard/Quivr.git
cd Quivr
```

### Step 2: Use the Install Helper Script

Run the install_helper.sh script to automate the setup process. This script will help you set up your environment files and execute the necessary migrations. Ensure you have the following prerequisites installed:

```bash
brew install gum # Windows (via Scoop) scoop install charm-gum
brew install postgresql # Windows (via Scoop) scoop install postgresql
```

```bash
chmod +x install_helper.sh
./install_helper.sh
```

If you prefer manual setup, you can follow the steps below.

### Step 2 - Additional Configuration: Copy Environment Files

Copy the environment files as follows:

- Copy .backend_env.example to backend/.env
- Copy .frontend_env.example to frontend/.env

### Step 3: Update Environment Variables

Edit the backend/.env and frontend/.env files with the following information:

- `supabase_service_key`: Found in your Supabase dashboard under Project Settings -> API (Use the anon public key from the Project API keys section).
- `JWT_SECRET_KEY`: Found in your Supabase settings under Project Settings -> API -> JWT Settings -> JWT Secret.
- `NEXT_PUBLIC_BACKEND_URL`: Set to localhost:5050 for Docker. Update if your backend is running on a different machine.

### Step 4: Run Migration Scripts

Run the migration.sh script to execute the migration scripts. You have two options:

- `Create all tables`: For the first-time setup.
- `Run migrations`: When updating your database.

You can also run the script on the Supabase database via the web interface (SQL Editor -> New query -> paste the script -> Run). All migration scripts can be found in the scripts folder.

If you're migrating from an old version of Quivr, run the scripts in the migration script to update your data in chronological order.

### Step 5: Launch the Application

Run the following command to launch the application:

```
docker compose -f docker-compose.dev.yml up --build
```

### Step 6: Navigate to localhost:3000 in your browser

Open your web browser and navigate to [localhost:3000](http://localhost:3000).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "LLM",
"position": 3,
"position": 6,
"link": {
"type": "generated-index",
"description": "How does the LLM (Large Language Model Work)?"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
title: Testing Strategies
sidebar_position: 7
title: 🧪 Testing Strategies
---

## Backend
Expand Down
Loading

0 comments on commit be87177

Please sign in to comment.