Documentation
Use this path when you want a full runnable project scaffold instead of installing one Block into an existing app.
Need an API without the React or Next.js application shell? Supported Blocks can be exported as a standalone Hono API server or Nitro API server.
Endpoint split
The toolbar routes Block downloads by access:
- Free Blocks:
GET /api/blocks/<name>/download - Pro Blocks:
POST /api/templates/<name>/download(Block download pipeline)
Standalone Templates use the Template catalog download on /templates.
Free download behavior
Free downloads create a zip containing:
- Block files from the registry
- a basic
README.mdwith install instructions
This path is intentionally lightweight.
Pro download behavior
Pro Block downloads build a full app package and zip it:
- reads Block files from the pro registry
- rewrites internal preview API paths from
/view/<block>/api/*to/api/* - auto-includes
components/ai-elements/* - resolves and includes required
components/ui/*files (including nested UI deps) - merges npm dependencies into generated
package.json - adds app defaults and setup files
Generated project files
Typical generated files include:
package.json(with merged dependencies)app/layout.tsxapp/globals.cssapp/page.tsx(setup/checklist page if no root page exists)components.json(shadcn CLI config)lib/utils.ts.env.local(when env metadata exists)- Block source files under their target paths
Environment variables
If Block metadata defines env vars, the download pipeline generates .env.local placeholders and includes a README section with provider URLs.
First run checklist
pnpm install
pnpm devThen:
- Fill
.env.localif required. - Open the default setup page.
- Navigate to the generated Block route and verify responses.
Troubleshooting
Download starts but app fails at runtime
- Most common cause: missing env vars or external service credentials.
API calls fail after download
- Confirm routes now point to
/api/*(path rewrite is automatic in the Pro pipeline).
Missing UI component errors
- Rare, but usually indicates a dependency mismatch in your package manager lockfile.
- Reinstall from a clean lockfile.
When to choose this path
- You want a full reference app quickly.
- You want to inspect full-stack implementation details.
- You are starting a new project from a Block baseline.
Choose Hono when your frontend and AI API should deploy as separate services. Choose a Template when you need a SaaS shell with auth and payments.
ai sdk blocks.