A feature-rich Next.js 15 multilingual starter template to help you quickly build globally-ready websites.
🚀 Looking for a full-featured SaaS Starter Kit? Check out the complete version
- 🌐 Built-in i18n support (English, Chinese, Japanese)
- 🎨 Modern UI design with Tailwind CSS
- 🌙 Dark/Light theme toggle
- 📱 Responsive layout
- 📝 MDX blog system
- 🔍 SEO optimization
- 📊 Integrated analytics tools
- Google Analytics
- Baidu Analytics
- Google Adsense
- Vercel Analytics
- Node.js 18.17 or higher
- pnpm 9.0 or higher (recommended)
Note: The project has configured
packageManager
field, we recommend using pnpm for the best experience.
- Clone the repository:
git clone https://github.com/weijunext/nextjs-15-starter.git
cd nextjs-15-starter
- Enable Corepack (recommended):
corepack enable
- Install dependencies:
pnpm install
# or use other package managers
npm install
yarn
- Copy environment variables:
cp .env.example .env
- Start the development server:
pnpm dev
# or npm run dev
Visit http://localhost:3000 to view your application.
-
Basic Setup
- Edit
config/site.ts
for website information - Update icons and logo in
public/
- Configure
app/sitemap.ts
for sitemap - Update
app/robots.ts
for robots.txt
- Edit
-
i18n Setup
- Add/modify language files in
i18n/messages/
- Configure supported languages in
i18n/routing.ts
- Set up i18n routing in
middleware.ts
- Create pages under
app/[locale]/
- Use the
Link
component fromi18n/routing.ts
instead of Next.js default
- Add/modify language files in
Create MDX files in blogs/[locale]
with the following format:
---
title: Post Title
description: Post Description
image: /image.png
slug: /url-path
tags: tag1,tag2
date: 2025-02-20
visible: published
pin: true
---
Post content...
Reference types/blog.ts
for supported fields.
Manage static page content in content/[page]/[locale].mdx
.
Built-in comprehensive SEO features:
- Server-side rendering and static generation
- Automatic sitemap.xml generation
- robots.txt configuration
- Optimized metadata
- Open Graph support
- Multilingual SEO support
Enable analytics by adding IDs in .env
:
NEXT_PUBLIC_GOOGLE_ANALYTICS=
NEXT_PUBLIC_BAIDU_TONGJI=
NEXT_PUBLIC_GOOGLE_ADSENSE=
nextjs-15-starter/
├── app/ # App directory
│ ├── [locale]/ # Internationalized routes
│ │ ├── about/ # About page
│ │ ├── blogs/ # Blog pages
│ │ └── ... # Other pages
│ ├── api/ # API routes
│ └── globals/ # Global components
├── blogs/ # Blog content (MDX)
│ ├── en/ # English blogs
│ ├── ja/ # Japanese blogs
│ └── zh/ # Chinese blogs
├── components/ # Reusable components
│ ├── ui/ # Base UI components
│ ├── header/ # Header components
│ ├── footer/ # Footer components
│ └── ... # Other components
├── config/ # Configuration files
├── content/ # Static content (MDX)
├── i18n/ # Internationalization
│ ├── messages/ # Translation files
│ ├── routing.ts # Routing configuration
│ └── request.ts # Request configuration
├── lib/ # Utility functions
├── public/ # Static assets
└── types/ # Type definitions
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS + Shadcn/ui
- Internationalization: next-intl
- Content: MDX
- State Management: Zustand
- Deployment: Vercel
- Package Manager: pnpm (recommended)
- Push your code to GitHub
- Import project in Vercel
- Configure environment variables
- Deploy
# Build for production
pnpm build
# Start production server
pnpm start
- Project configured with
packageManager: "[email protected]"
- Enable Corepack:
corepack enable
- Team members should use the same pnpm version
# Lint code
pnpm lint
# Type checking
pnpm type-check
-
Adding new language support:
- Add new language files in
i18n/messages/
- Update
i18n/routing.ts
configuration - Create corresponding language directories in
blogs/
andcontent/
- Add new language files in
-
Using translations:
import { useTranslations } from 'next-intl';
export default function MyComponent() {
const t = useTranslations('namespace');
return <h1>{t('title')}</h1>;
}
1. Package manager version mismatch
# Remove node_modules and lockfile
rm -rf node_modules pnpm-lock.yaml
# Reinstall
pnpm install
2. MDX files not displaying
- Check file path is correct
- Verify frontmatter format
- Ensure
visible
field is set topublished
3. Internationalization routing issues
- Use
Link
component fromi18n/routing.ts
- Check
middleware.ts
configuration
4. Styles not working
- Verify Tailwind CSS class names are correct
- Try restarting development server
Ensure .env
file contains necessary configuration:
# Copy example config
cp .env.example .env
# Modify as needed
MIT
Issues and Pull Requests are welcome!
Next.js full-stack specialist providing expert services in project development, performance optimization, and SEO improvement.
For consulting and training opportunities, reach out at [email protected]