Skip to content

Next.js AI Application

Scaffolds a Next.js 15 application with App Router, streaming AI chat, and a pluggable provider registry. Includes Tailwind CSS styling, a chat UI with message streaming, server-side AI calls via route handlers, structured JSON logging, and optional auth, database (Drizzle + Postgres), and Docker configurations.

Namenext-app
Version0.1.0
Categoryapplications
LicenseApache-2.0
Personaengineering
Tagstypescript, nextjs, react, ai, chat, tailwind
Sourcetemplates/next-app

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render next-app --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "next-app", variables);

# MCP — from an agent
get_template({ name: "next-app" })

Prerequisites

ToolVersionWhy
node>=24Node.js runtime for the Next.js application

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to An AI-powered web application
Short project description for package.json and README
LlmProvider string — defaults to anthropic
Default LLM provider for AI features (anthropic, openai, or custom)
IncludeAuth bool — defaults to true
Include authentication setup with NextAuth.js
IncludeDatabase bool — defaults to true
Include database setup with Drizzle ORM and Postgres
IncludeDocker bool — defaults to true
Include Dockerfile and docker-compose.yml
IncludeTests bool — defaults to true
Include Vitest test suite and example tests

What it produces

36 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
docker-compose.yml
Dockerfile
next.config.js
package.json
postcss.config.js
public/.gitkeep
README.md
src/__tests__/chat-route.test.ts
src/__tests__/logger.test.ts
src/__tests__/message.test.tsx
src/__tests__/providers.test.ts
src/app/api/chat/route.ts
src/app/api/readyz/route.ts
src/app/chat/page.tsx
src/app/globals.css
src/app/layout.tsx
src/app/page.tsx
src/bootstrap.ts
src/components/chat/ChatWindow.tsx
src/components/chat/Message.tsx
src/lib/ai/providers/anthropic.ts
src/lib/ai/providers/index.ts
src/lib/ai/providers/openai.ts
src/lib/ai/providers/registry.ts
src/lib/ai/providers/types.ts
src/lib/ai/stream.ts
src/lib/auth/config.ts
src/lib/db/client.ts
src/lib/db/schema.ts
src/logger.ts
tailwind.config.ts
tsconfig.json
vitest.config.ts

Composes with

Composites that use it

  • AI Web Application — Full-stack web application with Next.js frontend, RAG pipeline, authentication, database, and deployment..
  • Product Launch — Full product launch kit spanning engineering, design, QA, product, marketing, and operations.