Next.jsReact启动器

nextjs-pages-template — Next.js 启动器模板

作者 xi-Rick

基于 Next.js 13 pages 目录的起始模板,集成 NextUI、Tailwind CSS、TypeScript、MongoDB 与 Next-PWA,README 提供克隆、环境变量配置与 Vercel/Netlify 部署说明。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-14查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Next.js 13 并使用 pages 目录结构

02

集成 NextUI(v2)组件与 Tailwind CSS、Tailwind Variants

03

使用 TypeScript 与 Framer Motion,并通过 next-themes 支持主题切换

04

通过 MongoDB Node.js 驱动连接 MongoDB,README 要求配置 MONGODB_URI

05

集成 Next-PWA 以配置渐进式 Web 应用特性

06

README 提供 Vercel 与 Netlify 部署入口及环境变量提醒

模板详细介绍

这是一个面向 Next.js 13 的起始模板,采用 pages 目录结构组织页面。README 说明其集成 NextUI(v2)用于界面组件、Tailwind CSS 与 Tailwind Variants 用于样式、TypeScript 用于类型、Framer Motion 用于动画、next-themes 用于主题切换、MongoDB Node.js 驱动用于数据持久化,以及 Next-PWA 用于配置 PWA 特性。

使用流程上,README 给出克隆仓库、安装依赖、准备 MongoDB(本地或 MongoDB Atlas)、复制 .env.local.example 为 .env.local 并设置 MONGODB_URI、以 npm run dev 或 yarn dev 启动开发服务器的步骤。启动后终端会提示是否成功连接 MongoDB,据此可判断环境变量是否正确。部署方面,README 提供 Vercel 与 Netlify 的部署入口,并提醒在 Vercel 导入项目时需在 Environment Variables 中配置与 .env.local 一致的值。

README 未提供页面结构、路由清单、示例页面、组件用法、测试或性能相关的进一步说明,也未说明除 MONGODB_URI 之外的环境变量。模板以 MIT 许可证发布。

Next.js启动器

适合你的项目吗?

适用场景

  • 需要以 Next.js pages 目录方式启动新项目时作为初始代码库
  • 希望同时使用 NextUI 与 Tailwind CSS 构建界面时作为起点
  • 需要连接 MongoDB 并读取 MONGODB_URI 环境变量的项目
  • 计划为 Next.js 应用配置 PWA 特性时参考其集成方式
  • 准备部署到 Vercel 或 Netlify 并需要环境变量配置提示的场景

