This document has information specific to the NJ-specific fork of the Microsfot open source OpenAI chat app.
- This full-stack application uses a Python web server, React frontend, and is deployed on Azure App Service
- This code is deployed to a production stage (
nj-stable
branch) and dev stage (nj-stable-dev
branch) - Note that certain features from the open-source parent are not enabled, such as chat history (anything related to
CosmosDB
)
- Clone repo and go to
nj-stable
branch - Copy
.env
file from Bitwarden (reach out to Platform team for access) - Run
./start.sh
- Log into Azure and go to the
nj-aichat-internal
App Service (reach out to Platform team for access) - [If dev stage] In the left menu, click Deployments > Deployment slots. Click on
nj-aichat-internal-dev
. - In the left menu, click Deployments > Deployment Center.
- In the top bar, click the "Sync" button to sync the deployed application with the latest commit on the corresponding branch.
- Under the top bar, click the "Logs" tab to see the deployment status (it will change to "Success" when completed)
The nj-stable
branch is deployed to our actual chat application, and we should pull in changes from the microsoft upstream when they come in. Here is how to do so:
- On the
main
branch, you should see a button to "Sync fork". Open that dropdown and click the "Update" button if themain
branch is behind the upstream. This automatically pulls new commits from microsoft into ourmain
branch. - Locally, in the repo folder, check into the
main
branch, and rungit pull
to pull those updates into your local repo. git checkout nj-stable
to switch to ournj-stable
branch- Run
git pull --rebase origin main
to rebase our NJ-specific changes on top of the latest upstream work. Fix merge conflicts as needed. - Run
git push -f
to force push this rebase onto the remote repo. There should not be any commits as part of this push. - You should see that the
nj-stable
branch is no longer behind themain
branch, and only ahead by the commits the NJ team has made.
- Clone the repo and check out the
nj-stable
branch or any branch created from it. - In the root directory of the repo, create a new
.env
file. Update this file with the values found in Bitwarden. - From the root directory of the repo, run the ./start.sh command
Navigate into the frontend
directory. cd frontend
To run tests for the backend run the command npm run test:api
To run tests for the frontend run the command npm run test:react