好“哇塞”全栈博客系统,看看是怎么实现的吧?

646 阅读2分钟

只说重点,不说废话和解释,自己去看代码, 不贴大量的图片的,下面的demo链接都可以看。

1. 开发环境介绍

  • node 10.24.0

2. 体验demo

前端博客:demo (支持移动端访问)
admin系统: 游客模式访问. 账号:test 密码:0000
微信小程序搜索:10个肉包子 仓库代码地址

3. 功能

  1. 文章
  2. 分类
  3. 登录 注册
  4. 验证码(手机/邮箱)
  5. ip限流
  6. 评论回复(敏感词校验)

4. 技术栈

  1. PC博客: vue全家桶
  2. PC后台管理系统:react全家桶+antd
  3. 小程序端: mpvue
  4. 服务端:egg
  5. 服务器:Centos 2核2G5M pm2 nginx
  6. FTP: fileZilla

5. 特色功能

  1. 阿里云的短信服务
  2. 阿里云的文本服务
  3. IP限流处理(每日100次)
  4. 游客模式访问真实数据

6. 返回状态码

200 成功
201 结果校验失败
202 参数违法
300 无权限操作
401 没有权限
403 ip 被限流/被封
422 参数错误

7. 数据库结构

  1. 用户表 user
字段解释type枚举值
id主键int
nickname昵称string
username账号string登录账号(邮箱/手机号)
password密码string
root等级int0.默认 77.root
status用户状态int1.默认 0 禁用
create_time创建时间timestamp
update_time更新时间timestamp
  1. 文章表 article
字段解释type备注
id主键int
title文章标题string
author文章作者string
introduction文章介绍string
tag文章标签string
cover文章封面string
bucket目录层级string
content文章内容string数据字段为:text,长度 1000000
browser浏览次数int
is_del是否软删除int1 上架 2 下架
istop置顶int0 普通 1 置顶
create_time创建时间timestamp
update_time更新时间timestamp
  1. 文章分类表 category
字段解释type
id主键int
name名称string
create_time创建时间timestamp
update_time更新时间timestamp
  1. 文章评论
  • 4.1 评论表 comment
字段解释type
id主键int
article_id文章 idint
content内容string
user_id评论用户 idint
create_time创建时间timestamp
update_time更新时间timestamp
  • 4.2 回复表 reply
字段解释type
id主键int
comment_id评论 idint
content内容string
to_id目标用户 idint
from_id评论用户 idint
create_time创建时间timestamp
update_time更新时间timestamp
  1. 验证码表 code
字段解释type解释
id主键int
code名称string
username账号string
type类型int1 邮箱 2 短信
create_time创建时间timestamp
update_time更新时间timestamp
  1. IP 表 ip
字段解释type
id主键int
ip名称string [primary key]
client客户端string
day单日次数int
total总访问次数int
userId用户 idint
create_time创建时间timestamp
update_time更新时间timestamp