{"id":31917958,"url":"https://github.com/hiscaler/backend-skeleton","last_synced_at":"2025-10-13T20:52:03.145Z","repository":{"id":49836471,"uuid":"113291053","full_name":"hiscaler/backend-skeleton","owner":"hiscaler","description":"后台管理基础框架","archived":false,"fork":false,"pushed_at":"2020-09-15T18:58:29.000Z","size":3207,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-04T03:31:19.498Z","etag":null,"topics":["cms","php","yii","yii2"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"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/hiscaler.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}},"created_at":"2017-12-06T08:43:58.000Z","updated_at":"2023-08-04T03:31:19.499Z","dependencies_parsed_at":"2022-09-02T02:10:38.401Z","dependency_job_id":null,"html_url":"https://github.com/hiscaler/backend-skeleton","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/hiscaler/backend-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiscaler%2Fbackend-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiscaler%2Fbackend-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiscaler%2Fbackend-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiscaler%2Fbackend-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiscaler","download_url":"https://codeload.github.com/hiscaler/backend-skeleton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiscaler%2Fbackend-skeleton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016923,"owners_count":26085913,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cms","php","yii","yii2"],"created_at":"2025-10-13T20:51:53.512Z","updated_at":"2025-10-13T20:52:03.136Z","avatar_url":"https://github.com/hiscaler.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Backend Skeleton\n=================\n\nBackend Skeleton 旨在提供一个通用的后台管理程序，方便用于基于此基础上做拓展和开发。\n\n## 目录结构\n      assets/             包含资源文件路径定义\n      commands/           命令行脚本\n      config/             应用程序配置\n      controllers/        控制器\n      mail/               邮件模板视图\n      models/             模型类\n      modules/            模块\n      modules/admin       admin 管理模块\n      modules/api         api 模块\n      runtime/            运行时生成文件\n      tests/              测试文件\n      vendor/             第三方包\n      views/              视图文件\n      web/                包含入库文件以及资源文件\n\n## 环境要求\n最低要求 PHP\u003e=5.5.9 版本\n\n## 安装\n\n### 第一步：安裝第三方扩展\n\u003e 推荐使用[阿里源](https://developer.aliyun.com/composer)\n\u003e\n\u003e 全局配置：\n\u003e\n\u003e composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/\n\u003e\n\u003e 取消配置\n\u003e\n\u003e composer config -g --unset repos.packagist\n```bash\ncomposer install -vvv\n```\n\n### 第二步：创建数据库，并修改数据库配置信息\n`config/db.php`\n\n### 第三步 执行核心数据表迁移操作\n```bash\nyii migrate --migrationPath=@app/migrations\n```\n\n### 第四步：初始化数据\n```bash\nyii init\n```\n\n## 创建模块\n使用 Gii 创建您的模块，或直接复制 example 模块中的内容后做修改。\n\n## 创建模块数据库表迁移文件\n```bash\nyii migrate/create create_you-module-name_demo_table --migrationPath=@app/modules/admin/modules/YOU-MODULE-NAME/migrations\n```\n\n## 执行模块数据表迁移文件\n1. 通过后台的模块安装会同步执行数据表迁移文件的处理\n2. 执行如下语句\n```bash\nyii migrate --migrationPath=@app/modules/admin/modules/YOU-MODULE-NAME/migrations\n```\n\n## 注意\n1. 模块名称必须是唯一的，且只能由纯英文小写字母组成；\n2. 创建数据表迁移文件请记得带上模块名称最为前缀，比如\n```bash\nyii migrate/create create_you-module-name_demo_table --migrationPath=@app/modules/admin/modules/YOU-MODULE-NAME/migrations\n```\n如果开发的模块中只有一个表，且表名称和模块名同名，则可以不需要使用模块名作为前缀；\n\n## 接口开发\n接口代码文件的根目录位于 `/modules/api/modules/你的模块名称/` 下，后台启用模块后，系统将会自动处理 URL 访问规则，您只需要编写接口相关代码即可。\n\n比如您开发的模块名称为 demo, 您存放代码的位置则位于 /modules/api/modules/demo 目录，接口代码编写完毕后，使用 http://www.example.com/api/demo/控制起名称/动作名称 接口访问您编写的接口。\n\n在接口代码编写的时候，一般来说您的控制器继承于 `app\\modules\\api\\controllers\\BaseController` 即可，如果涉及到需要进行用户验证处理，您应该将继承的基类修改为 `app\\modules\\api\\controllers\\AuthController` 。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiscaler%2Fbackend-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiscaler%2Fbackend-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiscaler%2Fbackend-skeleton/lists"}