{"id":21834248,"url":"https://github.com/lniche/aphrodite-go","last_synced_at":"2025-03-21T14:17:33.029Z","repository":{"id":259345486,"uuid":"864957333","full_name":"lniche/aphrodite-go","owner":"lniche","description":"Gin API Scaffold","archived":false,"fork":false,"pushed_at":"2025-02-06T01:23:55.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T02:33:34.334Z","etag":null,"topics":["api","gin","golang","scaffold"],"latest_commit_sha":null,"homepage":"","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/lniche.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-09-29T16:08:27.000Z","updated_at":"2025-02-06T01:23:58.000Z","dependencies_parsed_at":"2024-10-24T17:12:05.124Z","dependency_job_id":"6dd549ee-f6b1-4ca4-a6f9-7e8dfb092eb5","html_url":"https://github.com/lniche/aphrodite-go","commit_stats":null,"previous_names":["lniche/aphrodite-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lniche%2Faphrodite-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lniche%2Faphrodite-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lniche%2Faphrodite-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lniche%2Faphrodite-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lniche","download_url":"https://codeload.github.com/lniche/aphrodite-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244811375,"owners_count":20514276,"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":["api","gin","golang","scaffold"],"created_at":"2024-11-27T20:09:30.967Z","updated_at":"2025-03-21T14:17:32.984Z","avatar_url":"https://github.com/lniche.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aphrodite Gin API Scaffold\n\n[English](README.md) | [简体中文](README-zh.md)\n\nAphrodite is a template project based on [Nunu](https://github.com/go-nunu/nunu) to help developers get started quickly and gain a deep understanding of the framework's usage process. The project provides comprehensive sample code and configuration, covering common development scenarios for easy learning and practice. In addition, Aphrodite also includes container deployment templates, making the project easy to deploy and manage in a modern cloud environment, helping developers to efficiently build and release applications.\n\n## Tech Stack\n\n| Technology                                             | Description                                                                          |\n| ------------------------------------------------------ | ------------------------------------------------------------------------------------ |\n| [go-sqlmock](https://github.com/DATA-DOG/go-sqlmock)   | SQL simulation library for testing database interactions                             |\n| [lancet](https://github.com/duke-git/lancet/v2)        | A library that provides common tool functions to simplify Go development             |\n| [gin](https://github.com/gin-gonic/gin)                | High-performance web framework, HTTP-based RESTful API                               |\n| [sqlite](https://github.com/glebarez/sqlite)           | SQLite database driver, supports GORM                                                |\n| [gocron](https://github.com/go-co-op/gocron)           | Simple scheduled task scheduling library                                             |\n| [jwt](https://github.com/golang-jwt/jwt/v5)            | JWT authentication library for generating and verifying JSON Web Tokens              |\n| [mock](https://github.com/golang/mock)                 | Mock object generation tool for Go                                                   |\n| [wire](https://github.com/google/wire)                 | Dependency injection tool for automatically building Go dependencies                 |\n| [go-redis](https://github.com/redis/go-redis/v9)       | Redis client library, supporting asynchronous operations of Redis                    |\n| [sonyflake](https://github.com/sony/sonyflake)         | ID generator implemented by the snowflake algorithm                                  |\n| [viper](https://github.com/spf13/viper)                | Configuration management library, supporting configuration files in multiple formats |\n| [testify](https://github.com/stretchr/testify)         | Test framework, providing assertion, simulation and other functions                  |\n| [files](https://github.com/swaggo/files)               | Swagger file support                                                                 |\n| [gin-swagger](https://github.com/swaggo/gin-swagger)   | Swagger UI integration based on Gin                                                  |\n| [swag](https://github.com/swaggo/swag)                 | Tool for automatically generating Swagger documents                                  |\n| [zap](https://github.com/uber-go/zap)                  | High-performance logging library, supporting structured logging                      |\n| [crypto](https://golang.org/x/crypto)                  | Go's encryption library, providing multiple encryption algorithms                    |\n| [grpc](https://google.golang.org/grpc)                 | gRPC framework for efficient remote calls                                            |\n| [lumberjack](https://gopkg.in/natefinch/lumberjack.v2) | Log rotation library, supporting log file management                                 |\n| [gorm-mysql](https://gorm.io/driver/mysql)             | GORM's MySQL driver                                                                  |\n| [gorm-postgres](https://gorm.io/driver/postgres)       | PostgreSQL driver for GORM                                                           |\n| [gorm](https://gorm.io/gorm)                           | ORM framework for structured data, supporting multiple databases                     |\n\n## Features\n\n- **User authentication and authorization**: Provides basic user login and permission authorization functions.\n- **Distributed lock**: Distributed lock based on Redis to ensure resource security in a distributed environment.\n- **Middleware support**: Built-in commonly used middleware, including authentication, request log, cross-domain processing, etc.\n- **Unified output format**: Provides a simple and easy-to-use API Result unified output method, standardizes the API response format, and improves interface consistency.\n- **API modular design**: Supports modular API design, which is easy to expand and maintain.\n- **Swagger document integration**: Automatically generates API documents for front-end development and testing.\n\n## Structure\n\n```\n.\n├── api/        # API input/output definitions\n├── bin/        # Executable scripts\n├── cmd/        # Application entry points\n├── database/   # Database files\n├── deploy/     # Deployment files\n├── docs/       # Documentation\n├── internal/   # Core application code\n├── pkg/        # Shared modules\n├── storage/    # File storage\n├── tests/      # Tests\n└── README.md   # Project description\n```\n\n## Run Local\n\n```bash\n# 1. Clone the project code base\ngit clone https://github.com/lniche/aphrodite-go.git\ncd aphrodite-go\n\n# 2. Configuration file\ncd config\nmv config.yml.example config.yml\n\n# 3. Handle dependencies\n# Make sure you have installed the Go environment\ngo mod tidy\n\n# 4. Initialize the database\ndatabase/init.sql\n\n# 5. Start the service\n# Make sure nunu is installed in your environment\ngo install github.com/go-nunu/nunu@latest\nnunu run\n\n# generate swagger\nmake swag\nor use\nswag init  -g cmd/server/main.go -o ./docs --parseDependency\n```\n\n## Repo Activity\n\n![Alt](https://repobeats.axiom.co/api/embed/75f6227f2c9b38043ecc5b2c0c5dfacd5cd373cb.svg \"Repobeats analytics image\")\n\n## Contribution\n\nIf you have any suggestions or ideas, please create an Issue or submit a Pull Request directly.\n\n1. **Fork** this repository.\n2. **Create** a new branch:\n\n```\ngit checkout -b feature/your-feature\n```\n\n3. **Commit** your changes:\n\n```\ngit commit -m 'Add new feature'\n```\n\n4. **Push** to your branch:\n\n```\ngit push origin feature/your-feature\n```\n\n5. **Submit** a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Acknowledgements\n\nSpecial thanks to all contributors and supporters, your help is essential to us!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flniche%2Faphrodite-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flniche%2Faphrodite-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flniche%2Faphrodite-go/lists"}