React启动器

MERN-template — React 启动器模板

作者 krgamestudios

基于 MERN 技术栈的网站模板,面向持久化浏览器游戏(PBBG)开发,附带账号、新闻与聊天三个可选的微服务。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

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

值得关注的模板亮点

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

01

使用 React、Node.js、MariaDB(Sequelize)与 Docker Compose 构建的 MERN 模板

02

账号、新闻、聊天三个功能以独立微服务形式提供,可按需接入或移除

03

账号系统包含邮箱验证、JWT 认证、HttpOnly Cookie 与密码管理

04

聊天系统支持房间式聊天(/room name)并将聊天记录存入数据库

05

提供封禁、限时禁言与举报聊天内容等管理工具

06

附带 configure-script.js 配置脚本,可通过 Docker 完成部署

模板详细介绍

该模板使用 React、Node.js、MariaDB(通过 Sequelize)与 Docker Compose 构建,主要面向持久化浏览器游戏(PBBG,类似 Neopets 的玩法)的网站开发,也可用于其他用途。模板本身与配套的微服务可以分开使用:不接入某个微服务时,只需移除访问它的 React 组件即可。

仓库将账号系统、新闻博客和聊天系统拆分为三个独立的外部微服务,分别位于 news-server、auth-server 和 chat-server 仓库,并发布在 Docker Hub 上。账号系统包含邮箱验证、登录登出、账号删除、密码管理、JSON Web Token 认证、HttpOnly Cookie 以及可选的注册后验证钩子;新闻博客支持文章的发布、编辑与删除,并通过管理面板保护;聊天系统在登录后可用,支持基于房间的聊天(输入 /room name 进入指定房间),聊天记录写入数据库。模板还提供永久封禁用户、限时禁言和举报聊天内容等管理工具。

安装方面,仓库提供了 configure-script.js 配置脚本,可借助 Docker 完成部署,并可选创建默认管理员账号。开发模式需要本地运行 MariaDB、执行建库 SQL、安装依赖、复制 .envdev 为 .env 并填写配置,然后运行开发命令,微服务需各自重复该流程。README 中列出的“Coming Soon”与“Coming Eventually”条目(如文章独立页面、恢复已删除文章、撤销编辑、自定义表情、私信、排行榜与物品/商店/交易/货币后端等)属于尚未实现或计划中的内容,不应当作现有功能使用。完整文档位于 GitHub Wiki。

React启动器

适合你的项目吗?

适用场景

  • 开发持久化浏览器游戏(PBBG)类网站,需要账号、新闻与聊天等基础模块
  • 在已有 React 前端项目中按需接入账号、新闻或聊天微服务
  • 使用 Docker Compose 快速搭建一套可运行的 MERN 项目环境
  • 作为学习 MERN 与微服务拆分方式的参考项目

适合人群

  • 计划开发持久化浏览器游戏的个人或小团队
  • 需要现成账号与聊天模块的 React 项目开发者
  • 熟悉 Docker 与 Node.js、希望自行部署和修改代码的开发者

上手与定制指南

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

  1. 1

    部署方式:克隆仓库后运行 node configure-script.js,再执行 docker compose up --build

  2. 2

    开发模式需本地运行 MariaDB,并以 root 用户执行 tools/create_database.sql 建库

  3. 3

    开发模式需运行 npm install,将 .envdev 复制为 .env 并填写配置,然后执行 npm run dev

  4. 4

    默认开发访问地址为 http://localhost:3001

  5. 5

    账号、新闻、聊天微服务需分别按各自仓库的说明重复开发环境配置流程

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

  • 允许免费使用、修改和分发,包括商业应用。
  • 不得歪曲代码来源或声称自己编写了原始代码;修改过的源代码需明确标注。
  • 任何源代码分发不得移除或修改原许可声明;产品文档致谢属于建议,并非强制要求。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 账号、新闻、聊天三个功能以外部微服务形式提供,位于独立仓库并发布在 Docker Hub;不接入时需自行移除访问它们的 React 组件,模板本身不包含这些服务代码。
  • 开发模式下每个微服务需分别克隆、安装依赖、配置 .env 并单独运行,部署与维护成本高于单一应用。
  • 运行前必须自行填写 .env 配置(如数据库连接等),模板不提供可直接使用的默认生产配置。
  • 开发模式依赖本地已运行的 MariaDB 数据库,并需以 root 用户执行建库脚本。
  • 配置脚本可选创建默认管理员账号,启用后需自行管理该账号的凭据安全。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 Zlib 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

including commercial applications

许可证原文

These can be omitted entirely by simply removing the React components that access them.

README 原文

Repeat this process for each microservice (linked above)

README 原文

Run `cp .envdev .env` and enter your details into the `.env` file

README 原文

Ensure mariadb is running in your development environment

README 原文

A default admin account (if desired)

README 原文
https://github.com/krgamestudios/MERN-template/blob/main/LICENSEhttps://github.com/krgamestudios/MERN-template/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 87 / 100
技术栈
React
网站类型
启动器
这个分数如何计算

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

这个项目需要核对什么

记录的仓库更新时间
2026-09-29
截图检查日期
2026-10-02

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 8981d88e8270afdd38df994d19f5a3402754c763de2dc16ef7c884370643e6e3

2026-10-02T09:16:31.155Z

来源文件 / 仓库
(I am now *mirroring* to github from my private gitea, because mircrosoft is evil.)

# MERN-template

A website template using the MERN stack. It is geared towards Persistent Browser Based Games (think neopets), but is flexible enough for a number of different uses.

The primary technology involved is:

* React
* Nodejs
* MariaDB (with Sequelize)
* Docker (with docker compose)

This template is designed to support the development of persistent browser based games (PBBGs), but it, and it's component microservices, can be used elsewhere.

This template is released under the zlib license (see LICENSE).

See the [github wiki](https://github.com/krgamestudios/MERN-template/wiki) for full documentation.

# Microservices

There are external components to this template referred to as "microservices". These can be omitted entirely by simply removing the React components that access them. These are also available via [docker hub](https://hub.docker.com/u/krgamestudios).

* News Server: https://github.com/krgamestudios/news-server
* Auth Server: https://github.com/krgamestudios/auth-server
* Chat Server: https://github.com/krgamestudios/chat-server

# Setup Deployment

A clean install is this easy:

```
git clone https://github.com/krgamestudios/MERN-template.git
cd MERN-template
node configure-script.js
docker compose up --build
```

# Setup Development

To set up this template in development mode:

1. Ensure mariadb is running in your development environment
2. Run `mariadb tools/create_database.sql` as the root user
3. Run `npm install`
4. Run `cp .envdev .env` and enter your details into the `.env` file
5. Execute `npm run dev`
6. Navigate to `http://localhost:3001` in your web browser
7. Repeat this process for each microservice (linked above)

# Features List

- Mainly one language across the codebase (JavaScript)
- Full documentation
	- Setup tutorial
- Fully Featured Account System (as a microservice)
	- Email validation
	- Logging in and out
	- Account deletion
	- Password management
	- JSON web token authentication
	- HttpOnly cookies for security
	- Optional post validation hook
- Fully Featured News Blog (as a microservice)
	- Publish, edit or delete articles as needed
	- Secured via admin panel
- Fully Featured Chat System (as a microservice)
	- Available when logged in
	- Chat logs saved to the database
	- Room-based chat (type `/room name` to access a specific room)
- Moderation tools
	- Permanently banning users
	- Chat-muting users for a time period
	- Users reporting offensive chat-content
- Easy To Use Configuration Script
	- Sets up everything via docker
	- A default admin account (if desired)

# Coming Soon

- Full documentation
	- Modding tutorials
- Fully Featured News Blog (as a microservice)
	- Individual pages for news articles

# Coming Eventually

- Fully Featured News Blog (as a microservice)
	- Restore deleted articles
	- Undo edits
- Fully Featured Chat System (as a microservice)
	- Custom emoji
	- Private messaging
	- Broadcasting to all channels
	- Badges next to usernames
- Backend for leaderboards (modding tutorial?)
- Backend for energy systems (modding tutorial?)
- Backend for items, shops, trading and currency (modding tutorial?)
反馈内容错误

看看同类模板

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