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

Multi-Tenant Notes

Tenant from path segment or x-tenant-id header - isolated notes in Neon/memory 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/multi-tenant-notes
pnpm install
pnpm dev

Then open http://localhost:3010.

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

Multi-Tenant Notes 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

  • Resolve tenant from header or query
  • Per-tenant note lists
  • Neon/memory persistence

API Reference

GET|POST /api/notes

{ "text": "Ship docs", "tenant": "acme" }
StatusCause
200Success
400Missing tenant/text

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 row-level security.
  • No auth users.
  • Memory resets on cold start.

Use in your project

Copy the Route Handler(s) and logic.ts from apps/experiments/multi-tenant-notes/.

Deployment

Deploy on Vercel

Local Development

cd apps/experiments/multi-tenant-notes
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
DATABASE_URLNoNeon persistence

Next Steps

On this page