A production-ready documentation site template built with Next.js 15, Nextra 4, Tailwind CSS v4, and all 28 shadcn/ui components pre-configured.
- π Next.js 15 with App Router and Turbopack for ultra-fast development
- π Nextra 4 for MDX-powered documentation with automatic navigation generation
- π¨ Tailwind CSS v4 with modern PostCSS setup and OKLCH color system
- π§© All 28 shadcn/ui components pre-configured and available in MDX (no imports needed!)
- π Dark mode support with automatic theme switching
- π± Fully responsive design that works on all devices
- β‘ TypeScript ready with path aliases configured
- π― Zero configuration - just write MDX and go!
- Clone this template:
git clone <your-repo-url>
cd docs-starter-kit- Install dependencies:
pnpm install- Start the development server:
pnpm run devYour documentation site will be available at http://localhost:3000
docs-starter-kit/
βββ src/ # All source code (keeps root clean)
β βββ app/ # Next.js App Router
β β βββ layout.tsx # Root layout with Nextra theme
β β βββ [[...slug]]/ # Dynamic catch-all route
β β βββ page.tsx # Renders MDX content
β βββ components/
β β βββ ui/ # 28 pre-configured shadcn/ui components
β βββ content/ # Your documentation (MDX files)
β β βββ _meta.json # Navigation structure
β β βββ index.mdx # Homepage
β β βββ guides/ # Nested sections
β βββ lib/ # Utilities
β βββ app.css # Global styles + Tailwind v4
β βββ mdx-components.tsx # Component mappings
βββ next.config.mjs # Next.js + Nextra config
βββ postcss.config.mjs # PostCSS for Tailwind v4
βββ components.json # shadcn/ui config
βββ package.json
Add .mdx files to src/content/:
# My Page Title
This is a documentation page with **Markdown** and React components!
<Card>
<CardHeader>
<CardTitle>Look, no imports!</CardTitle>
<CardDescription>
All shadcn/ui components work directly in MDX
</CardDescription>
</CardHeader>
<CardContent>
<Button>Click me</Button>
</CardContent>
</Card>Update src/content/_meta.json:
{
"index": { "title": "Introduction", "type": "page" },
"getting-started": { "title": "Getting Started", "type": "page" },
"guides": { "title": "Guides", "type": "folder" },
"---": { "type": "separator" },
"github": {
"title": "GitHub",
"type": "link",
"href": "https://github.com/yourusername/yourrepo"
}
}All 28 shadcn/ui components are available:
<Tabs defaultValue="npm">
<TabsList>
<TabsTrigger value="npm">npm</TabsTrigger>
<TabsTrigger value="pnpm">pnpm</TabsTrigger>
</TabsList>
<TabsContent value="npm">
```bash
npm install package-name
```
</TabsContent>
<TabsContent value="pnpm">
```bash
pnpm add package-name
```
</TabsContent>
</Tabs>All components from shadcn/ui are pre-configured:
- Layout: Card, Sheet, Separator, Collapsible
- Navigation: Tabs, Breadcrumb, Navigation Menu, Pagination
- Forms: Button, Input, Label, Select, Textarea, Checkbox, Switch
- Data Display: Table, Badge, Avatar, Skeleton
- Feedback: Alert, Toast (Sonner)
- Overlays: Dialog, Dropdown Menu, Popover, Tooltip, Hover Card
- Utilities: Command palette
See the Component Reference and Component Showcase for interactive examples.
Edit src/app.css to customize colors:
@theme {
--color-background: oklch(100% 0 0);
--color-foreground: oklch(3.95% 0.015 286.32);
/* ... more color variables */
}Add new shadcn/ui components:
pnpm dlx shadcn@latest add accordionThen add to src/mdx-components.tsx:
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"
export const mdxComponents = {
// ... existing components
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
}Modify src/app/layout.tsx to customize:
- Navigation bar
- Sidebar behavior
- Footer content
- Search functionality
- Theme switching
pnpm run dev- Start development server with Turbopackpnpm run build- Build for productionpnpm run start- Start production serverpnpm dlx shadcn@latest add <component>- Add new components
# Install Vercel CLI
pnpm i -g vercel
# Deploy
vercel# Build for production
pnpm run build
# Output is in .next directory- Next.js 15 - React framework
- Nextra 4 - Documentation framework
- Tailwind CSS v4 - Utility-first CSS
- shadcn/ui - Component library
- React 19 - UI library
- TypeScript - Type safety
MIT
Built with β€οΈ for documentation that developers actually want to write.