# xinliangnote/go-gin-api

基于 Gin 进行模块化设计的 API 框架，封装了常用功能，使用简单，致力于进行快速的业务研发。比如，支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用、cron 定时任务 等等。

Repository: https://github.com/xinliangnote/go-gin-api
Canonical: https://ross.abutalabs.com/products/go-gin-api
Homepage: https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5
Language: Go
License: MIT
License Family: permissive
Topics: golang, go, api-gin, gin, gin-api, jaeger, pprof, gorm, trace, graphql, prometheus, swagger, zap, viper, jwt, cron
Last push: 2023-12-23T00:57:01+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2567, "days_push": 985, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5975, forks 1123 (observed 2026-08-28T04:09:33.907686+00:00)

## What it is
A modular API framework built on the Gin web framework for Go, bundling common features like CORS, JWT auth, zap logging, Prometheus metrics, Swagger docs, GORM, GraphQL, and cron scheduling. It also includes an admin web UI and code generators to speed up business API development.

## Use cases
- scaffold a production-style REST API in Go
- build a Gin-based backend with JWT auth and CORS
- add Prometheus metrics and tracing to a Go API
- generate CRUD code and controllers from database tables
- learn how to structure a modular Gin project
- run scheduled jobs configurable from a web admin panel

## When to choose
- starting a new Go REST API and wanting batteries-included conventions
- teams that want enforced project structure and unified error codes
- learning resource for integrating Gin with common middleware

## When to avoid
- you need a minimal or highly customized architecture
- you require long-term guaranteed maintenance for production (README advises caution for production use)
- you prefer assembling your own middleware stack

## Facets
- artifact type: framework
- maturity: maintenance
- function: web-framework, api-framework, logging, monitoring, tracing, rate-limiting, orm, websocket, graphql, scheduling, middleware, documentation
- domain: web-development, backend, apis, developer-tools
- platform: go, cross-platform
- tags: gin, boilerplate, api-scaffold, chinese-documentation, code-generation, swagger, jwt, viper, zap, gorm, prometheus, web-server

## Member repositories
- xinliangnote/go-gin-api (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:33.907686+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:21:27.663029+00:00, confidence not recorded.
  - readme: https://github.com/xinliangnote/go-gin-api (fetched 2026-08-28T04:09:33.907686+00:00, sha 2b66b610dbf8)
  - homepage: https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5 (fetched 2026-08-29T08:46:01.096950+00:00, sha 77105db54b97)
- Data as of 2026-08-30T08:39:29.467469+00:00.
