Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

254 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Ship your SaaS faster with Nexty

NEXTY.DEV is a comprehensive Next.js SaaS boilerplate that provides everything developers need to rapidly build and launch modern AI web applications

๐ŸŒ English โˆ™ ็ฎ€ไฝ“ไธญๆ–‡ โˆ™ ๆ—ฅๆœฌ่ชž

Next.js Starter - Multilingual Next.js 16 Starter

A feature-rich Next.js 16 multilingual starter template to help you quickly build globally-ready websites.

๐Ÿš€ Looking for a full-featured SaaS Starter Template? Check out the complete version

โœจ Features

  • ๐ŸŒ 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

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 20.9 or higher
  • pnpm 9.0 or higher (recommended)

Note: The project has configured packageManager field, we recommend using pnpm for the best experience.

Installation

  1. Clone the repository:
git clone https://github.com/weijunext/nextjs-starter.git
cd nextjs-starter
  1. Enable Corepack (recommended):
corepack enable
  1. Install dependencies:
pnpm install
# or use other package managers
npm install
yarn
  1. Copy environment variables:
cp .env.example .env
  1. Start the development server:
pnpm dev
# or npm run dev

Visit http://localhost:3000 to view your application.

โš™๏ธ Configuration

  1. 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
  2. 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 from i18n/routing.ts instead of Next.js default

๐Ÿ“ Content Management

Blog Posts

Create MDX files in blog/[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.

Static Pages

Manage static page content in content/[page]/[locale].mdx.

๐Ÿ” SEO Optimization

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

๐Ÿ“Š Analytics

Enable analytics by adding IDs in .env:

NEXT_PUBLIC_GOOGLE_ANALYTICS=
NEXT_PUBLIC_BAIDU_TONGJI=
NEXT_PUBLIC_GOOGLE_ADSENSE=

๐Ÿ“ Project Structure

nextjs-starter/
โ”œโ”€โ”€ app/                      # App directory
โ”‚   โ”œโ”€โ”€ [locale]/            # Internationalized routes
โ”‚   โ”‚   โ”œโ”€โ”€ about/           # About page
โ”‚   โ”‚   โ”œโ”€โ”€ blog/           # Blog pages
โ”‚   โ”‚   โ””โ”€โ”€ ...              # Other pages
โ”‚   โ”œโ”€โ”€ api/                 # API routes
โ”‚   โ””โ”€โ”€ globals/             # Global components
โ”œโ”€โ”€ blog/                   # Blog content (MDX)
โ”‚   โ”œโ”€โ”€ en/                  # English blog
โ”‚   โ”œโ”€โ”€ ja/                  # Japanese blog
โ”‚   โ””โ”€โ”€ zh/                  # Chinese blog
โ”œโ”€โ”€ 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

๐Ÿ› ๏ธ Tech Stack

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS + Shadcn/ui
  • Internationalization: next-intl
  • Content: MDX
  • State Management: Zustand
  • Deployment: Vercel
  • Package Manager: pnpm (recommended)

๐Ÿš€ Deployment

One-Click Deploy

Deploy with Vercel

Manual Deployment to Vercel

  1. Push your code to GitHub
  2. Import project in Vercel
  3. Configure environment variables
  4. Deploy

Other Platforms

# Build for production
pnpm build

# Start production server
pnpm start

๐Ÿ’ก Development Best Practices

Package Manager

  • Project configured with packageManager: "pnpm@10.12.4"
  • Enable Corepack: corepack enable
  • Team members should use the same pnpm version

Code Quality

# Lint code
pnpm lint

# Type checking
pnpm type-check

Internationalization Development

  1. Adding new language support:

    • Add new language files in i18n/messages/
    • Update i18n/routing.ts configuration
    • Create corresponding language directories in blog/ and content/
  2. Using translations:

import { useTranslations } from 'next-intl';

export default function MyComponent() {
  const t = useTranslations('namespace');
  return <h1>{t('title')}</h1>;
}

๐Ÿ”ง Troubleshooting

Common Issues

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 to published

3. Internationalization routing issues

  • Use Link component from i18n/routing.ts
  • Check middleware.ts configuration

4. Styles not working

  • Verify Tailwind CSS class names are correct
  • Try restarting development server

Environment Variables

Ensure .env file contains necessary configuration:

# Copy example config
cp .env.example .env
# Modify as needed

๐Ÿ“„ License

MIT

๐Ÿค Contributing

Issues and Pull Requests are welcome!

About the Author

Next.js full-stack specialist providing expert services in project development, performance optimization, and SEO improvement.

For consulting and training opportunities, reach out at weijunext@gmail.com

Buy Me A Coffee

ko-fi

About

Lite version of the Nexty.dev SaaS Boilerplate based on Next.js. A multilingual Next.js 16 starter with built-in i18n support.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages