{"id":19893188,"url":"https://github.com/atopx/carapi","last_synced_at":"2026-04-09T16:44:33.622Z","repository":{"id":144387910,"uuid":"379605628","full_name":"atopx/carapi","owner":"atopx","description":"自动生成Go RestfulAPI企业级项目脚手架代码，基于最佳实践","archived":false,"fork":false,"pushed_at":"2021-07-05T03:15:29.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T19:45:21.495Z","etag":null,"topics":["carapi","docker","fiber","gin","go","golang","iris","restful","restful-api","scaffold","swagger","web","webframework"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atopx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-23T13:04:56.000Z","updated_at":"2022-06-04T06:51:06.000Z","dependencies_parsed_at":"2023-04-26T10:08:44.587Z","dependency_job_id":null,"html_url":"https://github.com/atopx/carapi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atopx%2Fcarapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atopx%2Fcarapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atopx%2Fcarapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atopx%2Fcarapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atopx","download_url":"https://codeload.github.com/atopx/carapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241321962,"owners_count":19944056,"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":["carapi","docker","fiber","gin","go","golang","iris","restful","restful-api","scaffold","swagger","web","webframework"],"created_at":"2024-11-12T18:27:55.261Z","updated_at":"2026-04-09T16:44:28.596Z","avatar_url":"https://github.com/atopx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# carapi\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/yanmengfei/carapi)\n![Github report](https://img.shields.io/badge/go%20report-A%2B-green)\n[![GitHub stars](https://img.shields.io/github/stars/yanmengfei/carapi)](https://github.com/yanmengfei/carapi/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/yanmengfei/carapi)](https://github.com/yanmengfei/carapi/network)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/yanmengfei/carapi)\n[![GitHub issues](https://img.shields.io/github/issues/yanmengfei/carapi)](https://github.com/yanmengfei/carapi/issues)\n\n\n\u003e 自动生成Go RestfulAPI企业级项目脚手架代码，基于最佳实践\n\u003e \n\u003e 真正实现专注于业务逻辑的快速开发\n\u003e \n\u003e - 没有框架 == 爬着开发\n\u003e - 有了框架 == 走着开发\n\u003e - 复用项目 == 跑了起来\n\u003e - carapi   == 开车狂飙\n\n## TODO\n\n### 框架\n\n- [x] gin\n- [x] fiber\n- [ ] iris\n- [ ] beego\n\n### 数据库\n\n- [x] postgresql\n- [ ] mysql\n\n## 工具使用\n\n### 参数说明\n\n```\nNAME:\n   carapi - Create a scaffold for the gin framework\n\nUSAGE:\n   main.exe [global options] command [command options] [arguments...]\n\nVERSION:\n   0.1.1\n\nCOMMANDS:\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --name 项目名称, -n 项目名称    指定项目名称\n   --frame 框架              选择框架 [ gin fiber iris beego ], 默认gin (default: \"gin\")\n   --db 数据库                选择数据库 [ pgsql mysql ], 默认pgsql (default: \"pgsql\")\n   --output 项目路径, -o 项目路径  指定项目路径\n   --remote GIT地址          指定GIT地址\n   --docker                enable docker (default: false)\n   --compose               use docker compose (default: false)\n   --help, -h              show help (default: false)\n   --version, -v           print the version (default: false)\n```\n\n### 创建工程\n\n```bash\ngo get -u github.com/yanmengfei/carapi\ncarapi --name newapp --frame fiber --output /Users/yanmengfe/opensource --docker --compose\n```\n\n## 结构说明\n\n```shell\n+--- .git   # git初始化\n+--- .gitignore\n+--- config.toml # 配置文件\n+--- docker-compose.local.yaml # 本地docker启动\n+--- docker-compose.yaml # compose部署\n+--- release.sh  # 自动发布构建compose镜像脚本\n+--- services \n|   +--- app # code根目录\n|   |   +--- api # 接口\n|   |   |   +--- task.go\n|   |   |   +--- test.go\n|   |   +--- build.dockerfile # 构建发布docker image\n|   |   +--- config # 配置文件\n|   |   |   +--- config.go\n|   |   +--- docs # swagger\n|   |   |   +--- docs.go\n|   |   |   +--- swagger.json\n|   |   |   +--- swagger.yaml\n|   |   +--- go.mod\n|   |   +--- go.sum\n|   |   +--- local.dockerfile # 构建本地docker image\n|   |   +--- main.go # 程序入口\n|   |   +--- middleware  # 中间件\n|   |   |   +--- cors.go\n|   |   |   +--- logger.go\n|   |   |   +--- swagger.go\n|   |   +--- model  # 模型定义\n|   |   |   +--- base.go\n|   |   |   +--- task.go\n|   |   +--- public # 公共资源\n|   |   |   +--- const.go\n|   |   |   +--- handle.go\n|   |   |   +--- utils.go\n|   |   +--- schema # 参数校验\n|   |   |   +--- common.go\n|   |   |   +--- task.go\n|   |   +--- service # 逻辑代码\n|   |   |   +--- task.go\n|   |   +--- setup # 项目初始化配置\n|   |   |   +--- config.go\n|   |   |   +--- database.go\n|   |   |   +--- engine.go\n|   |   |   +--- logger.go\n|   |   |   +--- router.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatopx%2Fcarapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatopx%2Fcarapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatopx%2Fcarapi/lists"}