If you want to run the Xyne application in dev mode, this guide will help you do so

Deployment of Xyne on Local Machine requires the following dependencies to be installed:


Set-Up Xyne Locally in Dev Mode

To Set-Up Xyne, follow the steps listed below :

Clone the Xyne Repository :

Run the following command to clone the repository :

git clone https://github.com/xynehq/xyne.git

Setup Environment variables:

The application is dependent on some environment variables that you will need to set up.

Inside the server folder, create a .env.development file using :

touch .env.development

In the .env.development file, you can paste the following :

.env.development file
ENCRYPTION_KEY=<YOUR_ENCRYPTION_KEY>
# If you wish to execute authorization using Service Account then use :
 SERVICE_ACCOUNT_ENCRYPTION_KEY=<YOUR_SERVICE_ACCOUNT_ENCRYPTION_KEY> 


GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
GOOGLE_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET>
GOOGLE_REDIRECT_URI=http://localhost:3000/v1/auth/callback

HOST=http://localhost:3000

JWT_SECRET=<YOUR_JWT_SECRET>

DATABASE_HOST=xyne-db
VESPA_HOST=vespa


## If using AWS Bedrock
AWS_ACCESS_KEY=<YOUR_AWS_ACCESS_KEY>
AWS_SECRET_KEY=<YOUR_AWS_ACCESS_SECRET>
AWS_REGION=<YOUR_AWS_REGION>
  
## OR [ If using Open AI ]
OPENAI_API_KEY=<YOUR_OPEN_API_KEY>

## OR [ If using Ollama ] 
OLLAMA_MODEL=<YOUR_OLLAMA_MODEL_NAME> 

## OR  [ If using Together AI ] 
TOGETHER_API_KEY=<YOUR_TOGETHER_API_KEY>
TOGETHER_MODEL=<YOUR_TOGETHER_MODEL>
TOGETHER_FAST_MODEL=<YOUR_TOGETHER_FAST_MODEL>

## OR  [ If using Fireworks AI ] 
FIREWORKS_API_KEY=<YOUR_FIREWORKS_API_KEY>
FIREWORKS_MODEL=<YOUR_FIREWORKS_MODEL>
FIREWORKS_FAST_MODEL=<YOUR_FIREWORKS_FAST_MODEL>

Set up Docker

Set up docker by running the follow command :

docker-compose -f deployment/docker-compose.dev.yml up

Running this command will host vespa and postgres containers inside your docker.

Set permission to run the init-script

We first need to set the executable permission to run the init-script, for that, run the following command :

sudo chmod +x init-script.sh [ For Mac OS and Unix ]

OR 

icacls init-script.sh /grant Everyone:F [If using PowerShell in Windows]


Run the init-script to initialize the application

Navigate to the server folder using cd server and run the following commands :

./init-script.sh

This will initialize all the dependencies required by the server to run the application successfully, and will also start the server, which will be listening on port 3000.

Start the Xyne client

To start the client side, navigate to the frontend folder :

Client side .env

Create a new .env in the frontend folder, use the following command :

touch .env

Now paste the following inside the .env file :

 VITE_API_BASE_URL=http://localhost:3000
 VITE_WS_BASE_URL=ws://localhost:3000

Save the file.

bun install

This installs all dependencies required by the client side to run.

Then start the client using the command :

bun run dev

The app will now be available in port 5173. Go to xyne

In case of any required support, feel free to Contact Us