Obviously, that uses Azure infrastructure. You will need to create following resources (please, follow the sequence):
- Azure OpenAI:
- Please, create chat completion deployment.
GPT-4o
is used in this case, but feel free to experiment with others.
- Please, create chat completion deployment.
- Azure Log Analytics:
- Please, create Azure Log Analytics resource. Hint: after next steps, data will arrive into tables created under this resource. By default, data retention is set to 30 days, but you can easily modify it per table.
- Azure Communication Services - Email:
- Please, create and setup email functionality with Azure Communication Services. This link can be a good start. Important: once setup, you need to have at least 3 following resources:
- Communication Service - your main Azure Communication Services resource
- Email Communication Service - ACS Email resource
- Email Communication Services Domain - Resource holding link between ACS Email resource and domain to be used for email sending
- Go to
Diagnostic settings
and click onAdd diagnostic settings
. Either checkallLogs
or select all email-related ones:Email Service Send Mail Logs
,Email Service Delivery Status Update Logs
,Email Service User Engagement Logs
. InDestination details
clickSend to Log Analytics workspace
and select your freshly createdLog Analytics
resource. - Verify using
Email -> Try Email
that messages can be sent. Got toMonitoring -> Logs
and try some email-related queries. Please, keep in mind that logs might arrive with 5 minute delay.
- Please, create and setup email functionality with Azure Communication Services. This link can be a good start. Important: once setup, you need to have at least 3 following resources:
- Microsoft Entra ID and App Identity:
- Search for a following resource:
Microsoft Entra ID
. - In this resource, go to
Manage -> App registrations
and click onNew registration
. Give it a name and leave all settings by default. - Click on newly created registration, go to
Manage -> API permissions
and selectAdd a permission
. Go toAPIs my organization uses
and search forLog Analytics API
. ThenDelegated permissions
. SelectData.Read
checkbox and thenAdd permissions
. Validate that your newly created app has this permission as described here. - Go to
Certificates & secrets
and click onNew client secret
. Give it description and save value of secret generated.
- Search for a following resource:
If you want to test it, you need two things:
- Install docker
- Create file, for example
.demo.env
and add the following content there:
AZURE_APP_CLIENT_ID=<Application (client) ID from application created in step 4; you may find it on resource Overview page>
AZURE_APP_CLIENT_SECRET=<Value of secret generated in step 4.4>
AZURE_APP_TENANT_ID=<Directory (tenant) ID from application created in step 4; you may find it on resource Overview page>
AZURE_LOG_ANALYTICS_WORKSPACE_ID=<Workspace ID of resource created in step 2; you may find it on resource Overview page>
AZURE_OPENAI_CHATGPT_DEPLOYMENT=<name of your chat gpt deployment>
AZURE_OPENAI_ENDPOINT=<endpoint of your Azure Open AI deployment>
AZURE_OPENAI_API_KEY=<key for using your Azure Open AI deployment>
AZURE_RESOURCE_ID=<resouce id created in step 1; you can copy it from the URL once you are in the resource, the format will be: /subscriptions/<subscription-id>/resourceGroups/<your-resource-group>/providers/Microsoft.Communication/CommunicationServices/<name-of-our-resource>
AZURE_CHAT_ENDPOINT=<Grab Endpoint from Settings -> Keys of your Communication Service created in step 3>
AZURE_CHAT_ACCESS_KEY=<Grab Key from Settings -> Keys of your Communication Service created in step 3>
Then you can do:
docker compose -f docker-compose.yml --env-file .demo.env build
docker compose -f docker-compose.yml --env-file .demo.env up -d
Application becomes available at http://localhost
. Enjoy!
As code is written in C#
, use Visual Studio
(Community Edition
is more than enough).
Prior running it, you will need to setup the same variables mentioned for Running locally
section, but as environment variables.
Then run it as http
. It should open with Swagger
on port 5247
.
As this part is heavy on TypeScript
(React
, Redux
, Ant Design
), I recommend using Visual Studio Code
.
Depending on port used for Backend
instance, you might want to adjust BACKEND_HOST_URL
in ./build-configuration/dev.properties
file.
First, you need to do:
yarn
Then start it with:
yarn start
Application becomes available at http://localhost:8080
.