Skip to content

Commit e03e3ae

Browse files
Merge pull request #814 from microsoft/psl-ui-refractoring
refactor: UI code cleanup and folder restructure
2 parents 76e63ed + f8bf49a commit e03e3ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2482
-2261
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ updates:
3535
# npm dependencies - grouped
3636
- package-ecosystem: "npm"
3737
directories:
38-
- "/src/app/frontend"
39-
- "/src/app/frontend-server"
38+
- "/src/App"
39+
- "/src/App/server"
4040
schedule:
4141
interval: "monthly"
4242
target-branch: "dependabotchanges"

.github/workflows/docker-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
- demo
99
paths:
1010
- 'src/backend/**'
11-
- 'src/app/frontend/**'
12-
- 'src/app/frontend-server/**'
11+
- 'src/App/src/**'
12+
- 'src/App/server/**'
1313
- '.github/workflows/docker-build.yml'
1414
pull_request:
1515
types:
@@ -23,8 +23,8 @@ on:
2323
- demo
2424
paths:
2525
- 'src/backend/**'
26-
- 'src/app/frontend/**'
27-
- 'src/app/frontend-server/**'
26+
- 'src/App/src/**'
27+
- 'src/App/server/**'
2828
- '.github/workflows/docker-build.yml'
2929
workflow_dispatch:
3030

@@ -88,8 +88,8 @@ jobs:
8888
- name: Build and Push Docker Image for Frontend Server
8989
uses: docker/build-push-action@v6
9090
with:
91-
context: ./src/app
92-
file: ./src/app/WebApp.Dockerfile
91+
context: ./src/App
92+
file: ./src/App/WebApp.Dockerfile
9393
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
9494
tags: |
9595
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-app:${{ steps.determine_tag.outputs.tagname }}

.github/workflows/job-docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
env:
6666
DOCKER_BUILD_SUMMARY: false
6767
with:
68-
context: ./src/app
69-
file: ./src/app/WebApp.Dockerfile
68+
context: ./src/App
69+
file: ./src/App/WebApp.Dockerfile
7070
push: true
7171
tags: |
7272
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-app:${{ steps.generate_docker_tag.outputs.AZURE_ENV_IMAGE_TAG }}

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ eggs/
3636
*.swo
3737

3838
# Node
39-
/src/app/frontend/node_modules/
40-
/src/app/frontend-server/node_modules/
41-
/src/app/frontend-server/static/
42-
/src/app/frontend-server/*.zip
39+
/src/App/node_modules/
40+
/src/App/server/node_modules/
41+
/src/App/server/static/
42+
/src/App/server/*.zip
4343
node_modules/
4444

4545
# Build output
46-
/src/app/static/
47-
/src/app/frontend/dist/
46+
/src/App/static/
47+
/src/App/dist/
4848

4949
# Logs
5050
*.log

azure_custom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ infra:
1111

1212
services:
1313
frontend:
14-
project: ./src/app/frontend-server
14+
project: ./src/App/server
1515
language: js
1616
host: appservice
1717
dist: ./dist

docs/AZD_DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Error: az acr build failed
239239
**Solution**: Check the Dockerfile and ensure all required files are present:
240240
```bash
241241
# Manual build for debugging
242-
cd src/app
242+
cd src/App
243243
docker build -f WebApp.Dockerfile -t content-gen-app:test .
244244
```
245245

@@ -251,7 +251,7 @@ Error: az webapp deploy failed
251251

252252
**Solution**: Ensure the frontend builds successfully:
253253
```bash
254-
cd src/app/frontend
254+
cd src/App
255255
npm install
256256
npm run build
257257
```

docs/TECHNICAL_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pip install -r requirements.txt
142142
python app.py
143143

144144
# Frontend
145-
cd src/app/frontend
145+
cd src/App
146146
npm install
147147
npm run dev
148148
```

infra/scripts/package_frontend.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Package frontend for App Service deployment
22
# This script is called by AZD during prepackage hook
3-
# Working directory is ./src/app/frontend-server (project directory)
3+
# Working directory is ./src/App/server (project directory)
44

55
$ErrorActionPreference = 'Stop'
66

77
Write-Host "Building React frontend..." -ForegroundColor Cyan
88

99
# Build React frontend (one level up)
10-
Push-Location ../frontend
10+
Push-Location ..
1111
npm ci --loglevel=error
1212
if ($LASTEXITCODE -ne 0) { throw "npm ci failed with exit code $LASTEXITCODE" }
13-
npm run build -- --outDir ../frontend-server/static
13+
npm run build -- --outDir ./server/static
1414
if ($LASTEXITCODE -ne 0) { throw "npm run build failed with exit code $LASTEXITCODE" }
1515
Pop-Location
1616

infra/scripts/package_frontend.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ set -euo pipefail
33

44
# Package frontend for App Service deployment
55
# This script is called by AZD during prepackage hook
6-
# Working directory is ./src/app/frontend-server (project directory)
6+
# Working directory is ./src/App/server (project directory)
77

88
echo "Building React frontend..."
99

1010
# Build React frontend (one level up)
11-
cd ../frontend
11+
cd ..
1212
npm ci --loglevel=error
13-
npm run build -- --outDir ../frontend-server/static
14-
cd ../frontend-server
13+
npm run build -- --outDir ./server/static
14+
cd ./server
1515

1616
echo "Packaging frontend server..."
1717

scripts/deploy.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ if ($continue -eq "y" -or $continue -eq "Y") {
131131
Write-Host "Step 3: Building and deploying frontend..." -ForegroundColor Green
132132
Write-Host "==========================================" -ForegroundColor Green
133133

134-
Set-Location "$ProjectDir\src\frontend"
134+
Set-Location "$ProjectDir\src\App"
135135
npm install
136136
npm run build
137137

138138
# Copy built files to server directory
139-
Copy-Item -Path "$ProjectDir\src\static\*" -Destination "$ProjectDir\src\frontend-server\static\" -Recurse -Force
139+
Copy-Item -Path "$ProjectDir\src\static\*" -Destination "$ProjectDir\src\App\server\static\" -Recurse -Force
140140

141-
Set-Location "$ProjectDir\src\frontend-server"
141+
Set-Location "$ProjectDir\src\App\server"
142142

143143
# Create deployment package
144144
if (Test-Path "frontend-deploy.zip") {

0 commit comments

Comments
 (0)