finds.dev← search

// the find

xinliangnote/go-gin-api

★ 5,970 · Go · MIT · updated Dec 2023

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

A Gin-based API framework starter for Go that bundles a large number of common backend concerns — JWT, CORS, rate limiting, Prometheus, Swagger, cron, GraphQL, WebSocket — into a single opinionated project template. It's aimed at Go developers who want to skip the initial wiring phase and get to business logic faster, particularly teams used to the Chinese backend ecosystem (docs are primarily in Chinese, templates target Light Year Admin).

The component selection is sensible and covers what most internal APIs actually need — zap for structured logging, viper for config, gorm for the ORM, go-redis, Prometheus metrics, pprof. The cron scheduler has a web UI for configuration, which saves building admin tooling for a common pain point. There's a code generator for CRUD handlers and GORM models, which is genuinely useful when you're standing up a new resource. The project layout (cmd, internal, configs, deployments) follows established Go conventions rather than inventing something new.

Last commit was December 2023 and there's no indication of active maintenance — dependencies are likely stale and there are known vulnerabilities in older versions of several bundled packages. The documentation is almost entirely in Chinese, making it a rough starting point for non-Chinese teams despite the English README stub. The project conflates 'framework' and 'application' — it ships with a full admin panel, MySQL schema creation SQL, and a web installer, so you're forking an application rather than importing a library, which makes upgrades essentially impossible. GraphQL support appears to be a demo-level integration (single user schema) rather than something production-ready.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →