{"id":13597906,"url":"https://github.com/buqiyuan/nest-admin","last_synced_at":"2025-05-15T06:03:36.762Z","repository":{"id":38240486,"uuid":"317828671","full_name":"buqiyuan/nest-admin","owner":"buqiyuan","description":"NestJS CRUD for RESTful API 使用 NestJS + Mysql + Typeorm + Redis + JWT + Swagger 企业中后台管理系统项目RBAC权限管理(细粒度到按钮)、实现单点登录等...","archived":false,"fork":false,"pushed_at":"2025-04-07T00:17:27.000Z","size":1218,"stargazers_count":1900,"open_issues_count":19,"forks_count":452,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-15T06:03:25.604Z","etag":null,"topics":["admin","mysql","nestjs","nestjs-admin","nestjs-backend","nestjs-starter-template","nestjs-template","rabc","restful-api","typeorm","vue3-typescript"],"latest_commit_sha":null,"homepage":"https://vue3-antdv-admin.pages.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buqiyuan.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,"zenodo":null}},"created_at":"2020-12-02T10:38:05.000Z","updated_at":"2025-05-14T08:11:39.000Z","dependencies_parsed_at":"2022-07-11T20:31:45.700Z","dependency_job_id":"60ae2704-37a9-4687-a659-7f9f160af7ee","html_url":"https://github.com/buqiyuan/nest-admin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buqiyuan%2Fnest-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buqiyuan%2Fnest-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buqiyuan%2Fnest-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buqiyuan%2Fnest-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buqiyuan","download_url":"https://codeload.github.com/buqiyuan/nest-admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254283336,"owners_count":22045140,"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":["admin","mysql","nestjs","nestjs-admin","nestjs-backend","nestjs-starter-template","nestjs-template","rabc","restful-api","typeorm","vue3-typescript"],"created_at":"2024-08-01T17:00:43.199Z","updated_at":"2025-05-15T06:03:36.741Z","avatar_url":"https://github.com/buqiyuan.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Nestjs"],"sub_categories":[],"readme":"# nest-admin\n\n![](https://img.shields.io/github/commit-activity/m/buqiyuan/nest-admin) ![](https://img.shields.io/github/license/buqiyuan/nest-admin) ![](https://img.shields.io/github/repo-size/buqiyuan/nest-admin) ![](https://img.shields.io/github/languages/top/buqiyuan/nest-admin)\n\n**基于 NestJs + TypeScript + TypeORM + Redis + MySql + Vue3 + Ant Design Vue 编写的一款简单高效的前后端分离的权限管理系统。希望这个项目在全栈的路上能够帮助到你。**\n\n- 前端项目地址：[传送门](https://github.com/buqiyuan/vue3-antdv-admin)\n\n## 演示地址\n\n\u003cul\u003e\n  \u003cli\u003e\n    \u003cdetails\u003e\n      \u003csummary\u003e\n        \u003ca href=\"https://vue3-antdv-admin.pages.dev/\" target=\"_blank\"\u003e\n        https://vue3-antdv-admin.pages.dev/\n        \u003c/a\u003e（墙内）\n      \u003c/summary\u003e\n      只读，可以完整地预览项目的初始效果\n    \u003c/details\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003cdetails\u003e\n      \u003csummary\u003e\n        \u003ca href=\"https://vue3-antd-admin.vercel.app/\" target=\"_blank\"\u003e\n        https://vue3-antd-admin.vercel.app/\n        \u003c/a\u003e（墙外）\n      \u003c/summary\u003e\n      \u003cul\u003e\n        \u003cli\u003e\n        可随意 CRUD，所以你看到的数据可能已经被其他人修改过，而非项目得初始效果，并且数据库的数据会在每天凌晨 4.30 分重置一次。\n        \u003c/li\u003e\n        \u003cli\u003e由于是白嫖的国外服务器资源，所以不保熟， 并可能还需要翻墙浏览。\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/details\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n   \u003ca href=\"https://nest-admin.buqiyuan.top/api-docs/\" target=\"_blank\"\u003e\n      Swagger 文档\n   \u003c/a\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n## 项目启动前的准备工作\n\n- sql 文件：[/deploy/sql/nest_admin.sql](https://github.com/buqiyuan/nest-admin/tree/main/deploy/sql/nest_admin.sql) 用于数据库初始化\n- 项目相关配置，如：配置 mysql 和 redis 连接\n  - 公共配置: [.env](https://github.com/buqiyuan/nest-admin/blob/main/.env)\n  - 开发环境: [.env.development](https://github.com/buqiyuan/nest-admin/blob/main/.env.development)\n  - 生产环境: [.env.production](https://github.com/buqiyuan/nest-admin/blob/main/.env.production)\n\n## 环境要求\n\n- `nodejs` `20`+\n- `docker` `20.x`+ ，其中 `docker compose`版本需要 `2.17.0`+\n- `mysql` `8.x`+\n- 使用 [`pnpm`](https://pnpm.io/zh/) 包管理器安装项目依赖\n\n演示环境账号密码：\n\n|   账号    |  密码  |    权限    |\n| :-------: | :----: | :--------: |\n| admin | a123456 | 超级管理员 |\n\n\u003e 所有新建的用户初始密码都为 a123456\n\n本地部署账号密码：\n\n|   账号    |  密码  |    权限    |\n| :-------: | :----: | :--------: |\n| admin | a123456 | 超级管理员 |\n\n## 快速体验\n\n启动成功后，通过 \u003chttp://localhost:7001/api-docs/\u003e 访问。\n\n```bash\npnpm docker:up\n# or\ndocker compose --env-file .env --env-file .env.production up -d --no-build\n```\n\n停止并删除所有容器\n\n```bash\npnpm docker:down\n# or\ndocker compose --env-file .env --env-file .env.production down\n```\n\n删除镜像\n\n```bash\npnpm docker:rmi\n# or\ndocker rmi buqiyuan/nest-admin-server:stable\n```\n\n查看实时日志输出\n\n```bash\npnpm docker:logs\n# or\ndocker compose --env-file .env --env-file .env.production logs -f\n\n```\n\n## 本地开发\n\n- 获取项目代码\n\n```bash\ngit clone https://github.com/buqiyuan/nest-admin\n```\n\n- 【可选】如果你是新手，还不太会搭建`mysql/redis`，你可以使用 `Docker` 启动指定服务供本地开发时使用, 例如：\n\n```bash\n# 启动MySql服务\ndocker compose --env-file .env --env-file .env.development run -d --service-ports mysql\n# 启动Redis服务\ndocker compose --env-file .env --env-file .env.development run -d --service-ports redis\n```\n\n- 安装依赖\n\n```bash\ncd nest-admin\n\npnpm install\n\n```\n\n- 运行\n  启动成功后，通过 \u003chttp://localhost:7001/api-docs/\u003e 访问。\n\n```bash\npnpm dev\n```\n\n- 打包\n\n```bash\npnpm build\n```\n\n## 数据库迁移\n\n1. 更新数据库(或初始化数据)\n\n```bash\npnpm migration:run\n```\n\n2. 生成迁移\n\n```bash\npnpm migration:generate\n```\n\n3. 回滚到最后一次更新\n\n```bash\npnpm migration:revert\n```\n\n更多细节，请移步至[官方文档](https://typeorm.io/migrations)\n\n\u003e [!TIP]\n\u003e 如果你的`实体类`或`数据库配置`有更新，请执行`npm run build`后再进行数据库迁移相关操作。\n\n## 系统截图\n\n![](https://s1.ax1x.com/2021/12/11/oTi1nf.png)\n\n![](https://s1.ax1x.com/2021/12/11/oTithj.png)\n\n![](https://s1.ax1x.com/2021/12/11/oTirHU.png)\n\n![](https://s1.ax1x.com/2021/12/11/oTia3n.png)\n\n### 欢迎 Star \u0026\u0026 PR\n\n**如果项目有帮助到你可以点个 Star 支持下。有更好的实现欢迎 PR。**\n\n### 致谢\n\n- [sf-nest-admin](https://github.com/hackycy/sf-nest-admin)\n\n### LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuqiyuan%2Fnest-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuqiyuan%2Fnest-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuqiyuan%2Fnest-admin/lists"}