Skip to content

Commit 70e6371

Browse files
docs: Update local development setup guide for Python version changes and formatting improvements
1 parent e0b467f commit 70e6371

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
7272
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)
7373
<br/><br/>
7474

75-
**For Local Development:**
75+
**For Local Development**
7676
- [Local Development Setup Guide](docs/LocalDevelopmentSetup.md) - Comprehensive setup instructions for Windows, Linux, and macOS
7777

7878
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/document-generation-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/document-generation-solution-accelerator) | [![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvZG9jdW1lbnQtZ2VuZXJhdGlvbi1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==) |

docs/LocalDevelopmentSetup.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ This guide provides comprehensive instructions for setting up the Document Gener
88

99
This application consists of **two separate services** that run independently:
1010

11-
2. **Backend API** - REST API server for the frontend
12-
3. **Frontend** - React-based user interface
11+
1. **Backend API** - REST API server for the frontend
12+
2. **Frontend** - React-based user interface
1313

1414
> **⚠️ Critical: Each service must run in its own terminal/console window**
1515
>
@@ -34,7 +34,6 @@ document-generation-solution-accelerator/ ← Repository root (start here)
3434
│ │ ├── security/ ← Security-related modules
3535
│ │ └── settings.py ← Backend configuration
3636
│ ├── frontend/
37-
│ │ ├── .venv/ ← Node.js dependencies
3837
│ │ ├── node_modules/
3938
│ │ ├── src/ ← React/TypeScript source
4039
│ │ └── package.json ← Frontend dependencies
@@ -89,18 +88,18 @@ Install these tools before you start:
8988
#### Option 1: Native Windows (PowerShell)
9089

9190
```powershell
92-
# Install Python 3.12+ and Git
93-
winget install Python.Python.3.12
91+
# Install Python 3.11+ and Git
92+
winget install Python.Python.3.11
9493
winget install Git.Git
9594
9695
# Install Node.js for frontend
9796
winget install OpenJS.NodeJS.LTS
9897
9998
# Install uv package manager
100-
py -3.12 -m pip install uv
99+
py -3.11 -m pip install uv
101100
```
102101

103-
**Note**: On Windows, use `py -3.12 -m uv` instead of `uv` for all commands to ensure you're using Python 3.12.
102+
**Note**: On Windows, use `py -3.11 -m uv` instead of `uv` for all commands to ensure you're using Python 3.11.
104103

105104
#### Option 2: Windows with WSL2 (Recommended)
106105

@@ -109,7 +108,7 @@ py -3.12 -m pip install uv
109108
# wsl --install -d Ubuntu
110109

111110
# Then in WSL2 Ubuntu terminal:
112-
sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y
111+
sudo apt update && sudo apt install python3.11 python3.11-venv git curl nodejs npm -y
113112

114113
# Install uv
115114
curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -122,7 +121,7 @@ source ~/.bashrc
122121

123122
```bash
124123
# Install prerequisites
125-
sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y
124+
sudo apt update && sudo apt install python3.11 python3.11-venv git curl nodejs npm -y
126125

127126
# Install uv package manager
128127
curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -133,7 +132,7 @@ source ~/.bashrc
133132

134133
```bash
135134
# Install prerequisites
136-
sudo dnf install python3.12 python3.12-devel git curl gcc nodejs npm -y
135+
sudo dnf install python3.11 python3.11-devel git curl gcc nodejs npm -y
137136

138137
# Install uv
139138
curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -224,7 +223,7 @@ az account set --subscription "your-subscription-id"
224223
az account show
225224
```
226225

227-
## Step 5: Local Setup/Deplpoyment
226+
## Step 5: Local Setup/Deployment
228227

229228
Follow these steps to set up and run the application locally:
230229

@@ -239,7 +238,7 @@ Navigate to the `src` directory of the repository using Visual Studio Code.
239238
- Copy the `.env.sample` file to a new file named `.env`.
240239
- Update the `.env` file with the required values from your Azure resource group in Azure Portal App Service environment variables.
241240
- You can get all env value in your deployed resource group under App Service:
242-
![Enviorment Variables](images/Enviorment_variables.png)
241+
![Environment Variables](images/Enviorment_variables.png)
243242
- Alternatively, if resources were
244243
provisioned using `azd provision` or `azd up`, a `.env` file is automatically generated in the `.azure/<env-name>/.env`
245244
file. To get your `<env-name>` run `azd env list` to see which env is default.
@@ -345,25 +344,26 @@ python -m pip install --upgrade pip
345344
# Install Python dependencies
346345
pip install -r requirements.txt
347346

348-
# Install Fronend Packages
349-
cd src/frontend
347+
# Install Frontend Packages
348+
cd frontend
349+
350350
npm install
351351
npm run build
352352

353353
# Run the backend API (Windows)
354-
cd src/
354+
cd ..
355355

356356
start http://127.0.0.1:50505
357357
call python -m uvicorn app:app --port 50505 --reload
358358

359359
# Run the backend API (MacOs)
360-
cd src/
360+
cd ..
361361

362362
open http://127.0.0.1:50505
363363
python -m uvicorn app:app --port 50505 --reload
364364

365365
# Run the backend API (Linux)
366-
cd src/
366+
cd ..
367367

368368
xdg-open http://127.0.0.1:50505
369369
python -m uvicorn app:app --port 50505 --reload
@@ -383,12 +383,12 @@ The App will run on `http://127.0.0.1:50505/#/` by default.
383383
```bash
384384
# Check available Python versions
385385
python3 --version
386-
python3.12 --version
386+
python3.11 --version
387387

388-
# If python3.12 not found, install it:
389-
# Ubuntu: sudo apt install python3.12
390-
# macOS: brew install python@3.12
391-
# Windows: winget install Python.Python.3.12
388+
# If python3.11 not found, install it:
389+
# Ubuntu: sudo apt install python3.11
390+
# macOS: brew install python@3.11
391+
# Windows: winget install Python.Python.3.11
392392
```
393393

394394
#### Virtual Environment Issues
@@ -402,7 +402,7 @@ uv venv .venv
402402
# Activate and reinstall
403403
source .venv/bin/activate # Linux/macOS
404404
# or .\.venv\Scripts\Activate.ps1 # Windows
405-
uv sync --python 3.12
405+
uv sync --python 3.11
406406
```
407407

408408
#### Permission Issues (Linux/macOS)

0 commit comments

Comments
 (0)