How to setup the local Enviroment


Local Setup Mac M1

ℹ️ This setup was done on a 13” MacBook Pro with an M1 and 32Gb of RAM and this works pretty well for now!

Install brew

execute the following commands:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> $HOME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"

follow the instructions.

Github SSH Setup

✅ Recommendation: Create a Github account using your professional email

Step 1: Create the SSH key pair values

Create an SSH Key pair (private / public) using the following command ( ⚠️ replace the name@example.com with your own email.

ssh-keygen -t ed25519 -C "name@domain.com"

Make sure to add a passphrase to the SSH key and add it to your keychain. (

Step 2: Copy the public key value and add it to your Github account

  • Use the following command to copy the content of the ed25519.pub file on the clipboard:

pbcopy < ~/.ssh/id_ed25519.pub

Step 3: Local configuration

  • Now open the config file in the .ssh folder, you can use the command open ~/.ssh/config to open it in an editor or vim ~/.ssh/config if you want to edit within your terminal, then add the following lines (if not already done):

  • Run the following line: ssh-add --apple-use-keychain ~/.ssh/id_ed25519

  • Finally, run the following command:

Docker Setup

Install Docker

Install docker using the following link: Mac and make sure to use the right architecture (Apple Silicon or Intel chips). You can check it out by clicking on the Apple menu at the top left corner and then selecting “About This Mac”:

image-20240521-124923.png

 

Install Visual Studio Code

Download Visual Studio Code from the following link: https://code.visualstudio.com/Download

Then run the following command to add the code command on PATH:

export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin”

 

Clone the monorepo

Execute the following command to clone the monorepo into the folder that you want:

Get the EnvFiles

From one of the Developers you need to get the EnvFile.zip this can be produced by the developer like this:

The file that is produced must be copied into your root folder of monorepo

envFiles.zip

Setup your local environment

Go into your VS code and open the monorepo folder that you checked out.

  1. Execute the following command in the monorepo root:

then close the shell and open a new one.:

  1. Execute the following command:

    you see the following when you execute the where commands

    close the shell and open a new one

  2. Execute the following command in the monorepo root:

the last thing you should see is how the env variables were copied.

  1. execute the following command then:

Run the full local setup like this

now it should start and all here:

Screenshot 2024-06-06 at 17.43.44.png

there should now not be any errors in these consoles, make sure you click through all of the windows below.

Login to the UI

Now everything should be set up and you can log in to the application. Navigate to http://localhost:3004/chat and log in with the developer user (already created in Zitadel):

  • Username: root@unique-iam.localhost

  • Password: RootPassword1!

You should be able to log in and use the Unique FinanceGPT chat solution.

The same user can be used to log in to Zitadel using http://localhost:9123.

The FinanceGPT repository install (Optional)

Run the following command sequentially to install the financegpt-modules repository

Once everything is all up and running, you can start the flask app from the financegpt-modules using this command: poetry run flask run --port 5001--debug

TablePlus Setup (Optional)

Add the following database in Tableplus:

  • unique-ingestion-development

  • unique-chat-dev

  • unique-scope-management

  • unique-app-repository

To add a database, do the following steps:

  1. Create a new connection and select Postgres

  2. Fill in the following fields, they are all the same except for the Name and Database fields

Build your first Application (Optional):

 

 

Deploy hosted Modules (Optional):

Here is a tutorial for that: Deployment of Hosted SDK Module



Postman Setup

  • Install the Postman app using the following command: brew install --cask postman

  • In the Postman app, click on “Create account” and sign in once done.

  • Once connected, create a Unique workspace and then import the following files) (2 collections and 1 environment):

Example Environment.postman_environment.json

assistants & modules.postman_collection.json

app-repository.postman_collection.json

 


Author

@Andreas Hauri

 

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service