Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
67 changes: 67 additions & 0 deletions wc-claims-portal/.azure/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy WC Claims Portal to Azure Static Web Apps

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: wc-claims-portal/package-lock.json

- name: Install dependencies
working-directory: wc-claims-portal
run: npm ci

- name: Build Next.js app
working-directory: wc-claims-portal
env:
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }}
AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }}
AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_NAME }}
NEXT_PUBLIC_APP_NAME: "WC Claims Agent Portal"
NEXT_PUBLIC_ORG_NAME: "AdaptCloud"
run: npm run build

- name: Deploy to Azure Static Web Apps
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "wc-claims-portal"
output_location: ".next/standalone"
skip_app_build: true

close_pull_request:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request

steps:
- name: Close Pull Request
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: "close"
23 changes: 23 additions & 0 deletions wc-claims-portal/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Azure AD / NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<generate-with-openssl-rand-base64-32>

AZURE_AD_CLIENT_ID=<your-app-registration-client-id>
AZURE_AD_CLIENT_SECRET=<your-app-registration-client-secret>
AZURE_AD_TENANT_ID=<your-aad-tenant-id>

# Azure OpenAI
AZURE_OPENAI_ENDPOINT=https://<your-resource>.openai.azure.com
AZURE_OPENAI_API_KEY=<your-azure-openai-key>
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o

# Claims data source
# demo — seeded in-memory data, no external dependencies (default)
# production — live CMS API; requires CLAIMS_API_BASE_URL and CLAIMS_API_KEY
CLAIMS_DATA_MODE=demo
CLAIMS_API_BASE_URL=https://<your-cms-api>/v1
CLAIMS_API_KEY=<your-cms-api-key>

# App
NEXT_PUBLIC_APP_NAME="WC Claims Agent Portal"
NEXT_PUBLIC_ORG_NAME="AdaptCloud"
30 changes: 30 additions & 0 deletions wc-claims-portal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Next.js build output
.next/
out/

# Production
build/

# Env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Vercel / Azure
.vercel

# TypeScript
*.tsbuildinfo
next-env.d.ts
Loading