This site is not affiliated with or endorsed by Vercel, Inc. Read the docs, then deploy or run each experiment yourself.
Platform

Approval Workflow Lab

Draft - pending - approve/reject via opaque tokens. Neon/memory state machine with honest fallbacks.

Run this experiment yourself

Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.

Local development

cd apps/experiments/approval-workflow-lab
pnpm install
pnpm dev

Then open http://localhost:3010.

This is an experimental demo. Use it as a starting point for your own projects.

Approval Workflow Lab is a Wave 3 Batch H composition lab. Pure helpers live in logic.ts; missing providers or stores degrade honestly (never fabricate AI output).

Features

  • State machine: draft - pending - approved|rejected
  • Opaque approve/reject tokens
  • Neon or in-memory persistence

API Reference

POST /api/workflow · POST /api/decide · GET /api/workflow

{ "title": "Ship pricing page", "body": "…" }
StatusCause
200Success
400Invalid transition / missing fields
404Unknown item or token

Implementation Details

Validate

Inputs are length-capped in logic.ts; APIs return 400 for missing fields.

Run

Route Handlers compose AI SDK, Redis/Neon, or ImageResponse as documented. Fallbacks include honest notes.

Limitations

  • Not a production IAM / SSO system.
  • No email delivery of tokens.
  • Memory mode resets on cold start.

Use in your project

Copy the Route Handler(s) and logic.ts from apps/experiments/approval-workflow-lab/.

Deployment

Deploy on Vercel

Local Development

cd apps/experiments/approval-workflow-lab
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
DATABASE_URLNoNeon persistence

Next Steps

On this page