Before you begin, ensure you have the following installed on your machine:
- Node.js - v18
-
For Windows users, you can download the installer from the official Node.js website.
-
For Linux users, you can use the following commands to install Node.js:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install software-properties-common
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install nodejs
- For macOS users, you can use Homebrew to install Node.js by running the following command in your terminal:
brew install node@18
- Yarn - v1.22.19
- Install Yarn using npm:
npm install -g [email protected]
- Navigate into the project directory:
cd cognita/frontend
- Install dependencies using Yarn:
yarn install
- Copy the .env.example file and create a new .env file:
cp .env.example .env
- Open the .env file and customize the environment variables as needed.
Sample .env file:
VITE_QA_FOUNDRY_URL=http://localhost:8000
VITE_DOCS_QA_DELETE_COLLECTIONS=true
VITE_DOCS_QA_STANDALONE_PATH=/
VITE_DOCS_QA_ENABLE_REDIRECT=false
VITE_DOCS_QA_MAX_UPLOAD_SIZE_MB=200
To run the app locally, execute the following command:
yarn dev
This will start the development server. Open http://localhost:5001 to view it in your browser.
To build the app for production, run:
yarn build:prod
- URL : http://localhost:5001/
- Description : In this page, users can ask questions and search for the answers by selecting any collection from left panel.
- URL : http://localhost:5001/collections
- Description : This page lists all the collections available in the website. The collections can be configured from this route.
- URL : http://localhost:5001/data-sources
- Description : This page lists all the data sources available in the website. Also users would be able to add new data source in this page.