Skip to content
VercelLogotypeVercelLogotype
LoginSign Up

Eve Chat Template

A persisted Next.js chat template for Eve, built with shadcn/ui, Tailwind CSS, Streamdown, Better Auth, Drizzle, and Neon.

DeployView Demo

Eve Chat Template

A persisted Next.js chat template for Eve, built with shadcn/ui, Tailwind CSS, Streamdown, Better Auth, Drizzle, Neon, and Upstash Redis.

Quick Start

Two ways to get going:

  • One-click: use the Deploy with Vercel button above to clone and provision storage, then run migrations (see Setup and Deployment [blocked]).
  • Local script: clone the repo and run the setup script. It links the project, provisions Neon, registers the Sign in with Vercel OAuth app (email scope + callbacks), sets the environment variables through the Vercel API, pulls them locally, runs migrations, and can optionally set up the Notion connector. If OAuth app registration isn't available it falls back to a guided manual flow.
# Uses the linked project's team by default
./scripts/setup.sh
# Or target a specific team (also accepts a bare team slug)
./scripts/setup.sh --scope <team-slug>

The --scope is optional; omit it to use the linked project's team. The script needs the vercel CLI, node, pnpm, and openssl. Prefer to do it by hand? Follow the sequential steps below, or the full Setup and Deployment [blocked] guide.

Getting Started

For the full local setup, storage provisioning, Sign in with Vercel credentials, and production deploy flow, see Setup and Deployment [blocked]. For the runtime architecture, streaming model, persistence flow, and extension points, see How the Chatbot Works [blocked].

Install dependencies with pnpm:

pnpm install

Link the Vercel project and pull environment variables:

vercel link

Provision storage with the Vercel CLI integration commands:

# Required: persisted chat, auth, Eve session state, and message snapshots
vercel integration add neon
# Required: Redis-backed rate limiting
vercel integration add upstash

Follow the prompts to connect each resource to the linked project. Then pull the generated environment variables locally:

vercel env pull .env.local --yes

Required environment variables:

DATABASE_URL=
BETTER_AUTH_SECRET=
NEXT_PUBLIC_VERCEL_APP_CLIENT_ID=
VERCEL_APP_CLIENT_SECRET=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
KV_REST_API_URL=
KV_REST_API_TOKEN=

Optional environment variables:

# Override the app origin for custom production domains.
BETTER_AUTH_URL=
# Enable hosted Notion support.
NOTION_CONNECTOR=

Create the Notion connector:

vercel connect create mcp.notion.com --name notion

The deploy button does not require Notion. For manual setup, put the returned connector UID in NOTION_CONNECTOR. The app falls back to notion, so local connectors created with --name notion work without editing agent/connections/notion.ts.

If the connector is not attached to the linked project, run:

vercel connect attach <connector-uid> --yes
vercel env pull .env.local

Create the database tables:

pnpm db:migrate

For production, run migrations with Vercel production env vars:

vercel env run -e production -- pnpm db:migrate

Start the development server:

pnpm dev

What Is Included

  • Text chat with an Eve agent through same-origin /eve/v1/* routes
  • Better Auth sign-in with Vercel
  • Mandatory Neon-backed chat history
  • Mandatory Upstash Redis rate limiting for authenticated chat sends
  • Drizzle schema and migrations under lib/db
  • Saved Eve session cursors and event snapshots
  • Sidebar history with delete and new-chat actions
  • Vercel Connect-backed Notion MCP connection
  • Composer-level connections menu
  • First-message chat titles derived locally from the user's prompt
  • Streamdown markdown rendering for assistant text and reasoning
  • shadcn/Tailwind components for messages, tools, HITL prompts, and composer

This template intentionally does not include Slack code, file uploads, Vercel Blob, guest mode, NextAuth/Auth.js, or AI Elements.

Agent Code

Edit the agent in agent/agent.ts. Its behavior is defined in agent/instructions.md, and tools live in agent/tools/.

The browser talks to Eve with useEveAgent() from eve/react; the app stores Eve stream events and session state so /chat/[id] can resume the same durable conversation after refresh.

GitHub
Ownervercel-labs
Repositoryeve-chat-template
Use Cases
AI
Stack
Eve

Related Templates

Next.js Boilerplate

Get started with Next.js and React in seconds.
Next.js Boilerplate thumbnail

Image Gallery Starter

An image gallery built on Next.js and Vercel Blob.
Image Gallery Starter thumbnail

Chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
Chatbot thumbnail

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • EveNew
  • ConnectNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Next.js
  • Domains
  • v0

Frameworks

  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve
Core Platform
  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve

Core Platform

  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD

Tools

  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Resources

Learn

  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce

Explore

  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
Enterprise
Pricing
Sign UpLog In
Contact
DeployView Demo

Loading status…

Select a display theme: