{"id":15095950,"url":"https://github.com/sanjayheaven/ggb","last_synced_at":"2025-04-09T12:07:06.668Z","repository":{"id":216252078,"uuid":"740832504","full_name":"sanjayheaven/ggb","owner":"sanjayheaven","description":"Go Gin Boilerplate. A development boilerplate based on the Gin framework, aimed at helping developers quickly build and develop web applications.","archived":false,"fork":false,"pushed_at":"2024-02-07T03:16:41.000Z","size":13633,"stargazers_count":291,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T07:59:15.567Z","etag":null,"topics":["gin","gin-boilerplate","gin-template","go","go-gin","go-gin-boilerplate","go-gin-template","project-layout"],"latest_commit_sha":null,"homepage":"https://sanjayheaven.github.io/ggb/","language":"Go","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/sanjayheaven.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":"2024-01-09T06:47:48.000Z","updated_at":"2025-03-16T22:55:19.000Z","dependencies_parsed_at":"2024-06-21T15:29:48.830Z","dependency_job_id":"64964f21-5b42-41dd-8544-2786c4bceecc","html_url":"https://github.com/sanjayheaven/ggb","commit_stats":null,"previous_names":["sanjayheaven/go-gin-boilerplate","sanjayheaven/ggb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjayheaven%2Fggb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjayheaven%2Fggb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjayheaven%2Fggb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjayheaven%2Fggb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjayheaven","download_url":"https://codeload.github.com/sanjayheaven/ggb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598321,"owners_count":20641884,"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":["gin","gin-boilerplate","gin-template","go","go-gin","go-gin-boilerplate","go-gin-template","project-layout"],"created_at":"2024-09-25T15:44:12.360Z","updated_at":"2025-03-26T06:07:57.611Z","avatar_url":"https://github.com/sanjayheaven.png","language":"Go","funding_links":["https://ko-fi.com/dorvan","https://www.buymeacoffee.com/dorvan","https://ko-fi.com/J3J1T95FG'"],"categories":[],"sub_categories":[],"readme":"# Go Gin Boilerplate\n\n\u003cdiv\u003e\n\n\u003cimg src=\"./assets/golang.png\" align=\"right\"/\u003e\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/sanjayheaven/ggb)\n![CI](https://github.com/sanjayheaven/ggb/workflows/Go/badge.svg)\n![License](https://img.shields.io/github/license/sanjayheaven/ggb)\n\n## 📘 Documents\n\n- [Project Document](https://sanjayheaven.github.io/ggb/)\n- [Swagger Api Document](https://ggb.gganbu.services/swagger/index.html)\n\n\u003c/div\u003e\n\n## 🎬 Introduction\n\nA development boilerplate based on the Gin framework, aimed at helping developers quickly build and develop web applications.\n\n- [English](./README.md)\n- [中文介绍](./README_zh.md)\n\n## 👀 Keywords\n\n[Go](https://github.com/golang/go)\n[Gin](https://github.com/gin-gonic/gin)\n[Cobra](https://github.com/spf13/cobra)\n[Viper](https://github.com/spf13/viper)\n[Gorm](https://github.com/go-gorm/gorm)\n[Gin-Swagger](https://github.com/swaggo/gin-swagger)\n[Air](https://github.com/cosmtrek/air)\n[Logrus](https://github.com/sirupsen/logrus)\n[Lumberjack](https://github.com/natefinch/lumberjack)\n[Zap](https://github.com/uber-go/zap)\n[Jwt](https://github.com/golang-jwt/jwt)\n\n## ✨ Features\n\n- **Fast Development**: Using the **Gin** framework and related tools to speed up the development and iteration process of the project..\n- **Easy to use**: Follow the [project-layout](https://github.com/golang-standards/project-layout/tree/master) specification and provide a clear and simple code structure so that even beginners can easily get started.\n- **Advanced CLI**: Using **Cobra** to build modern command line tools to simplify project management and operations.\n- **Hot Reload**: Using **Air** tool, support hot reload, improve development efficiency.\n- **Logging system**: Integrated **Logrus**, **Zap** and **Lumberjack** to achieve all-round log recording and management.\n- **Database Support**: Integrated **Gorm**, support mainstream databases such as MySQL, PostgreSQL, etc.\n- **Flexible Middleware**: Integrate common middleware to easily implement functions such as logging, authentication, cross-domain, and flow control.\n- **API Document**: Use **Gin-Swagger** to generate API documents for easy viewing and debugging of interfaces.\n\n## 🚀 Quick Start\n\n```sh\ngit clone https://github.com/sanjayheaven/ggb.git\ncd ggb\ngo mod download\n```\n\n\u003c!-- ### Create a githooks soft link 【Recommended】\n\n```sh\ncd .git/hooks\nln -s ../../githooks/* .\n```\n\n\u003e Tips:\n\u003e\n\u003e - How to confirm that the creation is successful?\n\u003e\n\u003e Run the following command:\n\u003e\n\u003e ```sh\n\u003e ls -l . # Now your current directory location should be in the .git/hooks directory\n\u003e ```\n\u003e\n\u003e If successful, you will see the output containing the following content:\n\u003e\n\u003e ```sh\n\u003e commit-msg -\u003e ../../githooks/commit-msg\n\u003e pre-commit -\u003e ../../githooks/pre-commit\n\u003e ``` --\u003e\n\n### Configuration Setup\n\n- Navigate to the `configs` directory, copy the `config.example.yaml` file, and rename it to `config.yaml`.\n\n```sh\ncp configs/config.example.yaml configs/config.yaml\n```\n\n- Modify the configuration items in the `config.yaml` file.\n\n```sh\nvi configs/config.yaml\n```\n\n### Run the Application\n\n- Run the project using [air](https://github.com/cosmtrek/air) **【Recommended】**\n\n```sh\nair\n```\n\n- Run the project using [go run](https://golang.org/cmd/go/#hdr-Compile_and_run_Go_program)\n\n```sh\ngo run main.go server\n```\n\n\u003c!--\n## 🔨 打包\n\n```sh\nmake build\n``` --\u003e\n\n## 🔨 Build\n\n```sh\nmake build\n```\n\n## 🪤 Deployment\n\n### docker-compose\n\nDeploy the application using **_docker-compose_**.\nEnsure that Docker is installed on the server, and you are familiar with the usage of docker compose.\n\n- Copy the `deployments/docker-compose.yml` configuration file to the project root directory.\n- Execute the following command to start the application\n\n```sh\ndocker compose up -d\n```\n\n## 🤝 Support\n\n- Star 🌟 the project\n- Welcome to submit [issue](https://github.com/sanjayheaven/ggb/issues). Thank you for your support\n- Help promote it on social media and recommend it to friends\n\n  [![Twitter](https://img.shields.io/twitter/url?label=Twitter\u0026logo=twitter\u0026style=flat\u0026url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)\n  [![Facebook](https://img.shields.io/twitter/url?label=Facebook\u0026logo=facebook\u0026style=flat\u0026url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)\n  [![WhatsApp](https://img.shields.io/twitter/url?label=WhatsApp\u0026logo=whatsapp\u0026style=flat\u0026url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)](https://api.whatsapp.com/send?text=Wow:%20https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)\n  [![Telegram](https://img.shields.io/twitter/url?label=Telegram\u0026logo=telegram\u0026style=flat\u0026url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)](https://t.me/share/url?url=https%3A%2F%2Fgithub.com%2Fsanjayheaven%2Fggb)\n\n- You can also sponsor a cup of coffee on [Ko-Fi](https://ko-fi.com/dorvan) or [Buy Me A Coffee](https://www.buymeacoffee.com/dorvan)\n\n  \u003ca href='https://ko-fi.com/J3J1T95FG' target='_blank'\u003e\n  \u003cimg width=\"145\" height=\"40\" src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.buymeacoffee.com/dorvan\" target=\"_blank\"\u003e\n  \u003cimg width=\"145\" height=\"40\" src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" /\u003e\n  \u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjayheaven%2Fggb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjayheaven%2Fggb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjayheaven%2Fggb/lists"}