Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoDoc GenAI Web App

A simple browser-based repository assistant built with Python and Azure AI. The app serves a static web UI from static/ and routes chat prompts through server.py to an Azure AI project agent.

What it does

  • Serves a lightweight HTML/CSS/JavaScript chat interface
  • Sends user questions to an Azure AI project agent
  • Displays the agent response in a modern chat workflow
  • Supports repository question answering, code explanation, and documentation summary

Files

  • server.py - Python HTTP server that forwards user prompts to Azure AI
  • static/index.html - Web UI shell
  • static/style.css - Visual styling for the chat app
  • static/script.js - Front-end logic for sending prompts and rendering replies
  • RepoDoc.py - Reference script for agent interaction

Requirements

  • Python 3.9 or later
  • azure-ai-projects Python package
  • azure-identity Python package
  • Azure AI project endpoint and credentials

Install dependencies:

pip install -r requirements.txt

Or install packages directly:

pip install azure-ai-projects>=2.1.0 azure-identity>=1.17.0

Configure Azure settings

server.py reads these environment variables if set:

  • AZURE_AI_PROJECT_ENDPOINT - Azure AI project endpoint URL
  • REPO_DOC_AGENT_NAME - Agent name (default: RepoDoc)
  • REPO_DOC_AGENT_VERSION - Agent version (default: 7)
  • REPO_DOC_HOST - Host address (default: 127.0.0.1)
  • REPO_DOC_PORT - Port number (default: 8001)

Run the app

Start the server:

python server.py

Open the app in your browser:

http://127.0.0.1:8001

How it works

  1. The browser sends the user prompt to POST /api/chat
  2. server.py forwards the prompt to the Azure AI agent
  3. The agent response returns to the server
  4. The browser renders the reply in the chat view

Customization

  • Change the agent endpoint and name by editing environment variables or the defaults in server.py
  • Update the UI in static/index.html, static/style.css, and static/script.js
  • Add richer session or repo context support in server.py

Notes

The app uses Azure Identity to authenticate with Azure AI. Ensure your local environment has valid Azure credentials available before running the server.

About

It was my first Gen AI project developed using MS Azure and MS Foundry. It was a repo analyzer, providing a link to a repo and prompting for docs, queries, that's how it works.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages