Follow the steps below to set up and run the Document-Generation-Solution-Accelerator locally.
Install these tools before you start:
- Visual Studio Code with the following extensions:
- Python 3.11. Important: Check "Add Python to PATH" during installation.
- PowerShell 7.0+.
- Node.js (LTS).
- Git.
- Azure Developer CLI (azd) v1.18.0+.
- Microsoft ODBC Driver 17 for SQL Server.
Choose a location on your local machine where you want to store the project files. We recommend creating a dedicated folder for your development projects.
-
Open your terminal or command prompt. Navigate to your desired directory and Clone the repository:
git clone https://github.com/microsoft/document-generation-solution-accelerator.git
-
Navigate to the project directory:
cd document-generation-solution-accelerator -
Open the project in Visual Studio Code:
code .
Follow these steps to set up and run the application locally:
Navigate to the src directory of the repository using Visual Studio Code.
- Copy the
.env.samplefile to a new file named.env. - Update the
.envfile with the required values from your Azure resource group in Azure Portal App Service environment variables. - You can get all env value in your deployed resource group under App Service:

- Alternatively, if resources were
provisioned using
azd provisionorazd up, a.envfile is automatically generated in the.azure/<env-name>/.envfile. To get your<env-name>runazd env listto see which env is default.
- Run
start.cmd(Windows) orstart.sh(Linux/Mac) to:- Install backend dependencies.
- Install frontend dependencies.
- Build the frontend.
- Start the backend server.
- Alternatively, you can run the backend in debug mode using the VS Code debug configuration defined in
.vscode/launch.json.
For convenience, you can use the provided startup scripts that handle environment setup and start both services:
Windows:
cd src
.\start.cmdmacOS/Linux:
cd src
chmod +x start.sh
./start.shOpen your terminal and navigate to the root folder of the project, then create the virtual environment:
# Navigate to the project root folder
cd document-generation-solution-accelerator
# Create virtual environment in the root folder
python -m venv .venv
# Activate virtual environment (Windows)
.venv/Scripts/activate
# Activate virtual environment (macOS/Linux)
source .venv/bin/activateNote: After activation, you should see
(.venv)in your terminal prompt indicating the virtual environment is active.
To develop and run the backend API locally:
# Navigate to the API folder (while virtual environment is activated)
cd src/
# Upgrade pip
python -m pip install --upgrade pip
# Install Python dependencies
pip install -r requirements.txt
# Install Fronend Packages
cd src/frontend
npm install
npm run build
# Run the backend API
cd src/
start http://127.0.0.1:50505
call python -m uvicorn app:app --port 50505 --reload Note: Make sure your virtual environment is activated before running these commands. You should see
(.venv)in your terminal prompt when the virtual environment is active.
The App will run on http://127.0.0.1:50505/#/ by default.