Skip to content
Open

ADD #461

Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# AGENTS

## Purpose
This repository is an Azure solution accelerator for SQL modernization. It combines a Python backend, a React/Vite frontend, Azure infrastructure deployment via `azd`, and helper scripts for quota and deployment validation.

## High-level structure
- `src/backend/`: FastAPI backend application and Python service code.
- `src/frontend/`: React + Vite frontend UI.
- `infra/`: Bicep and Azure Developer CLI configuration for deployment.
- `scripts/`: deployment and quota-check helper scripts.
- `docs/`: authoritative docs for local development, deployment, authentication, and quota checks.
- `tests/`: E2E test framework and sample tests.

## Key workflows
### Local development
- Backend: `cd src/backend && python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && uvicorn app:app --reload --host 0.0.0.0 --port 8000`
- Frontend: `cd src/frontend && npm install && npm run dev`
- Use separate terminals for backend and frontend.
- Backend and frontend each use their own `.env` file in `src/backend/` and `src/frontend/` respectively.

### Deployment
- Primary deployment mechanism: Azure Developer CLI (`azd`).
- Common commands:
- `azd init -t microsoft/Modernize-your-Code-Solution-Accelerator/`
- `azd env new <environment-name>`
- `azd up`
- `azd down`
- Quota-related helper: `./scripts/quota_check_params.sh`.

### Testing and linting
- Backend tests: run from `src/backend` with `pytest`.
- Frontend lint: run from `src/frontend` with `npm run lint`.
- End-to-end tests live in `tests/e2e-test/` and use Playwright + pytest.

## Important conventions
- Use the repository root for top-level docs and deployment instructions.
- Do not assume a single combined service; backend and frontend are separate local services.
- Azure config is managed through `azd env set` and project environment settings.
- The backend initializes AI agents from Azure AI Foundry at startup using `AzureAIAgent`.

## Reference docs
- [Local development setup](./docs/LocalDevelopmentSetup.md)
- [Deployment guide](./docs/DeploymentGuide.md)
- [Azd parameter customization](./docs/CustomizingAzdParameters.md)
- [Quota check instructions](./docs/quota_check.md)

## Notes for AI coding agents
- Prefer linking to existing documentation rather than duplicating detailed deployment/configuration steps.
- Preserve environment-specific behavior: `src/backend` is Python/FastAPI, `src/frontend` is React/Vite.
- Review Azure deployment and quota docs when changing infrastructure or model capacity behavior.
20 changes: 11 additions & 9 deletions azure.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@

name: modernize-your-code-solution-accelerator
metadata:
template: modernize-your-code-solution-accelerator@1.0
template: "modernize-your-code-solution-accelerator@1.0"

requiredVersions:
azd: '>= 1.18.0 != 1.23.9'
azd: ">= 1.18.0 != 1.23.9"

parameters:
AzureAiServiceLocation:
type: string
default: japaneast
default: "japaneast"
Prefix:
type: string
default: azdtemp
default: "azdtemp"
baseUrl:
type: string
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
default: "https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator"

deployment:
mode: Incremental
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
template: "./infra/main.bicep"
parameters:
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
Prefix: ${{ parameters.Prefix }}
baseUrl: ${{ parameters.baseUrl }}
AzureAiServiceLocation: "${{ parameters.AzureAiServiceLocation }}"
Prefix: "${{ parameters.Prefix }}"
baseUrl: "${{ parameters.baseUrl }}"
16 changes: 8 additions & 8 deletions azure_custom.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: modernize-your-code-solution-accelerator
metadata:
template: modernize-your-code-solution-accelerator@1.0
template: "modernize-your-code-solution-accelerator@1.0"

requiredVersions:
azd: '>= 1.18.0 != 1.23.9'
azd: ">= 1.18.0 != 1.23.9"

parameters:
azureAiServiceLocation:
type: string
default: japaneast
default: "japaneast"

services:
backend:
project: ./src/backend
project: "./src/backend"
host: containerapp
language: python
docker:
path: Dockerfile
path: "Dockerfile"
remoteBuild: true
frontend:
project: ./src/frontend
project: "./src/frontend"
host: containerapp
language: js
docker:
path: Dockerfile
path: "Dockerfile"
remoteBuild: true

infra:
provider: bicep
path: infra
path: "infra"
Empty file modified scripts/quota_check_params.sh
100644 → 100755
Empty file.
Loading