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.
| Name | next-app |
| Version | 0.1.0 |
| Category | applications |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | typescript, nextjs, react, ai, chat, tailwind |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=24 | Node.js runtime for the Next.js application |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toAn AI-powered web application- Short project description for package.json and README
LlmProviderstring — defaults toanthropic- Default LLM provider for AI features (anthropic, openai, or custom)
IncludeAuthbool — defaults totrue- Include authentication setup with NextAuth.js
IncludeDatabasebool — defaults totrue- Include database setup with Drizzle ORM and Postgres
IncludeDockerbool — defaults totrue- Include Dockerfile and docker-compose.yml
IncludeTestsbool — defaults totrue- 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.tsComposes with
- Pairs with
module-auth-ts - Pairs with
module-database-ts - Pairs with
k8s-deploy - Nests inside
monorepo
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.