{"id":15095969,"url":"https://github.com/adamnasrudin03/go-template","last_synced_at":"2026-01-02T10:55:21.990Z","repository":{"id":241450691,"uuid":"805980038","full_name":"adamnasrudin03/go-template","owner":"adamnasrudin03","description":"This project is an example of a REST API project using the Go language and the implementation of other tools","archived":false,"fork":false,"pushed_at":"2024-07-19T01:56:27.000Z","size":347,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T03:34:21.099Z","etag":null,"topics":["basic-authentication","docker","email-verification","excel-export","gin-framework","gin-gonic","golang","gorm","jwt","jwt-auth","otp-verification","postgresql","rabbitmq","redis","redis-client"],"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/adamnasrudin03.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-05-26T02:53:12.000Z","updated_at":"2024-07-24T04:07:22.000Z","dependencies_parsed_at":"2024-05-28T12:27:43.886Z","dependency_job_id":"d1fa7d65-ec76-4ea5-95bc-1f2042ecb1c0","html_url":"https://github.com/adamnasrudin03/go-template","commit_stats":null,"previous_names":["adamnasrudin03/go-template"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnasrudin03%2Fgo-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnasrudin03%2Fgo-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnasrudin03%2Fgo-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnasrudin03%2Fgo-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamnasrudin03","download_url":"https://codeload.github.com/adamnasrudin03/go-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801609,"owners_count":20350106,"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":["basic-authentication","docker","email-verification","excel-export","gin-framework","gin-gonic","golang","gorm","jwt","jwt-auth","otp-verification","postgresql","rabbitmq","redis","redis-client"],"created_at":"2024-09-25T15:44:24.203Z","updated_at":"2026-01-02T10:55:21.949Z","avatar_url":"https://github.com/adamnasrudin03.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-template\n This project is an example of a REST API project using the Go language and the implementation of other tools, such as Auth with JWT, Basic Auth, Logger API, Cache, ORM SQL, Message Broker, Export Excel File, OTP Mechanism, Deploy with Docker, Clean Code (smell code checker by CodeScene), Unit Test, and so on.\n\n\n## Technology Used\n- Versioning using Git (See \u003ca href=\"https://git-scm.com/book/en/v2/Getting-Started-Installing-Git\" target=\"_blank\"\u003eGit Installation\u003c/a\u003e)\n- Programming Language using Go 1.22 or later. (See \u003ca href=\"https://golang.org/doc/install\" target=\"_blank\"\u003eGolang Installation\u003c/a\u003e)\n- DB using PostgreSQL 14 or later. (See \u003ca href=\"https://www.postgresql.org/download/\" target=\"_blank\"\u003ePostgreSQL Installation\u003c/a\u003e)\n- Migration using ORM GORM. (See \u003ca href=\"https://gorm.io/docs/migration.html\" target=\"_blank\"\u003eDocumentation\u003c/a\u003e)\n- Cache Using Redis. (See \u003ca href=\"https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/\" target=\"_blank\"\u003eRedis Installation\u003c/a\u003e)\n- Routing Using Gin (See \u003ca href=\"https://gin-gonic.com/docs/quickstart/\" target=\"_blank\"\u003eGin Framework Doc\u003c/a\u003e)\n- ORM Library using GORM. (See \u003ca href=\"https://gorm.io/docs/index.html\" target=\"_blank\"\u003eGORM Guides\u003c/a\u003e)\n- Auth using Golang-JWT. (See \u003ca href=\"https://github.com/golang-jwt/jwt\" target=\"_blank\"\u003eGolang-JWT Guides\u003c/a\u003e)\n- Message Broker using RabbitMQ. (See \u003ca href=\"https://www.rabbitmq.com/docs/download/\" target=\"_blank\"\u003eRabbitMQ Installation\u003c/a\u003e)\n- Clean Code check using CodeScene. (See \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=CodeScene.codescene-vscode\" target=\"_blank\"\u003eCodeScene\u003c/a\u003e)\n- Deploy using Docker. (See \u003ca href=\"https://docs.docker.com/desktop/\" target=\"_blank\"\u003eDocker Installation\u003c/a\u003e)\n\n## Feature\n| Method | Auth | Endpoint                                   | Dec                                                                   |\n| ------ | ---- | -------------------------------------------| --------------------------------------------------------------------- |\n| GET    | no   | /                                          | Welcome API                                                           |\n| POST   | no   | /api/v1/auth/sign-up                       | Register user with role USER                                          |\n| POST   | yes  | /api/v1/root/auth/sign-up                  | Register user with role USER or ADMIN, auth with super admin (root)   |\n| POST   | no   | /api/v1/auth/sign-in                       | Login                                                                 |\n| PATCH  | yes  | /api/v1/users/:id                          | Update User                                                           |\n| GET    | yes  | /api/v1/users/:id                          | Detail User                                                           |\n| GET    | yes  | /api/v1/users                              | List User, auth only admin or super admin (root)                      |\n| PATCH  | yes  | /api/v1/users/change-password/:id          | Change Password                                                       |\n| GET    | yes  | /api/v1/users/send-email-verify            | Send OTP Email verified                                               |\n| POST   | yes  | /api/v1/users/verified-email               | Verified email with otp                                               |\n| GET    | no   | /api/v1/users/request-reset-password/:id   | Send OTP Email forgot password                                        |\n| PATCH  | no   | /api/v1/users/validate-reset-password/:id  | Verified Reset password                                               |\n| GET    | yes  | /api/v1/logs                               | List log activity history                                             |\n| GET    | yes  | /api/v1/logs/download                      | Download xlx List log activity history                                |\n| GET    | yes  | /api/v1/message/translate/id               | Translate text to language id (indonesia)                             |\n| GET    | yes  | /api/v1/message/consumer                   | Trigger manual consume queue rabbitMQ                                 |\n\n### Role\n- ROOT  (role super admin) = create a user the first time the project is run, \u003ca href=\"https://github.com/adamnasrudin03/go-template/blob/main/pkg/seeders/user.go#L14\" target=\"_blank\"\u003e check here \u003c/a\u003e \n- ADMIN (role admin)\n- USER (role user)\n  \n\n## Development Guide\n\n### Documentations\n  \u003ca href=\"https://documenter.getpostman.com/view/10619265/2sA3Qzaooy\" target=\"_blank\"\u003e Postman API Documentation \u003c/a\u003e\n\n### Collection Using Postman\n- ./go-template.postman_collection.json\n  \n### Installation\n- Clone this repo\n\n    ```sh\n        git clone https://github.com/adamnasrudin03/go-template.git\n    ```\n\n- Copy `.env.example` to `.env`\n\n    ```sh\n        cp .env.example .env\n    ```\n- Setup local database\n- If you using RabbitMQ, Please check or create queue for \u003ca href=\"https://github.com/adamnasrudin03/go-template/blob/main/app/models/queue.go#L8\" target=\"_blank\"\u003e ./app/models/queue.go \u003c/a\u003e\n- Start service API\n    ```sh\n        go run main.go\n    ```\n\n## Build project by docker\n- check ip address in terminal\n    ```sh\n        ipconfig\n    ```\n- change data environment in file ./docker-compose.yml\n- build with docker compose\n\n    ```sh\n        docker-compose -f \"docker-compose.yml\" up -d --build \n    ```\n    - with make file\n    ```sh\n        make docker\n    ```\n\n## Coverage Unit Test\n  - with make file\n  ```sh\n      make cover\n  ```\n\n\n\n### Connect with me\n  \u003ca href=\"https://www.linkedin.com/in/adam-nasrudin/\" target=\"_blank\"\u003e\n    \u003cimg \n        src=\"https://img.shields.io/static/v1?message=LinkedIn\u0026logo=linkedin\u0026label=\u0026color=0077B5\u0026logoColor=white\u0026labelColor=\u0026style=for-the-badge\" \n        height=\"35\" alt=\"linkedin logo\"  /\u003e\n  \u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamnasrudin03%2Fgo-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamnasrudin03%2Fgo-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamnasrudin03%2Fgo-template/lists"}