From 3b2abee540e69b73cb89b4db5773a0bdc36f28ca Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:37:08 -0600 Subject: [PATCH 1/4] Update README with detailed project information --- README.md | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2344540..b29169e 100644 --- a/README.md +++ b/README.md @@ -31,21 +31,30 @@ Last updated: 2025-08-07 - [Solution Accelerator for AI Document Processor (ADP)](https://github.com/azure/ai-document-processor) - AI Factory -| **Category** | **Details** | -|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Purpose** | Automate document processing using Azure services and LLMs. Extracts data from files (PDF, Word, MP3), processes via Azure OpenAI, and outputs structured insights (JSON/CSV) to blob storage. | -| **Infrastructure Provisioning** | Uses Bicep templates to deploy all required Azure resources. Automates setup of networking, identity, and access controls using RBAC and managed identities to ensure secure and scalable deployment. | -| **Main Azure Resources** | - **Azure Function App**: Hosts the orchestrator and activity functions using Durable Functions to manage the document processing workflow.
- **Azure Storage Account**: Stores input documents (bronze container) and output results (gold container). Also holds prompt configurations if UI is not deployed.
- **Azure Static Web App**: Provides a user-friendly interface for uploading files, editing prompts, and triggering workflows.
- **Azure OpenAI**: Processes extracted text using LLMs to generate structured summaries or insights.
- **Azure Cognitive Services**: Specifically uses Document Intelligence for OCR and text extraction from uploaded files.
- **Cosmos DB**: Stores prompt configurations when the frontend UI is enabled, allowing dynamic updates from the web interface.
- **Key Vault**: Securely stores secrets, keys, and credentials used by the Function App and other services.
- **Application Insights**: Enables monitoring, logging, and diagnostics for the Function App and other components.
- **App Service Plan**: Provides the compute resources for running the Function App. | -| **Pipeline Components** | - `function_app.py`: Main orchestrator using Durable Functions chaining pattern.
- `activities/runDocIntel.py`: Extracts text from documents using Azure Document Intelligence.
- `activities/callAoai.py`: Sends extracted text and prompt to Azure OpenAI and receives structured JSON.
- `activities/writeToBlob.py`: Writes the final output to the gold container in blob storage. | -| **Data Flow** | 1. Upload document to bronze container
2. OCR via Document Intelligence
3. Send extracted text + prompt to Azure OpenAI
4. Receive structured JSON
5. Write output to gold container | -| **Frontend UI (Optional)** | - Allows business users to upload files and edit prompts
- Prompts are stored in Cosmos DB
- Users can trigger workflows and view job status directly from the interface | -| **Prompt Configuration** | - Without UI: Prompts are stored in `prompts.yaml` file in blob storage
- With UI: Prompts are stored and managed in Cosmos DB via the web interface | -| **Deployment Steps** | 1. Fork and clone the GitHub repo
2. Run `az login`, `azd auth login`, `azd up`
3. Provide User Principal ID for RBAC setup
4. Choose whether to deploy frontend UI | -| **Execution (Without UI)** | - Update `prompts.yaml` with desired instructions
- Send POST request to `http_start` endpoint with blob metadata
- Monitor pipeline execution via Log Stream | -| **Execution (With UI)** | - Upload files via web interface
- Edit system and user prompts
- Click "Start Workflow" to trigger pipeline
- View success/failure messages and job status | -| **Monitoring & Troubleshooting** | - Use Log Stream for real-time logs
- Use Log Analytics Workspace to query exceptions and performance metrics
- Use SSH console in Development Tools to inspect deployment logs and file system | -| **Pre-Requisites** | - Azure CLI
- Azure Developer CLI (azd)
- Node.js 18.x.x
- npm 9.x.x
- Python 3.11 | -| **License** | MIT License – Free to use, modify, and distribute with attribution. No warranty provided. | + | **Category** | **Details** | + |------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | **Purpose** | Automate document processing using Azure services and LLMs. Extracts data from files (PDF, Word, MP3), processes via Azure OpenAI, and outputs structured insights (JSON/CSV) to blob storage. | + | **Infrastructure Provisioning** | Uses Bicep templates to deploy all required Azure resources. Automates setup of networking, identity, and access controls using RBAC and managed identities to ensure secure and scalable deployment. | + | **Main Azure Resources** | - **Azure Function App**: Hosts the orchestrator and activity functions using Durable Functions to manage the document processing workflow.
- **Azure Storage Account**: Stores input documents (bronze container) and output results (gold container). Also holds prompt configurations if UI is not deployed.
- **Azure Static Web App**: Provides a user-friendly interface for uploading files, editing prompts, and triggering workflows.
- **Azure OpenAI**: Processes extracted text using LLMs to generate structured summaries or insights.
- **Azure Cognitive Services**: Specifically uses Document Intelligence for OCR and text extraction from uploaded files.
- **Cosmos DB**: Stores prompt configurations when the frontend UI is enabled, allowing dynamic updates from the web interface.
- **Key Vault**: Securely stores secrets, keys, and credentials used by the Function App and other services.
- **Application Insights**: Enables monitoring, logging, and diagnostics for the Function App and other components.
- **App Service Plan**: Provides the compute resources for running the Function App. | + | **Pipeline Components** | - `function_app.py`: Main orchestrator using Durable Functions chaining pattern.
- `activities/runDocIntel.py`: Extracts text from documents using Azure Document Intelligence.
- `activities/callAoai.py`: Sends extracted text and prompt to Azure OpenAI and receives structured JSON.
- `activities/writeToBlob.py`: Writes the final output to the gold container in blob storage. | + | **Data Flow** | 1. Upload document to bronze container
2. OCR via Document Intelligence
3. Send extracted text + prompt to Azure OpenAI
4. Receive structured JSON
5. Write output to gold container | + | **Frontend UI (Optional)** | - Allows business users to upload files and edit prompts
- Prompts are stored in Cosmos DB
- Users can trigger workflows and view job status directly from the interface | + | **Prompt Configuration** | - Without UI: Prompts are stored in `prompts.yaml` file in blob storage
- With UI: Prompts are stored and managed in Cosmos DB via the web interface | + | **Deployment Steps** | 1. Fork and clone the GitHub repo
2. Run `az login`, `azd auth login`, `azd up`
3. Provide User Principal ID for RBAC setup
4. Choose whether to deploy frontend UI | + | **Execution (Without UI)** | - Update `prompts.yaml` with desired instructions
- Send POST request to `http_start` endpoint with blob metadata
- Monitor pipeline execution via Log Stream | + | **Execution (With UI)** | - Upload files via web interface
- Edit system and user prompts
- Click "Start Workflow" to trigger pipeline
- View success/failure messages and job status | + | **Monitoring & Troubleshooting** | - Use Log Stream for real-time logs
- Use Log Analytics Workspace to query exceptions and performance metrics
- Use SSH console in Development Tools to inspect deployment logs and file system | + | **Pre-Requisites** | - Azure CLI
- Azure Developer CLI (azd)
- Node.js 18.x.x
- npm 9.x.x
- Python 3.11 | + | **License** | MIT License – Free to use, modify, and distribute with attribution. No warranty provided. | + + image + + > Data flow: + + image + + > ZTA: + image - [Use Azure AI services with SynapseML in Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-science/how-to-use-ai-services-with-synapseml) - [Plan and manage costs for Azure AI Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/costs-plan-manage) From d4293f36fd6c4f1da1c20c170683cbb1a7c41bd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Oct 2025 18:37:22 +0000 Subject: [PATCH 2/4] Update last modified date in Markdown files --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b29169e..7587b6a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-08-07 +Last updated: 2025-10-29 ---------- From f8f8b8d01f7e96ad9571cbb39715b7c69b502d3d Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:40:06 -0600 Subject: [PATCH 3/4] Refactor visitor counter workflow for commits and merges --- .github/workflows/use-visitor-counter.yml | 52 +++++++++-------------- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/.github/workflows/use-visitor-counter.yml b/.github/workflows/use-visitor-counter.yml index 4aa2c96..973fb24 100644 --- a/.github/workflows/use-visitor-counter.yml +++ b/.github/workflows/use-visitor-counter.yml @@ -21,6 +21,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} - name: Shallow clone visitor counter logic run: git clone --depth=1 https://github.com/brown9804/github-visitor-counter.git @@ -57,38 +58,23 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Commit and push changes (PR) - if: github.event_name == 'pull_request' + - name: Commit and merge changes env: - TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_BRANCH: ${{ github.head_ref || github.ref_name }} + GIT_AUTHOR_NAME: github-actions[bot] + GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com + GIT_COMMITTER_NAME: github-actions[bot] + GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com run: | - git fetch origin - git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }} - git add "*.md" metrics.json - git commit -m "Update visitor count" || echo "No changes to commit" - git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }} - git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed" - git push origin HEAD:${{ github.event.pull_request.head.ref }} - - - name: Commit and push changes (non-PR) - if: github.event_name != 'pull_request' - env: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git fetch origin - git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }} - git add "*.md" metrics.json - git commit -m "Update visitor count" || echo "No changes to commit" - git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }} - git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed" - git push origin HEAD:${{ github.event.pull_request.head.ref }} - - - name: Create Pull Request (non-PR) - if: github.event_name != 'pull_request' - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: update-visitor-count - title: "Update visitor count" - body: "Automated update of visitor count" - base: main + # Ensure we're on the correct branch + git switch -c "$PR_BRANCH" || git switch "$PR_BRANCH" + + # Stage and commit changes if any + git add -A + git diff --staged --quiet || git commit -m "Update visitor count" + + # Pull and merge existing changes + git pull origin "$PR_BRANCH" --no-rebase + + # Push all changes + git push origin "$PR_BRANCH" From 9f00623855971b73e5004cd88467d341a9673bd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Oct 2025 18:40:18 +0000 Subject: [PATCH 4/4] Update visitor count --- README.md | 4 ++-- terraform-infrastructure/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7587b6a..168c3e2 100644 --- a/README.md +++ b/README.md @@ -995,7 +995,7 @@ If you need further assistance with the code, please click [here to view all the
- Total views -

Refresh Date: 2025-09-17

+ Total views +

Refresh Date: 2025-10-29

diff --git a/terraform-infrastructure/README.md b/terraform-infrastructure/README.md index ce78483..94566d3 100644 --- a/terraform-infrastructure/README.md +++ b/terraform-infrastructure/README.md @@ -109,7 +109,7 @@ graph TD;
- Total views -

Refresh Date: 2025-09-17

+ Total views +

Refresh Date: 2025-10-29