Skip to content

feat(docs): Added Update for documentation #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 15, 2025
16 changes: 13 additions & 3 deletions docs/apikeys/apikeys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: 'key'

This guide providers more details about creating and setting AI api keys in your .env file for using Xyne's chat feature.

To use **AI chat**, you need to configure access credentials. You can use one of the following providers: ***AWS, OpenAI, Ollama, Together AI or Fireworks AI***.
To use **AI chat**, you need to configure access credentials. You can use one of the following providers: ***AWS, OpenAI, Ollama, Gemini, Together AI or Fireworks AI***.

### AWS (Amazon Bedrock)

Expand All @@ -33,6 +33,16 @@ To use **AI chat**, you need to configure access credentials. You can use one of
OLLAMA_MODEL=<YOUR_OLLAMA_MODEL_NAME>
```
<Tip> If you're using Ollama, ensure the specified model is downloaded locally. </Tip>
<Tip> Also ensure that your downloaded ollama model is working in the host machine, you can use ```ollama run your_model_name your_message```. This should return an output confirming ollama is working.</Tip>

<Warning> For ```quickstart``` mode ensure Ollama is listening from all addresses, so that docker is able to reach it. </Warning>

### Google AI
- Generate your API key from [Google AI Studio](https://aistudio.google.com/app/apikey)
- Add them as environment variables in your ```.env.default``` file:
```javascript .env.default
GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
GEMINI_MODEL=<YOUR_GEMINI_MODEL_NAME>

Comment on lines +40 to 46
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent Provider Naming in "Google AI" Section:
The section header is labeled “Google AI,” yet the instructions and code snippet reference GEMINI_API_KEY and GEMINI_MODEL. Please verify whether this section is intended for Google AI or if it should be renamed to “Gemini” to ensure consistency in the documentation.

