Back to Plate

Playground Template

tooling/templates/plate-playground-template/README.md

53.3.121.4 KB
Original Source

Playground Template

A Next.js template with Plate AI, plugins and components.

Features

Requirements

  • Node.js 20+
  • bun

Installation

Choose one of these methods:

bash
npx shadcn@latest add @plate/editor-ai

2. Using Template

Use this template, then install dependencies:

bash
bun install

Development

Copy the example env file:

bash
cp .env.example .env.local

Configure .env.local:

Enter your own AI Gateway key in the editor settings to use AI. The example API routes use the caller's key.

Uploads work in local development. Before enabling production uploads, replace the development check in src/lib/uploadthing.ts with your application's session and permission checks. Add per-user upload limits.

If your application uses a shared server AI credential, authorize each request and enforce per-user usage limits before calling the provider. Keep server credentials out of client code.

Start the development server:

bash
bun dev

Visit http://localhost:3000/editor to see the editor in action.