适合人群

  • 熟悉 Next.js 与 TypeScript、希望快速获得项目骨架的开发者
  • 需要 NextUI 与 Tailwind CSS 组合进行界面开发的团队
  • 使用 MongoDB 作为数据存储并自行管理连接字符串的项目
  • 需要 PWA 配置基础并计划部署到 Vercel 或 Netlify 的使用者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    克隆仓库到新目录:git clone https://github.com/xi-Rick/nextjs-pages-template.git "project-name"

  2. 2

    进入目录后执行 npm install 或 yarn install 安装依赖

  3. 3

    准备 MongoDB 数据库(本地或 MongoDB Atlas),并将 .env.local.example 复制为 .env.local

  4. 4

    在 .env.local 中设置 MONGODB_URI 为 MongoDB 连接字符串

  5. 5

    执行 npm run dev 或 yarn dev 启动开发服务器,默认地址为 http://localhost:3000;部署到 Vercel 时需在 Environment Variables 中配置相同变量

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 使用 MongoDB 数据库需自行准备:可本地部署,或使用 MongoDB Atlas(README 称可免费使用),模板本身不提供数据库服务。
  • 必须自行提供 MONGODB_URI 环境变量(MongoDB 连接字符串),否则应用无法连接数据库。
  • 部署到 Vercel 时需在 Environment Variables 中手动配置与 .env.local 一致的环境变量值。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Set up a MongoDB database either locally or with [MongoDB Atlas for free](https://mongodb.com/atlas).

README 原文

- `MONGODB_URI` - Your MongoDB connection string. If you are using [MongoDB Atlas](https://mongodb.com/atlas) you can find this by clicking the "Connect" button for your cluster.

README 原文

**Important**: When you import your project on Vercel, make sure to click on **Environment Variables** and set them to match your `.env.local` file.

README 原文
https://github.com/xi-Rick/nextjs-pages-template/blob/main/LICENSEhttps://github.com/xi-Rick/nextjs-pages-template/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-14。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 65 / 100
技术栈
Next.js · React
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2024-06-26
截图检查日期
2026-10-14

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15

查看当时使用的来源资料

SHA-256: b06719ac0dff450f776a8e971d036e1d8e19b9046276d4da760a45e9ff2616d3

2026-10-14T01:53:34.011Z

来源文件 / 仓库
# Next.js, NextUI, MongoDB and Next-PWA Template

This starter template offers a robust foundation for developing applications using Next.js 13, structured with a pages directory, featuring NextUI (v2) for seamless user interface design, MongoDB for data management, and Next-PWA for Progressive Web App (PWA) capabilities.

## Technologies Used

This template leverages several technologies and tools to help you kickstart your development:

- [Next.js 13](https://nextjs.org/docs/getting-started): A popular React framework for building fast, modern web applications.

- [NextUI](https://nextui.org): A UI framework that provides a wide range of pre-designed components for building elegant and responsive user interfaces.

- [Tailwind CSS](https://tailwindcss.com): A utility-first CSS framework that makes it easy to create custom styles and designs.

- [Tailwind Variants](https://tailwind-variants.org): An extension for Tailwind CSS to enable more control over styling variants.

- [TypeScript](https://www.typescriptlang.org): A statically typed superset of JavaScript for improved code quality and developer productivity.

- [Framer Motion](https://www.framer.com/motion): A popular animation library for adding smooth and interactive animations to your web application.

- [next-themes](https://github.com/pacocoursey/next-themes): A tool for adding theming support to your Next.js applications.

- [MongoDB](https://www.npmjs.com/package/mongodb): A Node.js driver for MongoDB, which allows you to connect and interact with MongoDB databases, providing data persistence for your application.

- [Next-PWA](https://www.npmjs.com/package/next-pwa): A package to configure Progressive Web App (PWA) features in your Next.js application, enabling better offline functionality and improved user experience.

## Getting Started

To use this template and create a new project, follow these steps:

1. Clone this repository into a new directory with the following command:

```bash
git  clone  https://github.com/xi-Rick/nextjs-pages-template.git  "project-name"
```

2. Install the required dependencies by running:

```
cd "project-name"
npm install
# or
yarn install
```

## Configuration

### Set up a MongoDB database

Set up a MongoDB database either locally or with [MongoDB Atlas for free](https://mongodb.com/atlas).

### Set up environment variables

Copy the `env.local.example` file in this directory to `.env.local` (which will be ignored by Git):

```bash
cp  .env.local.example  .env.local
```

Set each variable on `.env.local`:

- `MONGODB_URI` - Your MongoDB connection string. If you are using [MongoDB Atlas](https://mongodb.com/atlas) you can find this by clicking the "Connect" button for your cluster.

### Run Next.js in development mode

```bash
npm  run  dev
# or
yarn  dev
```

Your app should be up and running on [http://localhost:3000](http://localhost:3000)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions).

You will either see a message stating "You are connected to MongoDB" or "You are NOT connected to MongoDB". Ensure that you have provided the correct `MONGODB_URI` environment variable.

When you are successfully connected, you can refer to the [MongoDB Node.js Driver docs](https://mongodb.github.io/node-mongodb-native/3.4/tutorials/collections/) for further instructions on how to query your database.

## Deploy on Vercel

You can deploy this app to the cloud with [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https://github.com/xi-Rick/nextjs-pages-template) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/xi-Rick/nextjs-pages-template)

**Important**: When you import your project on Vercel, make sure to click on **Environment Variables** and set them to match your `.env.local` file.

## License

Licensed under the [MIT license](https://github.com/nextui-org/next-pages-template/blob/main/LICENSE).

![license](https://img.shields.io/npm/l/next-pwa.svg)
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。