This repo contains a minimal Azure Static Web Apps monorepo with a React + Tailwind frontend and Azure Functions (.NET 8 isolated worker) backend. It wires together Auth0 authentication, Tavus CVI conversations, a Vercel-style AI chat transcript UI, Fly.io Machines controls, and a basic agent loop with streaming logs.
frontend/– React + TypeScript (Vite) app that runs inside Azure Static Web Appsapi/– Azure Functions .NET 8 isolated worker HTTP APIsdocs/– setup notes
- Node 18+ and npm
- .NET 8 SDK
- Azure Functions Core Tools (for local API)
- Azure Static Web Apps CLI (
npm install -g @azure/static-web-apps-cli)
VITE_AUTH0_DOMAIN=your-tenant.us.auth0.com
VITE_AUTH0_CLIENT_ID=your-client-id
VITE_AUTH0_AUDIENCE=https://api.yourapp
VITE_API_BASE_URL=/api
AUTH0_DOMAIN=your-tenant.us.auth0.com
AUTH0_AUDIENCE=https://api.yourapp
TAVUS_API_KEY=your-tavus-api-key
TAVUS_PERSONA_ID=persona-id
TAVUS_REPLICA_ID=replica-id
FLY_API_TOKEN=fly-api-token
FLY_APP_NAME=fly-app
FLY_REGION=iad
OPENAI_API_KEY=sk-...
OPENAI_MODEL=codex
TABLE_STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true
TABLE_STORAGE_TABLE=agentmemory
- Install dependencies
cd frontend && npm install cd ../api && dotnet restore
- Run Functions locally
cd api func start - In a new terminal, run the Static Web Apps emulator
Or use the SWA CLI to proxy both:
cd frontend npm run devswa start http://localhost:5173 --api-location ../api
The frontend automatically starts a Tavus conversation after Auth0 login, shows a 60-minute timer, and lets you start/stop Fly Machines and view live previews. Chat messages persist per Auth0 user.
- Configure Azure Static Web Apps with
app_location: frontendandapi_location: api. - Set the environment variables above in your Azure Static Web App and Functions environment.
- Deploy with your preferred pipeline; SWA will build the frontend and publish the
apiFunctions project.
Conversations are assumed to last 60 minutes. The UI shows a countdown, warns at 5 minutes remaining, disables Hang Up after expiry, and offers Start New Conversation to restart immediately. The backend end endpoint calls the Tavus API when available and otherwise treats the session as client-complete.