### Together AI
- Create your API key in [Together AI](https://www.together.ai/)
Expand Down Expand Up @@ -94,6 +104,6 @@ FAST_MODEL_REASONING=false
### Key Selection Order :
If multiple keys are set in the environment variable, our system follows this precedence:
```javascript
AWS → OpenAI → Ollama → Together AI → Fireworks AI
AWS → OpenAI → Ollama → Together AI → Fireworks AI → Gemini
```
<Tip>Only anyone provider is required to get started. This means either AWS or OpenAI, Ollama, Together AI or Fireworks AI can be used, all of them aren't required.</Tip>
<Tip>Only a single provider is required to get started. This means either AWS or OpenAI, Ollama, Gemini, Together AI or Fireworks AI can be used, all of them aren't required.</Tip>
84 changes: 64 additions & 20 deletions docs/authentication/get-credentials.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,64 @@ Switch to the new project you just created.
<Tip> For a completely new project you will need to setup the consent screen before setting the credentials.</Tip>

First step after creating the project is to setup the OAuth Consent Screen.
For this navigate to the OAuth Consent Screen in the Sidebar of your Google Cloud Console :
- For this navigate to the OAuth Consent Screen in the Sidebar of your Google Cloud Console :

<img height="200" src="../images/oauth-2.png" />

Under ```OAuth Consent``` screen select ```Internal``` :
- Under the Oauth Overview screen, click on ```Get Started``` button.
<img height="200" src="../images/gtstrtd.png" />

- Under the ```App Information``` Section, fill out the details :
- Provide a Name for the app (For ex: Xyne)
- Provide a User Support email (For ex: your-email@gmail.com)

<img height="200" src="../images/appinfo.png" />

- Click on ```NEXT```.

- Under ```Audience``` section select ```Internal``` :
<img height="200" src="../images/oauth-int.png" />
<Tip> If you're using personal email, you can choose ```External```.</Tip>

Click on ```Create```
- Click on ```NEXT```.

Under the ```App Information``` Section, fill out the details :
- Provide a Name for the app (For ex: Xyne)
- Provide a User Support email (For ex: your-email@gmail.com)
- Upload an App Logo (if needed)
- Put your domain under ```Authorized``` domain (You can choose to go ahead with your localhost or AWS IP Address)
- Add Developer contact information (For ex: your-email@gmail.com)
- Under ```Contact Information``` give the developer email. (For ex: your-contact@gmail.com)
<img height="200" src="../images/oauth-email.png" />
- Click on ```NEXT```.

Click ```Save and Continue```
- Under the ```Finish``` section click on the checkbox to accept Google's User Data Policy.
<img height="200" src="../images/oauth-acpt-dtp.png" />
- Click on ```CONTINUE```.

Under the ```Scopes``` section you'll see the ```Add or Remove Scopes``` button. Click on that:
- Click on ```CREATE```.

<Tip>If you had previously chosen ```External``` in your ```Audience``` section, you can now navigate to ```Audience``` section again in the side menu and add your allowed external users in the ```Test Users``` section. </Tip>

#### Setting Scopes :
- Now navigate to the ```Data Access``` section on the left-side menu.
<img height="200" src="../images/dtacc.png" />
- Under the ```Scopes``` section you'll see the ```Add or Remove Scopes``` button. Click on that:
<img height="200" src="../images/oauth-scopes.png" />
For now in the scope section only add ```/auth/userinfo.email```,```/auth/userinfo.profile``` and ```openid```, leave out the rest of it.
<Tip> If you're going for OAuth Authentication you can set all the scopes using this part of the [OAuth Authentication Guide](https://docs.xynehq.com/authentication/oauth#adding-the-scopes-for-the-enabled-apis).
If not you can add the scopes mentioned below. </Tip>
- For now in the scope section only add ```/auth/userinfo.email```,```/auth/userinfo.profile``` and ```openid```, leave out the rest of it.

<img height="200" src="../images/initial-scope.png" />

- Click on ```Save```.

Leave the next page ,i.e. ```Test users``` blank.
This concludes the setting-up of your OAuth Consent Screen


## Setting up the OAuth Credentials
Now, under APIs and Services section in the menu on the sidebar, click on ```Credentials```,
- Now, under ```Clients``` section in the menu on the sidebar,

<img height="200" src="../images/clients.png" />

<img height="200" src="../images/oauth-4.png" />
- Navigate to the Credentials Section in the sidebar, and click on ```+CREATE CREDENTIALS ```.
- Click on ```+CREATE CLIENT```,

- Under that select the ```OAuth client ID``` option.
<img height="200" src="../images/oauth-5.png" />
- Under that you will see ```Create OAuth client ID``` option.
<img height="200" src="../images/cocid.png" />

- Add the type as ```Web Application```, and give it a name (For ex: Xyne)
<img height="200" src="../images/oauth-6.png" />
Expand All @@ -65,9 +86,32 @@ Now, under APIs and Services section in the menu on the sidebar, click on ```Cre
- ```http://localhost:3001/v1/auth/callback``` for local setup or ```https://<YOUR_AWS_EC2_IPv4_DNS>/v1/auth/callback``` for production.
- ```http://localhost:3001/oauth/callback``` for local setup or ```https://<YOUR_AWS_EC2_IPv4_DNS>/oauth/callback``` for production.

<Note> Use ```http://localhost:3000/v1/auth/callback``` and ```http://localhost:3000/oauth/callback``` when using dev-mode.</Note>
<Note> Use ```http://localhost:3000``` as authorized Javascript Origins. Use ```http://localhost:3000/v1/auth/callback``` and ```http://localhost:3000/oauth/callback``` when using dev-mode.</Note>

Click ```CREATE``` and make sure to save the Client ID and Client Secret for putting it in the [```.env``` of the application](https://docs.xynehq.com/quickstart#setting-the-environment-variables)


<Tip> With this you will now be able to successfully login to Xyne with your google account.</Tip>
<Tip> With this you will now be able to successfully login to Xyne with your google account.</Tip>


You can use the following Guides to add your scopes for your project:

<CardGroup>

<Card
title="Oauth Authentication"
icon="lock"
href="/authentication/oauth"
>
Authenticate with Oauth Account.
</Card>

<Card
title="Service Account Authentication"
icon="gear-code"
href="/authentication/service-accounts"
>
Authenticate with Service Account.
</Card>

</CardGroup>
66 changes: 30 additions & 36 deletions docs/authentication/oauth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,47 +48,41 @@ Following the same steps above, enable the following APIs :
<Warning> Please make sure to **enable all** the APIs listed above to ensure the Xyne app runs smoothly. </Warning>

## Adding the scopes for the Enabled APIs:
Navigate to the OAuth Consent Screen you configured, and click on the ```Edit App``` button :
<img height="200" src="../images/edit-oapp.png" />
Skip the form to the OAuth consent screen by clicking on ```SAVE AND CONTINUE``` at the bottom of the page.

In the next page, under the Scopes section you will find the ```ADD OR REMOVE SCOPES``` button. Click on that :

<img height="200" src="../images/oauth-scopes.png" />

You will see the scopes on the right side like this :
<img height="200" src="../images/oauth-scopes-add.png" />

Along with the scopes you had added before, add the rest of scopes for the enabled apis :

Ensure to select the checkbox for all of these scopes [you can use these values in the searchbox for the scopes table] :
- ```/auth/drive.readonly```
- ```/auth/documents.readonly```
- ```/auth/spreadsheets.readonly```
- ```/auth/presentations.readonly```
- ```/auth/contacts.readonly```
- ```/auth/contacts.other.readonly```
- ```/auth/gmail.readonly```
- ```/auth/calendar.events.readonly```

You can also choose to ```manually``` add the scopes in the ```box``` below.

```javascript
https://www.googleapis.com/auth/drive.readonly,
https://www.googleapis.com/auth/documents.readonly,
https://www.googleapis.com/auth/spreadsheets.readonly,
https://www.googleapis.com/auth/presentations.readonly,
https://www.googleapis.com/auth/contacts.readonly,
https://www.googleapis.com/auth/contacts.other.readonly,
https://www.googleapis.com/auth/gmail.readonly,
https://www.googleapis.com/auth/calendar.events.readonly,
```
- From the menu on the left-side, navigate to ```Google Auth Platform```. And under that, navigate to ```Data Access``` section.

<img height="200" src="../images/gapdacc.png" />
- Along with the scopes you had added before, add the rest of scopes for the enabled apis, using the ```ADD OR REMOVE SCOPES``` button.

<img height="200" src="../images/daccaors.png" />

- Ensure to select the checkbox for all of these scopes [you can use these values in the searchbox for the scopes table] :
- ```/auth/drive.readonly```
- ```/auth/documents.readonly```
- ```/auth/spreadsheets.readonly```
- ```/auth/presentations.readonly```
- ```/auth/contacts.readonly```
- ```/auth/contacts.other.readonly```
- ```/auth/gmail.readonly```
- ```/auth/calendar.events.readonly```

You can also choose to ```manually``` add the scopes in the ```box``` below.

```javascript
https://www.googleapis.com/auth/drive.readonly,
https://www.googleapis.com/auth/documents.readonly,
https://www.googleapis.com/auth/spreadsheets.readonly,
https://www.googleapis.com/auth/presentations.readonly,
https://www.googleapis.com/auth/contacts.readonly,
https://www.googleapis.com/auth/contacts.other.readonly,
https://www.googleapis.com/auth/gmail.readonly,
https://www.googleapis.com/auth/calendar.events.readonly,
```

Click on ```ADD TO TABLE```, and then ```UPDATE```. You will now be able to see all the added scopes in the tables below:

<img height="200" src="../images/scopes-table.png" />

Then click on ```SAVE AND CONTINUE```, and then in the next page scroll to the bottom and click on the ```BACK TO DASHBOARD``` .
Then click on ```SAVE``` .

This concludes the set-up process of Google OAuth.

Expand Down
33 changes: 3 additions & 30 deletions docs/authentication/service-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ Once you've filled out the details, click on `CREATE AND CONTINUE`

- Click on ```Done```

- Once the service account has been created, you'll be able to see it under the ```Service Accounts``` table in the ```Service Account``` section.
- Once the service account has been created, you'll be navigated to the service account details page where you can now configure your key..

- In the ```Service Account``` table where you can see your newly created service account, you will find an ```Actions``` column.
<img height="200" src="../images/actions-srv-acc.png" />
- Click on the three dots in the ```Actions``` column, and click in ```Manage Keys```.
<img height="200" src="../images/srv-acc-mng-k.png" />
- In the ```Service Account``` section where you can see your newly created service account, you will find a ```KEYS``` tab.
<img height="200" src="../images/sacdet.png" />
- In there navigate to the ```keys``` tab.
- Click on ```ADD KEY```, followed by clicking on ```Create New Key```
<img height="200" src="../images/serv-acc4.png" />
Expand Down Expand Up @@ -80,31 +78,6 @@ Following the same steps above, enable the following APIs :

<Warning> Please make sure to **enable all** the APIs listed above to ensure the Xyne app runs smoothly. </Warning>

## Setting up the OAuth Consent Screen
Once you've enabled the APIs, you'll also need to add the scopes for these APIs. For our app we only require ```readonly``` scopes for all the APIs.
For this navigate to the OAuth Consent Screen in the Sidebar of your Google Cloud Console :
<img height="200" src="../images/oauth-2.png" />

Under ```OAuth Consent``` screen select ```Internal``` :
<img height="200" src="../images/oauth-int.png" />

Click on ```Create```

Under the ```App Information``` Section, fill out the details :
- Provide a Name for the app (For ex: Xyne)
- Provide a User Support email (For ex: your-email@gmail.com)
- Upload an App Logo (if needed)
- Put your domain under ```Authorized``` domain (You can choose to go ahead with your localhost or AWS IP Address)
- Add Developer contact information (For ex: your-email@gmail.com)

Click ```Save and Continue```

Click on ```Save and Continue``` again.

Leave the next page ,i.e. ```Test users``` blank.
This concludes the setting-up of your OAuth Consent Screen for service account.


## Setting up Delegation

- Now that all of this is done, the ```Workspace Admin``` needs to do some delegations, navigate to [Domain Wide Delegation](https://admin.google.com/ac/owl/domainwidedelegation).
Expand Down
4 changes: 4 additions & 0 deletions docs/contribution/devmode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ TOGETHER_FAST_MODEL=<YOUR_TOGETHER_FAST_MODEL>
FIREWORKS_API_KEY=<YOUR_FIREWORKS_API_KEY>
FIREWORKS_MODEL=<YOUR_FIREWORKS_MODEL>
FIREWORKS_FAST_MODEL=<YOUR_FIREWORKS_FAST_MODEL>

## OR [If using Google AI]
GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
GEMINI_MODEL=<YOUR_GEMINI_MODEL_NAME>
```

### Set up Docker
Expand Down
10 changes: 4 additions & 6 deletions docs/deployment/cloud/aws/aws-deployment-with-docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ If you want to deploy Xyne on AWS instead of your local machine, this document w
Follow the steps listed below to get started :

## Connect to the instance remotely:
Once you have your instance up and running, you can use your terminal to connect to your instance remotely.
Use this command to connect to your instance :

```javascript
ssh -i ~/path/to/your-private-key-file.pem ec2-user@public-ipv4-address
```
Once you have your instance up and running, you can use your terminal to connect to (```ssh``` into) your instance remotely.


## Install the required dependencies :
Expand Down Expand Up @@ -100,6 +95,9 @@ FIREWORKS_API_KEY=<YOUR_FIREWORKS_API_KEY>
FIREWORKS_MODEL=<YOUR_FIREWORKS_MODEL>
FIREWORKS_FAST_MODEL=<YOUR_FIREWORKS_FAST_MODEL>

## OR [If using Google AI]
GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
GEMINI_MODEL=<YOUR_GEMINI_MODEL_NAME>

HOST=<YOUR_Public_IPv4_DNS_ADDRESS>
```
Expand Down
Binary file added docs/images/appinfo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/clients.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cocid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/daccaors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/dtacc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gapdacc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gtstrtd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/oauth-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/oauth-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/oauth-acpt-dtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/oauth-email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/oauth-int.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/sacdet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/serv-acc6.png
Binary file not shown.
40 changes: 38 additions & 2 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@ description: 'Get started with Xyne Locally'
icon: 'rocket'
---

### Guides :
<CardGroup>
<Card
title="Step 1 : Quickstart the application."
icon="rocket"
href="/quickstart"
>
Use quickstart to reach the login screen.
</Card>
<Card
title="Step 2 : Generate Google Credentials And Add Scopes."
icon="lock-open"
href="/authentication/get-credentials"
>
Set-up your google credentials and add scopes.
</Card>
<Card
title="Step 3 : Add AI provider"
icon="comment-code"
href="/apikeys/apikeys"
>
Add AI Provider of your choice to use Chat.
</Card>
<Card
title="Step 4 : Ingest Your Data"
icon="rotate"
href="/ingestion/ingestion"
>
Ingest your Data into the Xyne App.
</Card>
</CardGroup>


If you want to deploy Xyne using your local machine, this document will give you a detailed guide to do so.
Follow the steps listed below to get started :
Expand Down Expand Up @@ -40,6 +72,7 @@ And that is all 🎉 ! The app will now be available in port ```3001```. [Go to
<Note> Since the size of the downloading models can be quite large, wait for the application to start running, this can take around 10 - 15 minutes,
depending on your internet connection. </Note>

<Tip> You can also choose to follow the [Step guide](https://docs.xynehq.com/quickstart#guides) mentioned above</Tip>
### Post Execution Setup [Environment Variables]:

To unlock the full potential of the Xyne app, you need to enable Google Authentication. This requires setting up your Google credentials first.
Expand All @@ -61,7 +94,7 @@ Setup your Google Credentials for the application.
</Card>

#### Setting the environment variables:
Inside the ```server``` folder of the ```xyne``` folder, you will find a ```.env.default``` file, this is the .env file that our docker uses.
Inside the ```server``` folder of the ```xyne``` folder, you will find a ```.env.default``` file, this is the environment file that our docker uses.
For the moment you will find some default generated environment variables that we've set up for the app to work.


Expand Down Expand Up @@ -111,6 +144,9 @@ FIREWORKS_API_KEY=<YOUR_FIREWORKS_API_KEY>
FIREWORKS_MODEL=<YOUR_FIREWORKS_MODEL>
FIREWORKS_FAST_MODEL=<YOUR_FIREWORKS_FAST_MODEL>

## OR [If using Google AI]
GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
GEMINI_MODEL=<YOUR_GEMINI_MODEL_NAME>

HOST=http://localhost:3001
```
Expand All @@ -129,7 +165,7 @@ Setup your AI Provider.

<Warning> Chat will be unavailable without a Service Account or OAuth Account connection. </Warning>

And build again from the ``xyne`` folder using :
And build the container again from the ``xyne`` folder using :

```javascript
docker-compose -f deployment/docker-compose.yml up
Expand Down