Skip to content
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

feat(docs): Added Update for documentation #329

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/apikeys/apikeys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ 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>

### Together AI
- Create your API key in [Together AI](https://www.together.ai/)
Expand Down
82 changes: 63 additions & 19 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: [email protected])

<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: [email protected])
- 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: [email protected])
- Under ```Contact Information``` give the developer email. (For ex: [email protected])
<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 @@ -70,4 +91,27 @@ Now, under APIs and Services section in the menu on the sidebar, click on ```Cre
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: [email protected])
- 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: [email protected])

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
7 changes: 1 addition & 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
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.
33 changes: 33 additions & 0 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 Down
8 changes: 4 additions & 4 deletions docs/re-ingest/reingest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ OR [If you face issues with the truncation]

- Oauth Providers
```javascript
delete from table oauth_providers where id=;
delete from oauth_providers where id=;
```
- Connectors
```javascript
delete from table connectors where id= ;
delete from connectors where id= ;
```
- Sync Jobs
```javascript
delete from table sync_jobs where id= ;
delete from sync_jobs where id= ;
```
and

- Sync History
```javascript
delete from table sync_history where id= ;
delete from sync_history where id= ;
```


Expand Down