{"id":14989352,"url":"https://github.com/lrunlin/blog","last_synced_at":"2025-05-15T08:04:00.291Z","repository":{"id":37751518,"uuid":"347067146","full_name":"Lrunlin/blog","owner":"Lrunlin","description":"使用Next.js+React.js+Koa+Typescript搭建的技术博客社区","archived":false,"fork":false,"pushed_at":"2025-02-26T07:05:09.000Z","size":19063,"stargazers_count":822,"open_issues_count":2,"forks_count":134,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-07T02:19:36.613Z","etag":null,"topics":["blog","koa","mysql","nextjs","nodejs","react","typescript"],"latest_commit_sha":null,"homepage":"https://blogweb.cn","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lrunlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-12T12:58:22.000Z","updated_at":"2025-04-04T12:40:07.000Z","dependencies_parsed_at":"2024-07-07T17:02:18.469Z","dependency_job_id":"41cf0ee3-1ee1-480f-ace7-ab8abd14ecd6","html_url":"https://github.com/Lrunlin/blog","commit_stats":{"total_commits":371,"total_committers":2,"mean_commits":185.5,"dds":0.05660377358490565,"last_synced_commit":"d334b7fbb742aa27eed70c811b491e1f618ab30a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lrunlin%2Fblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lrunlin","download_url":"https://codeload.github.com/Lrunlin/blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248869425,"owners_count":21174867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","koa","mysql","nextjs","nodejs","react","typescript"],"created_at":"2024-09-24T14:18:11.158Z","updated_at":"2025-04-14T11:23:31.686Z","avatar_url":"https://github.com/Lrunlin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 技术博客社区系统\n\n\u003cdiv align=center\u003e\n \u003cimg src=\"https://blogweb.cn/favicon.svg\" alt=\"Logo\" title=\"Logo\" /\u003e\n\u003c/div\u003e\n\n**关于前端 Next.js (2024/06)**\n前端由 pages router 切换至 app router，如果想要使用 pages router 的版本,可以克隆[pages router 的最后一个版本](https://github.com/Lrunlin/blog/commit/9d837612d2bbc50b80248ec06b8af04f9c5ecf01)\n\n```bash\ngit clone https://github.com/Lrunlin/blog.git\n```\n\n```bash\ncd blog\n```\n\n```bash\ngit checkout 9d837612d2bbc50b80248ec06b8af04f9c5ecf01\n```\n\n## 相关技术\n\n前端:Next.js (React.js 19、app router)  \n服务端:Koa2+Sequelize(ORM)  \n数据库:MySQL、Redis\n\n开发语言 TypeScript  \n组件库使用 Ant Design  \nCSS 方案 Tailwind CSS  \nReact 状态管理 Zustand\nOSS 支持阿里云和七牛云\n\n_系统支持 JWT 和 Session 两种鉴权方式因为系统拥有账号注销功能，而 JWT 是无服务器状态的所以推荐使用 Session 存储在 Redis 中。_\n\n## 联系方式\n\n可以开发其他项目、毕业设计、毕业论文等\n\n\u003cdiv\u003e\n    \u003cimg src=\"https://disk.blogweb.cn/me/qq.webp\"  width=160 alt=\"QQ\"\u003e\n    \u003cimg src=\"https://disk.blogweb.cn/me/wechat.webp\" width=160 alt=\"微信\"\u003e\n\u003c/div\u003e\n\n## 其他版本\n\n系统相对完善对博客网站所需的 SEO 有处理可以在生产环境中进行使用,也可以当做毕业设计，同时有毕业论文两篇。\n系统提供一 份用户端为 Vue3 的 CSR 版本(前端 Vue3,服务端 Node.js+TS+Sequelize) (非开源 QQ、微信联系)  \n以及一份[Next.js+Vue3+Express 版本](https://github.com/Lrunlin/web_blog \"个人博客\")（作者主页可见，开源） 全部有对应论文\n\n可联系 QQ:1974109227 微信:webzhizhuo\n\n## 相关链接\n\n1. **[博客预览地址:https://blogweb.cn](https://blogweb.cn \"作者个人博客\")**\n2. **[GitHub 仓库地址:https://github.com/Lrunlin/blog](https://github.com/Lrunlin/blog \"GitHub仓库作为主仓库\")**\n3. **[Gitee 仓库地址:https://gitee.com/awebcoder/blog](https://gitee.com/awebcoder/blog \"Gitee仓库只做同步镜像不进行其他操作\")**\n\n## 功能\n\n### 用户端\n\n1. 登录/注册/注销\n   1. 邮箱\n   2. GitHub(仅支持登录)\n2. 首页文章推荐\n3. 文章的增删改查，以及草稿箱功能\n4. 文章评论、点赞\n5. 设置/修改用户基本信息、展示作者基本社交平台账号\n6. 关注作者、收藏夹功能、收藏文章 以及对应的列表查询\n7. 站内信提醒设置(文章、评论)\n8. 文章发布数量、粉丝排行榜\n9. 文章页面主题模式(申请创建和使用)\n10. 问答-发起问题、采纳回答、回答问题\n\n### 管理系统\n\n1. 分页查询文章\n2. 可以查询指定文章信息并对其修改、删除\n3. 发布文章可以上传图片并对图片进行水印添加和压缩\n4. 可以添加、查询文章类型\n5. 可以简单获取服务器当前信息(大屏数据可视化)\n6. 可以查询用户留言进行并且删除\n7. 爬虫系统，自动文章(思否、掘金)抓取\n8. 推广内容的数据处理\n9. 评论管理\n10. 首页消息通知\n11. OSS 内图片处理\n12. 外链处理\n13. 友链处理\n\n### 环境变量\n\n1. client 文件夹在 env 文件夹中.env.production 文件并按照.env.development 填写完整\n2. server 文件夹在 env 文件夹中将 template 重命名为环境变量名(development/production)后补全内容\n\n### 启动\n\n#### 环境\n\n1. Node.js 20+\n2. MySQL 8.x\n3. Redis\n\n#### 启动步骤\n\n_如果在安装时出现了`sharp`插件安装失败的问题，可以翻墙使用代理节点重新执行`install`，或参考[sharp 文档中相关内容 chinese mirror](https://sharp.pixelplumbing.com/install#chinese-mirror)_\n\n1. 导入 SQL 文件\n2. npm install yarn -g _(如果有 yarn 请忽略)_\n3. 点击 install.bat 自动安装依赖 _(完成后关闭 cmd 窗口)_\n4. 点击 dev.bat 启动项目\n\n## 生产环境部署\n\n本站使用宝塔 Linux 进行网站部署,对于不同开发者来说生产环境服务器不同。如果你在项目部署时遇到了问题可以通过顶部的联系方式联系我。\n\n项目同时使用了 pm2 和 socket.io 所以 pm2 要替换为全局安装`@socket.io/pm2`，安装过程见 install.bat。详情见[scoket.io 官网相关内容](https://socket.io/zh-CN/docs/v4/pm2/) ,若在生产环境出现错误无法启动请检查 @socket.io/pm2 的安装情况。\n\n若出现 sharp 插件报错请根据报错信息检查 Node.js 版本或者排除是否需要根据信息安装 os=linux 版本的 sharp 插件。\n\n## 服务器推荐\n\n1. 服务器:[腾讯云](https://curl.qcloud.com/VEizLhRn \"腾讯云,轻量应用服务器\")（推荐）\n2. 服务器:[阿里云](https://www.aliyun.com/daily-act/ecs/activity_selection?userCode=46qdmkc0 \"阿里云,轻量应用服务器\")\n3. CDN/OSS:[七牛云](https://s.qiniu.com/NZ3Iz2 \"七牛云,CDN,OSS\")\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Lrunlin/blog\u0026type=Date)](https://star-history.com/#Lrunlin/blog\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrunlin%2Fblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flrunlin%2Fblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrunlin%2Fblog/lists"}