Skip to content

Commit a3dc385

Browse files
committed
reset frontend workflow test
Create readme test backend workflow
1 parent f10f832 commit a3dc385

File tree

5 files changed

+215
-2
lines changed

5 files changed

+215
-2
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Angular Chatbot
2+
3+
An Angular chatbot application with Azure OpenAI integration.
4+
5+
## πŸš€ Live Demo
6+
7+
**Frontend:** [https://wonderful-smoke-02316ae03.3.azurestaticapps.net](https://wonderful-smoke-02316ae03.3.azurestaticapps.net)
8+
9+
**Backend API:** [https://chatbot-rqglpxei5msos-backend.azurewebsites.net](https://chatbot-rqglpxei5msos-backend.azurewebsites.net)
10+
11+
## πŸ› οΈ Technology Stack
12+
13+
- **Frontend:** Angular 19 with Server-Side Rendering (SSR)
14+
- **Backend:** Node.js Express server
15+
- **AI:** Azure OpenAI (GPT-4o)
16+
- **Infrastructure:** Azure App Service & Static Web Apps
17+
- **IaC:** Bicep
18+
19+
## πŸ“¦ Local Development
20+
21+
### Prerequisites
22+
23+
- Node.js 22+
24+
- Azure CLI
25+
- Just command runner
26+
27+
### Setup
28+
29+
1. Clone the repository
30+
2. Deploy infrastructure:
31+
```bash
32+
just deploy-all
33+
```
34+
35+
3. Start local development:
36+
```bash
37+
# Backend
38+
just backend-start
39+
40+
# Frontend (in another terminal)
41+
just frontend-start
42+
```
43+
44+
## 🚒 Deployment
45+
46+
### Local Deployment
47+
48+
```bash
49+
# Deploy all
50+
just deploy-all
51+
52+
# Or deploy individually
53+
just deploy-infra
54+
just deploy-backend
55+
just deploy-frontend
56+
```
57+
58+
### GitHub Actions
59+
60+
Automatic deployment on push to `main` branch:
61+
- Backend deploys on changes to `backend/**`
62+
- Frontend deploys on changes to `frontend/**`
63+
64+
See [.github/SETUP.md](.github/SETUP.md) for configuration.
65+
66+
## πŸ§ͺ Testing
67+
68+
```bash
69+
# Test local services
70+
just test-backend
71+
just test-openai
72+
73+
# Test deployed services
74+
just test-backend-deployed
75+
just test-frontend-deployed
76+
```
77+
78+
## πŸ“‹ Available Commands
79+
80+
Run `just` to see all available commands.
81+
82+
## πŸ—‚οΈ Project Structure
83+
84+
```
85+
β”œβ”€β”€ backend/ # Express API server
86+
β”œβ”€β”€ frontend/ # Angular application
87+
β”œβ”€β”€ infra/ # Bicep infrastructure templates
88+
β”‚ └── scripts/ # Deployment scripts
89+
└── .github/
90+
└── workflows/ # GitHub Actions
91+
```
92+
93+
## πŸ“„ License
94+
95+
MIT

β€Žbackend/server.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ app.post('/api/chat', async (req, res) => {
3333
},
3434
body: JSON.stringify({
3535
messages: [
36-
{ role: 'system', content: 'You are a helpful assistant.' },
36+
{ role: 'system', content: 'You are a helpful assistant. Start all responses with "Joo..."' },
3737
{ role: 'user', content: message }
3838
],
3939
max_tokens: 1000,

β€Žfrontend/src/app/app.htmlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="chat-container">
2-
<h1>Angular Chatbot (test workflow)</h1>
2+
<h1>Angular Chatbot</h1>
33

44
<div class="messages">
55
@for (msg of messages(); track $index) {
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
source "$(dirname "$0")/../infra.env"
5+
6+
echo "πŸ“ Generating README with deployment information..."
7+
8+
DEPLOYMENT_OUTPUT=$(az deployment group show \
9+
--resource-group "$RESOURCE_GROUP" \
10+
--name "main" \
11+
--query 'properties.outputs' \
12+
--output json)
13+
14+
FRONTEND_URL=$(echo "$DEPLOYMENT_OUTPUT" | jq -r '.frontendUrl.value')
15+
BACKEND_URL=$(echo "$DEPLOYMENT_OUTPUT" | jq -r '.backendUrl.value')
16+
17+
cat > README.md <<EOF
18+
# Angular Chatbot
19+
20+
An Angular chatbot application with Azure OpenAI integration.
21+
22+
## πŸš€ Live Demo
23+
24+
**Frontend:** [$FRONTEND_URL]($FRONTEND_URL)
25+
26+
**Backend API:** [$BACKEND_URL]($BACKEND_URL)
27+
28+
## πŸ› οΈ Technology Stack
29+
30+
- **Frontend:** Angular 19 with Server-Side Rendering (SSR)
31+
- **Backend:** Node.js Express server
32+
- **AI:** Azure OpenAI (GPT-4o)
33+
- **Infrastructure:** Azure App Service & Static Web Apps
34+
- **IaC:** Bicep
35+
36+
## πŸ“¦ Local Development
37+
38+
### Prerequisites
39+
40+
- Node.js 22+
41+
- Azure CLI
42+
- Just command runner
43+
44+
### Setup
45+
46+
1. Clone the repository
47+
2. Deploy infrastructure:
48+
\`\`\`bash
49+
just deploy-all
50+
\`\`\`
51+
52+
3. Start local development:
53+
\`\`\`bash
54+
# Backend
55+
just backend-start
56+
57+
# Frontend (in another terminal)
58+
just frontend-start
59+
\`\`\`
60+
61+
## 🚒 Deployment
62+
63+
### Local Deployment
64+
65+
\`\`\`bash
66+
# Deploy all
67+
just deploy-all
68+
69+
# Or deploy individually
70+
just deploy-infra
71+
just deploy-backend
72+
just deploy-frontend
73+
\`\`\`
74+
75+
### GitHub Actions
76+
77+
Automatic deployment on push to \`main\` branch:
78+
- Backend deploys on changes to \`backend/**\`
79+
- Frontend deploys on changes to \`frontend/**\`
80+
81+
See [.github/SETUP.md](.github/SETUP.md) for configuration.
82+
83+
## πŸ§ͺ Testing
84+
85+
\`\`\`bash
86+
# Test local services
87+
just test-backend
88+
just test-openai
89+
90+
# Test deployed services
91+
just test-backend-deployed
92+
just test-frontend-deployed
93+
\`\`\`
94+
95+
## πŸ“‹ Available Commands
96+
97+
Run \`just\` to see all available commands.
98+
99+
## πŸ—‚οΈ Project Structure
100+
101+
\`\`\`
102+
β”œβ”€β”€ backend/ # Express API server
103+
β”œβ”€β”€ frontend/ # Angular application
104+
β”œβ”€β”€ infra/ # Bicep infrastructure templates
105+
β”‚ └── scripts/ # Deployment scripts
106+
└── .github/
107+
└── workflows/ # GitHub Actions
108+
\`\`\`
109+
110+
## πŸ“„ License
111+
112+
MIT
113+
EOF
114+
115+
echo "βœ… README.md created with deployment URLs"

β€Žjustfileβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ save-env:
1212
sync-github-secrets:
1313
./infra/scripts/sync-github-secrets.sh
1414

15+
generate-readme:
16+
./infra/scripts/generate-readme.sh
17+
1518
deploy-backend:
1619
./infra/scripts/deploy-backend.sh
1720

0 commit comments

Comments
Β (0)