An AI-powered operations triage assistant. Paste an unstructured operational note — a voicemail summary, an email, a shift handoff — and OpsFlow AI returns a validated, structured triage record: summary, category, priority, recommended owner, next action, and concrete action items.
It's a small, focused demo of turning messy operational input into data an internal tool can route and act on.
- Single-screen internal-tool UI with skeleton loading, error, and reset states
- Server-side LLM call — the API key never reaches the browser
- Native OpenAI Structured Outputs constrained to a JSON schema
- Zod re-validation of every model response before it's trusted or returned
- Typed request/response contract shared between API route and client
- Result rendered as a triage record, with one-click copy of the validated JSON
- Three example inputs and a ⌘/Ctrl+Enter shortcut for a quick walkthrough
- Input guards (length bounds, JSON validation) and human-readable error messages
| Layer | Choice |
|---|---|
| Framework | Next.js (App Router) + React + TypeScript |
| Styling | Tailwind CSS |
| LLM | OpenAI Responses API (gpt-5.4-mini), low reasoning effort |
| Validation | Zod |
| API | Next.js Route Handler (POST /api/analyze) |
- The
/api/analyzeroute validates the incoming note (type, length bounds). lib/analyze.tssends it to the OpenAI Responses API withzodTextFormat(OpsAnalysisSchema, …), so the model is constrained to the schema via native Structured Outputs. Reasoning effort and output tokens are kept low — this is a bounded extraction task.- The response is parsed back through the same Zod schema on the server. If it doesn't conform, the request fails with a 502 rather than returning unverified data.
- The client receives a discriminated-union response
(
{ ok: true, data } | { ok: false, error }) and renders accordingly.
The Zod schema in lib/schema.ts is the single source of truth — it shapes the
model request, guards the server boundary, and types the client.
npm install
cp .env.example .env.local # then add your OpenAI API key
npm run devOpen http://localhost:3000.
| Variable | Required | Notes |
|---|---|---|
OPENAI_API_KEY |
Yes | Server-side only. Used by the /api/analyze route. |
OPENAI_MODEL |
No | Overrides the default model. |
This is a synthetic demo, not a production system. It has no authentication, no database, and no persistence — each request is stateless. It is intended for non-sensitive, illustrative operational data only. Do not paste real personal, patient, or confidential information. No compliance claims (HIPAA or otherwise) are made, and it is not built for or affiliated with any employer or client.