From 2a5b8b8877f3e9e69b9b78ee0c87adfc6984d5d0 Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Mon, 8 Dec 2025 19:43:29 +0530 Subject: [PATCH 1/3] docs: Add local development setup guide and update deployment documentation --- README.md | 3 + docs/DeploymentGuide.md | 3 + ...ggingSetup.md => LocalDevelopmentSetup.md} | 122 +++++++++++++++++- 3 files changed, 124 insertions(+), 4 deletions(-) rename docs/{LocalDebuggingSetup.md => LocalDevelopmentSetup.md} (58%) diff --git a/README.md b/README.md index 4740ff87..61204dea 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,9 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to [Click here to launch the deployment guide](./docs/DeploymentGuide.md)

+**For Local Development:** +- [Local Development Setup Guide](docs/LocalDevelopmentSetup.md) - Comprehensive setup instructions for Windows, Linux, and macOS + | [![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==) | |---|---|---| diff --git a/docs/DeploymentGuide.md b/docs/DeploymentGuide.md index 458792e2..be3de1b9 100644 --- a/docs/DeploymentGuide.md +++ b/docs/DeploymentGuide.md @@ -244,6 +244,9 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain 7. You can now delete the resources by running `azd down`, if you are done trying out the application. > **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`. + +> **Note:** To set up and run the application locally for development, see the [Local Development Setup Guide](./LocalDevelopmentSetup.md). + ### 🛠️ Troubleshooting If you encounter any issues during the deployment process, please refer [troubleshooting](../docs/TroubleShootingSteps.md) document for detailed steps and solutions diff --git a/docs/LocalDebuggingSetup.md b/docs/LocalDevelopmentSetup.md similarity index 58% rename from docs/LocalDebuggingSetup.md rename to docs/LocalDevelopmentSetup.md index 14e0bc65..17b38165 100644 --- a/docs/LocalDebuggingSetup.md +++ b/docs/LocalDevelopmentSetup.md @@ -1,4 +1,4 @@ -# Local Debugging Setup +# Local Development Setup Guide Follow the steps below to set up and run the **Document-Generation-Solution-Accelerator** locally. @@ -42,10 +42,14 @@ Choose a location on your local machine where you want to store the project file code . ``` -## Local Setup/Debugging +## Local Setup/Deplpoyment Follow these steps to set up and run the application locally: +## Local Deployment: + +You can refer the local deployment guide here: [Local Deployment Guide](https://github.com/microsoft/document-generation-solution-accelerator/blob/main/docs/DeploymentGuide.md) + ### 1. Open the App Folder Navigate to the `src` directory of the repository using Visual Studio Code. @@ -58,6 +62,17 @@ Navigate to the `src` directory of the repository using Visual Studio Code. provisioned using `azd provision` or `azd up`, a `.env` file is automatically generated in the `.azure//.env` file. To get your `` run `azd env list` to see which env is default. +> **Note**: After adding all environment variables to the .env file, update the value of **'APP_ENV'** from: +``` +APP_ENV="Prod" +``` +**to:** +``` +APP_ENV="Dev" +``` + +This change is required for running the application in local development mode. + ### 3. Start the Application - Run `start.cmd` (Windows) or `start.sh` (Linux/Mac) to: - Install backend dependencies. @@ -124,13 +139,112 @@ cd src/frontend npm install npm run build -# Run the backend API +# Run the backend API (Windows) cd src/ start http://127.0.0.1:50505 call python -m uvicorn app:app --port 50505 --reload + +# Run the backend API (MacOs) +cd src/ + +open http://127.0.0.1:50505 +python -m uvicorn app:app --port 50505 --reload + +# Run the backend API (Linux) +cd src/ + +xdg-open http://127.0.0.1:50505 +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. \ No newline at end of file +The App will run on `http://127.0.0.1:50505/#/` by default. + +## Troubleshooting + +### Common Issues + +#### Python Version Issues + +```bash +# Check available Python versions +python3 --version +python3.12 --version + +# If python3.12 not found, install it: +# Ubuntu: sudo apt install python3.12 +# macOS: brew install python@3.12 +# Windows: winget install Python.Python.3.12 +``` + +#### Virtual Environment Issues + +```bash +# Recreate virtual environment +rm -rf .venv # Linux/macOS +# or Remove-Item -Recurse .venv # Windows PowerShell + +uv venv .venv +# Activate and reinstall +source .venv/bin/activate # Linux/macOS +# or .\.venv\Scripts\Activate.ps1 # Windows +uv sync --python 3.12 +``` + +#### Permission Issues (Linux/macOS) + +```bash +# Fix ownership of files +sudo chown -R $USER:$USER . + +# Fix uv permissions +chmod +x ~/.local/bin/uv +``` + +#### Windows-Specific Issues + +```powershell +# 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 + +# SSL certificate issues +pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org uv +``` + +### Azure Authentication Issues + +```bash +# Login to Azure CLI +az login + +# Set subscription +az account set --subscription "your-subscription-id" + +# Test authentication +az account show +``` + +### Environment Variable Issues + +```bash +# Check environment variables are loaded +env | grep AZURE # Linux/macOS +Get-ChildItem Env:AZURE* # Windows PowerShell + +# Validate .env file format +cat .env | grep -v '^#' | grep '=' # Should show key=value pairs +``` + +## Related Documentation + +- [Deployment Guide](DeploymentGuide.md) - Instructions for production deployment. +- [Delete Resource Group](DeleteResourceGroup.md) - Steps to safely delete the Azure resource group created for the solution. +- [App Authentication Setup](AppAuthentication.md) - Guide to configure application authentication and add support for additional platforms. +- [Powershell Setup](PowershellSetup.md) - Instructions for setting up PowerShell and required scripts. +- [Quota Check](QuotaCheck.md) - Steps to verify Azure quotas and ensure required limits before deployment. \ No newline at end of file From e0b467f4d2e10effe1ef09cb421aaf3009ff88a1 Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Wed, 10 Dec 2025 14:34:45 +0530 Subject: [PATCH 2/3] docs: Enhance local development setup guide with detailed instructions and prerequisites --- docs/LocalDevelopmentSetup.md | 237 ++++++++++++++++++++++++++++++++-- 1 file changed, 224 insertions(+), 13 deletions(-) diff --git a/docs/LocalDevelopmentSetup.md b/docs/LocalDevelopmentSetup.md index 17b38165..9219390e 100644 --- a/docs/LocalDevelopmentSetup.md +++ b/docs/LocalDevelopmentSetup.md @@ -1,10 +1,75 @@ # Local Development Setup Guide -Follow the steps below to set up and run the **Document-Generation-Solution-Accelerator** locally. +This guide provides comprehensive instructions for setting up the Document Generation Solution Accelerator for local development across Windows and Linux platforms. +## Important Setup Notes +### Multi-Service Architecture -## Prerequisites +This application consists of **two separate services** that run independently: + +2. **Backend API** - REST API server for the frontend +3. **Frontend** - React-based user interface + +> **⚠️ Critical: Each service must run in its own terminal/console window** +> +> - **Do NOT close terminals** while services are running +> - Open **2 separate terminal windows** for local development +> - Each service will occupy its terminal and show live logs + + +### Path Conventions + +**All paths in this guide are relative to the repository root directory:** + +```bash +document-generation-solution-accelerator/ ← Repository root (start here) +├── src/ +│ ├── .venv/ ← Python virtual environment +│ ├── backend/ +│ │ ├── api/ ← API endpoints and routes +│ │ ├── auth/ ← Authentication modules +│ │ ├── helpers/ ← Utility and helper functions +│ │ ├── history/ ← Chat/session history management +│ │ ├── security/ ← Security-related modules +│ │ └── settings.py ← Backend configuration +│ ├── frontend/ +│ │ ├── .venv/ ← Node.js dependencies +│ │ ├── node_modules/ +│ │ ├── src/ ← React/TypeScript source +│ │ └── package.json ← Frontend dependencies +│ ├── static/ ← Static web assets +│ ├── tests/ ← Unit and integration tests +│ ├── app.py ← Main Flask application entry point +│ ├── .env ← Main application config file +│ └── requirements.txt ← Python dependencies +├── scripts/ +│ ├── prepdocs.py ← Document processing script +│ ├── auth_init.py ← Authentication setup +│ ├── data_preparation.py ← Data pipeline scripts +│ └── config.json ← Scripts configuration +├── infra/ +│ ├── main.bicep ← Main infrastructure template +│ ├── modules/ ← Bicep modules +│ ├── scripts/ ← Infrastructure scripts +│ └── main.parameters.json ← Deployment parameters +├── docs/ ← Documentation (you are here) +└── tests/ ← End-to-end tests + └── e2e-test/ +``` + +**Before starting any step, ensure you are in the repository root directory:** + +```bash +# Verify you're in the correct location +pwd # Linux/macOS - should show: .../document-generation-solution-accelerator +Get-Location # Windows PowerShell - should show: ...\document-generation-solution-accelerator + +# If not, navigate to repository root +cd path/to/document-generation-solution-accelerator +``` + +## Step 1: Prerequisites - Install Required Tools Install these tools before you start: - [Visual Studio Code](https://code.visualstudio.com/) with the following extensions: @@ -19,9 +84,64 @@ Install these tools before you start: - [Microsoft ODBC Driver 17](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16) for SQL Server. -## Setup Steps +### Windows Development + +#### Option 1: Native Windows (PowerShell) + +```powershell +# Install Python 3.12+ and Git +winget install Python.Python.3.12 +winget install Git.Git + +# Install Node.js for frontend +winget install OpenJS.NodeJS.LTS + +# Install uv package manager +py -3.12 -m pip install uv +``` + +**Note**: On Windows, use `py -3.12 -m uv` instead of `uv` for all commands to ensure you're using Python 3.12. + +#### Option 2: Windows with WSL2 (Recommended) + +```bash +# Install WSL2 first (run in PowerShell as Administrator): +# wsl --install -d Ubuntu + +# Then in WSL2 Ubuntu terminal: +sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y + +# Install uv +curl -LsSf https://astral.sh/uv/install.sh | sh +source ~/.bashrc +``` + +### Linux Development + +#### Ubuntu/Debian + +```bash +# Install prerequisites +sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y + +# Install uv package manager +curl -LsSf https://astral.sh/uv/install.sh | sh +source ~/.bashrc +``` + +#### RHEL/CentOS/Fedora + +```bash +# Install prerequisites +sudo dnf install python3.12 python3.12-devel git curl gcc nodejs npm -y + +# Install uv +curl -LsSf https://astral.sh/uv/install.sh | sh +source ~/.bashrc +``` -### Clone the Repository + +## Step 2: Clone the Repository 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. @@ -42,7 +162,69 @@ Choose a location on your local machine where you want to store the project file code . ``` -## Local Setup/Deplpoyment + +## Step 3: Development Tools Setup + +### Visual Studio Code (Recommended) + +#### Required Extensions + +Create `.vscode/extensions.json` in the workspace root and copy the following JSON: + +```json +{ + "recommendations": [ + "ms-python.python", + "ms-python.pylint", + "ms-python.black-formatter", + "ms-python.isort", + "ms-vscode-remote.remote-wsl", + "ms-vscode-remote.remote-containers", + "redhat.vscode-yaml", + "ms-vscode.azure-account", + "ms-python.mypy-type-checker" + ] +} +``` + +VS Code will prompt you to install these recommended extensions when you open the workspace. + +#### Settings Configuration + +Create `.vscode/settings.json` and copy the following JSON: + +```json +{ + "python.defaultInterpreterPath": "./.venv/bin/python", + "python.terminal.activateEnvironment": true, + "python.formatting.provider": "black", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "files.associations": { + "*.yaml": "yaml", + "*.yml": "yaml" + } +} +``` + +## Step 4: Azure Authentication Setup + +Before configuring services, authenticate with Azure: + +```bash +# Login to Azure CLI +az login + +# Set your subscription +az account set --subscription "your-subscription-id" + +# Verify authentication +az account show +``` + +## Step 5: Local Setup/Deplpoyment Follow these steps to set up and run the application locally: @@ -73,13 +255,34 @@ APP_ENV="Dev" This change is required for running the application in local development mode. -### 3. Start the Application -- Run `start.cmd` (Windows) or `start.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`. + +### Required Azure RBAC Permissions + +To run the application locally, your Azure account needs the following role assignments on the deployed resources: + +#### App Configuration Access +```bash +# Get your principal ID +PRINCIPAL_ID=$(az ad signed-in-user show --query id -o tsv) + +# Assign App Configuration Data Reader role +az role assignment create \ + --assignee $PRINCIPAL_ID \ + --role "App Configuration Data Reader" \ + --scope "/subscriptions//resourceGroups//providers/Microsoft.AppConfiguration/configurationStores/" +``` + +#### Cosmos DB Access +```bash +# Assign Cosmos DB Built-in Data Contributor role +az cosmosdb sql role assignment create \ + --account-name \ + --resource-group \ + --role-definition-name "Cosmos DB Built-in Data Contributor" \ + --principal-id $PRINCIPAL_ID \ + --scope "/" +``` +> **Note**: After local deployment is complete, you need to execute the post-deployment script so that all the required roles will be assigned automatically. ## Running with Automated Script @@ -97,8 +300,16 @@ cd src chmod +x start.sh ./start.sh ``` +### Start the Application +- Run `start.cmd` (Windows) or `start.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`. + -## Running Backend and Frontend Separately +## Step 6: Running Backend and Frontend Separately #### Step 1: Create Virtual Environment (Recommended) From 70e637164bd0c57b145d67d663c9592cbffea5ad Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Wed, 24 Dec 2025 12:06:47 +0530 Subject: [PATCH 3/3] docs: Update local development setup guide for Python version changes and formatting improvements --- README.md | 2 +- docs/LocalDevelopmentSetup.md | 46 +++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 61204dea..3c301aa2 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to [Click here to launch the deployment guide](./docs/DeploymentGuide.md)

-**For Local Development:** +**For Local Development** - [Local Development Setup Guide](docs/LocalDevelopmentSetup.md) - Comprehensive setup instructions for Windows, Linux, and macOS | [![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==) | diff --git a/docs/LocalDevelopmentSetup.md b/docs/LocalDevelopmentSetup.md index 9219390e..423800ea 100644 --- a/docs/LocalDevelopmentSetup.md +++ b/docs/LocalDevelopmentSetup.md @@ -8,8 +8,8 @@ This guide provides comprehensive instructions for setting up the Document Gener This application consists of **two separate services** that run independently: -2. **Backend API** - REST API server for the frontend -3. **Frontend** - React-based user interface +1. **Backend API** - REST API server for the frontend +2. **Frontend** - React-based user interface > **⚠️ Critical: Each service must run in its own terminal/console window** > @@ -34,7 +34,6 @@ document-generation-solution-accelerator/ ← Repository root (start here) │ │ ├── security/ ← Security-related modules │ │ └── settings.py ← Backend configuration │ ├── frontend/ -│ │ ├── .venv/ ← Node.js dependencies │ │ ├── node_modules/ │ │ ├── src/ ← React/TypeScript source │ │ └── package.json ← Frontend dependencies @@ -89,18 +88,18 @@ Install these tools before you start: #### Option 1: Native Windows (PowerShell) ```powershell -# Install Python 3.12+ and Git -winget install Python.Python.3.12 +# Install Python 3.11+ and Git +winget install Python.Python.3.11 winget install Git.Git # Install Node.js for frontend winget install OpenJS.NodeJS.LTS # Install uv package manager -py -3.12 -m pip install uv +py -3.11 -m pip install uv ``` -**Note**: On Windows, use `py -3.12 -m uv` instead of `uv` for all commands to ensure you're using Python 3.12. +**Note**: On Windows, use `py -3.11 -m uv` instead of `uv` for all commands to ensure you're using Python 3.11. #### Option 2: Windows with WSL2 (Recommended) @@ -109,7 +108,7 @@ py -3.12 -m pip install uv # wsl --install -d Ubuntu # Then in WSL2 Ubuntu terminal: -sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y +sudo apt update && sudo apt install python3.11 python3.11-venv git curl nodejs npm -y # Install uv curl -LsSf https://astral.sh/uv/install.sh | sh @@ -122,7 +121,7 @@ source ~/.bashrc ```bash # Install prerequisites -sudo apt update && sudo apt install python3.12 python3.12-venv git curl nodejs npm -y +sudo apt update && sudo apt install python3.11 python3.11-venv git curl nodejs npm -y # Install uv package manager curl -LsSf https://astral.sh/uv/install.sh | sh @@ -133,7 +132,7 @@ source ~/.bashrc ```bash # Install prerequisites -sudo dnf install python3.12 python3.12-devel git curl gcc nodejs npm -y +sudo dnf install python3.11 python3.11-devel git curl gcc nodejs npm -y # Install uv curl -LsSf https://astral.sh/uv/install.sh | sh @@ -224,7 +223,7 @@ az account set --subscription "your-subscription-id" az account show ``` -## Step 5: Local Setup/Deplpoyment +## Step 5: Local Setup/Deployment Follow these steps to set up and run the application locally: @@ -239,7 +238,7 @@ Navigate to the `src` directory of the repository using Visual Studio Code. - Copy the `.env.sample` file to a new file named `.env`. - Update the `.env` file 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: -![Enviorment Variables](images/Enviorment_variables.png) +![Environment Variables](images/Enviorment_variables.png) - Alternatively, if resources were provisioned using `azd provision` or `azd up`, a `.env` file is automatically generated in the `.azure//.env` file. To get your `` run `azd env list` to see which env is default. @@ -345,25 +344,26 @@ python -m pip install --upgrade pip # Install Python dependencies pip install -r requirements.txt -# Install Fronend Packages -cd src/frontend +# Install Frontend Packages +cd frontend + npm install npm run build # Run the backend API (Windows) -cd src/ +cd .. start http://127.0.0.1:50505 call python -m uvicorn app:app --port 50505 --reload # Run the backend API (MacOs) -cd src/ +cd .. open http://127.0.0.1:50505 python -m uvicorn app:app --port 50505 --reload # Run the backend API (Linux) -cd src/ +cd .. xdg-open http://127.0.0.1:50505 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. ```bash # Check available Python versions python3 --version -python3.12 --version +python3.11 --version -# If python3.12 not found, install it: -# Ubuntu: sudo apt install python3.12 -# macOS: brew install python@3.12 -# Windows: winget install Python.Python.3.12 +# If python3.11 not found, install it: +# Ubuntu: sudo apt install python3.11 +# macOS: brew install python@3.11 +# Windows: winget install Python.Python.3.11 ``` #### Virtual Environment Issues @@ -402,7 +402,7 @@ uv venv .venv # Activate and reinstall source .venv/bin/activate # Linux/macOS # or .\.venv\Scripts\Activate.ps1 # Windows -uv sync --python 3.12 +uv sync --python 3.11 ``` #### Permission Issues (Linux/macOS)