This guide provides comprehensive instructions for setting up the Document Knowledge Mining Solution Accelerator for local development on Windows.
This application consists of three separate services that run independently:
- Kernel Memory - Document processing and knowledge mining service
- Backend API - REST API server for the frontend
- Frontend - React-based user interface
⚠️ Critical: Each service must run in its own terminal/console window
- Do NOT close terminals/windows while services are running
- Open Kernel Memory and Backend API in Visual Studio.
- Open Frontend in Visual Studio Code.
- Each service will occupy its terminal and show live logs
Terminal/Window Organization:
- Visual Studio window 1: Kernel Memory - Service runs on port 9001
- Visual Studio window 2: Backend API - HTTP server runs on port 52190
- Visual Studio Code Terminal: Frontend - Development server on port 5900
All paths in this guide are relative to the repository root directory:
Document-Knowledge-Mining-Solution-Accelerator/ ← Repository root (start here)
├── App/
│ ├── backend-api/
│ │ ├── Microsoft.GS.DPS.sln ← Backend solution file
│ │ └── Microsoft.GS.DPS.Host/
│ │ └── appsettings.Development.json ← Backend API config
│ ├── kernel-memory/
│ │ ├── KernelMemory.sln ← Kernel Memory solution file
│ │ └── service/
│ │ └── Service/
│ │ └── appsettings.Development.json ← Kernel Memory config
│ └── frontend-app/
│ ├── src/ ← React/TypeScript source
│ ├── package.json ← Frontend dependencies
│ └── .env ← Frontend config file
├── Deployment/
│ └── appconfig/ ← Configuration templates location
│ ├── aiservice/
│ │ └── appsettings.Development.json.template ← Backend API template
│ ├── frontapp/
│ │ └── .env.template ← Frontend template
│ └── kernelmemory/
│ └── appsettings.Development.json.template ← Kernel Memory template
├── infra/
│ ├── main.bicep ← Main infrastructure template
│ └── main.parameters.json ← Deployment parameters
└── docs/ ← Documentation (you are here)Before starting any step, ensure you are in the repository root directory:
# Verify you're in the correct location
Get-Location # Windows PowerShell - should show: ...\Document-Knowledge-Mining-Solution-Accelerator
# If not, navigate to repository root
cd path\to\Document-Knowledge-Mining-Solution-AcceleratorThis project uses two separate appsettings.Development.json files and one .env file with different configuration requirements:
- Kernel Memory:
App/kernel-memory/service/Service/appsettings.Development.json- Azure App Configuration URL - Backend API:
App/backend-api/Microsoft.GS.DPS.Host/appsettings.Development.json- Azure App Configuration URL - Frontend:
App/frontend-app/.env- Frontend API endpoint configuration
Configuration templates are located in the Deployment/appconfig/ directory.
Install these tools before you start:
# .NET SDK (LTS .NET 8)
winget install Microsoft.DotNet.SDK.8
# Azure CLI (required for authentication and resource management)
winget install Microsoft.AzureCLI
# Yarn (via Corepack) – install Node.js LTS first
winget install OpenJS.NodeJS.LTS
corepack enable
corepack prepare yarn@stable --activate
# Verify
dotnet --version
az --version
yarn --version# Install WSL2 with Ubuntu (run in PowerShell as Administrator)
wsl --install -d Ubuntu
# Once inside Ubuntu, install .NET SDK, Azure CLI, and Node.js LTS
# (use apt or Microsoft package repos depending on preference)
# Install Azure CLI in Ubuntu
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# Verify installations
dotnet --version
az --version
node -v
yarn --versiongit clone https://github.com/microsoft/Document-Knowledge-Mining-Solution-Accelerator.git
cd Document-Knowledge-Mining-Solution-AcceleratorBefore configuring services, authenticate with Azure:
# Login to Azure CLI
az login
# Set your subscription
az account set --subscription "your-subscription-id"
# Verify authentication
az account showNavigate to your resource group and select the resource with prefix appcs- to get the configuration URL:
APP_CONFIGURATION_URL=https://[Your app configuration service name].azconfig.ioFor reference, see the image below:

To run the application locally, your Azure account needs the following role assignments on the deployed resources:
Note:
These roles are required only for local debugging and development. For production, ensure proper RBAC policies are applied.
You can assign these roles using either Azure CLI (Option 1) or Azure Portal (Option 2).
# Get your principal ID
PRINCIPAL_ID=$(az ad signed-in-user show --query id -o tsv)App Configuration Data Reader – Required for reading application configuration
# Assign App Configuration Data Reader role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "App Configuration Data Reader" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.AppConfiguration/configurationStores/<appconfig-name>"Depending on the features you use, you may also need:
Storage Blob Data Contributor – For Azure Storage operations
# Assign Storage Blob Data Contributor role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Storage Blob Data Contributor" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>"Storage Queue Data Contributor – For queue-based processing
# Assign Storage Queue Data Contributor role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Storage Queue Data Contributor" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>"Search Index Data Contributor – For Azure AI Search operations
# Assign Search Index Data Contributor role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Search Index Data Contributor" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Search/searchServices/<search-service-name>"Search Service Contributor – For managing Azure AI Search service
# Assign Search Service Contributor role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Search Service Contributor" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Search/searchServices/<search-service-name>"Cognitive Services OpenAI User – For Azure OpenAI access
# Assign Cognitive Services OpenAI User role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Cognitive Services OpenAI User" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<openai-service-name>"Cognitive Services User – For Azure AI Document Intelligence access
# Assign Cognitive Services User role
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Cognitive Services User" \
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<document-intelligence-service-name>"If you prefer or need to use the Azure Portal instead of CLI commands:
- Sign in to the Azure Portal.
- Navigate to your Resource Group where services are deployed.
- For each resource, assign the required roles:
App Configuration
- Go to Access control (IAM) → Add role assignment
- Assign role:
App Configuration Data Reader - Assign to: Your user account
Storage Account
- Go to Access control (IAM) → Add role assignment
- Assign the following roles to your user account:
Storage Blob Data ContributorStorage Queue Data Contributor
Azure AI Search
- Go to Access control (IAM) → Add role assignment
- Assign the following roles to your user account:
Search Index Data ContributorSearch Service Contributor
Azure OpenAI
- Go to Access control (IAM) → Add role assignment
- Assign role:
Cognitive Services OpenAI User - Assign to: Your user account
Azure AI Document Intelligence
- Go to Access control (IAM) → Add role assignment
- Assign role:
Cognitive Services User - Assign to: Your user account
Note: RBAC permission changes can take 5-10 minutes to propagate. If you encounter "Forbidden" errors after assigning roles, wait a few minutes and try again.
Navigate to the cloned repository and open the following solution files from Visual Studio:
-
KernelMemory path:
Document-Knowledge-Mining-Solution-Accelerator/App/kernel-memory/KernelMemory.sln -
Microsoft.GS.DPS path:
Document-Knowledge-Mining-Solution-Accelerator/App/backend-api/Microsoft.GS.DPS.sln
Sign in to Visual Studio using your tenant account with the required permissions.
After deploying the accelerator, the appsettings.Development.json file should be created automatically. If you are using a deployed resource group that was not deployed from your machine, you will need to create these files manually.
- In the Service project (inside the
servicefolder), expand theappsettings.jsonfile. - Confirm that
appsettings.Development.jsonexists. - If it does not exist, create it manually by copying the template file:
# From repository root
cd "Document-Knowledge-Mining-Solution-Accelerator"
# Copy the template file
Copy-Item Deployment\appconfig\kernelmemory\appsettings.Development.json.template App\kernel-memory\service\Service\appsettings.Development.json # Windows PowerShell- Edit the
appsettings.Development.jsonfile with your Azure App Configuration URL:
{
"ConnectionStrings": {
"AppConfig": "{{ appconfig-url }}"
}
}- In the Microsoft.GS.DPS.Host project, expand the
appsettings.jsonfile. - Confirm that
appsettings.Development.jsonexists. - If it does not exist, create it manually by copying the template file:
# From repository root
cd "Document-Knowledge-Mining-Solution-Accelerator"
# Copy the template file
Copy-Item Deployment\appconfig\aiservice\appsettings.Development.json.template App\backend-api\Microsoft.GS.DPS.Host\appsettings.Development.json- Edit the
appsettings.Development.jsonfile with your Azure App Configuration URL:
{
"ConnectionStrings": {
"AppConfig": "{{ appconfig-url }}"
}
}-
KernelMemory Solution:
Set Service (located inside theservicefolder) as the startup project to run the Kernel Memory service. -
Microsoft.GS.DPS Solution:
Set Microsoft.GS.DPS.Host as the startup project to run the API.
Important:
The following change is only for local development and debugging.
For production or Azure deployment, ensure the endpoint is set tohttp://kernelmemory-serviceto avoid misconfiguration.
- Sign in to the Azure Portal.
- Navigate to your App Configuration resource within/from your deployed resource group.
- Go to Operations → Configuration Explorer.
- Search for the key:
Application:Services:KernelMemory:Endpoint - For local development, update its value from:
to
http://kernelmemory-servicehttp://localhost:9001 - Apply the changes.
Note:
Always revert the Kernel Memory endpoint value back tohttp://kernelmemory-servicebefore running the application in Azure.
- In Visual Studio, run both solutions (KernelMemory and Microsoft.GS.DPS) by pressing F5 or clicking the Start button.
- Two terminal windows will appear showing the service logs.
- Once both services start successfully:
- Kernel Memory Service will be available at: http://localhost:9001
- Backend API will be available at: https://localhost:52190
- Swagger UI will open automatically at http://localhost:52190 for API validation
⚠️ Important: Keep both terminal windows open while the services are running. Do not close them until you're done with development.
Navigate to the App/frontend-app folder and create the .env file:
# From repository root
cd "Document-Knowledge-Mining-Solution-Accelerator"
# Copy the template file
Copy-Item Deployment\appconfig\frontapp\.env.template App\frontend-app\.envUpdate the VITE_API_ENDPOINT value with your local Backend API URL, e.g.:
VITE_API_ENDPOINT=https://localhost:52190
DISABLE_AUTH=true
VITE_ENABLE_UPLOAD_BUTTON=trueBefore installing dependencies, verify that Node.js (LTS) and Yarn are already installed from Step 1:
# Verify installations
node -v
yarn -vNote: If Yarn is not installed, go back to Step 1 and complete the prerequisites, or use the below commands to install:
corepack enable corepack prepare yarn@stable --activate
# From repository root, navigate to frontend directory
cd App\frontend-app
# Install dependencies
yarn installyarn startServices will be available at:
- Kernel Memory Service: http://localhost:9001
- Backend API: https://localhost:52190
- Frontend Application: http://localhost:5900
You're now ready to run and debug the application locally!
- While running the Kernel solution, if you encounter an error such as
server not respondedorserver not found, it usually indicates that the required resource is not responding. - Ensure that the necessary Kubernetes services are running. If not, start the Kubernetes service and then run the Kernel solution again.
# PowerShell execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Long path support (Windows 10 1607+, run as Administrator)
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force# Login to Azure CLI
az login
# Set subscription
az account set --subscription "your-subscription-id"
# Test authentication
az account show# Check environment variables are loaded
Get-ChildItem Env:AZURE* # Windows PowerShell
# Validate .env file format
cat .env | grep -v '^#' | grep '=' # Should show key=value pairs- Deployment Guide - Instructions for production deployment.
- Delete Resource Group - Steps to safely delete the Azure resource group created for the solution.
- PowerShell Setup - Instructions for setting up PowerShell and required scripts.
- Quota Check - Steps to verify Azure quotas and ensure required limits before deployment.