{"id":37136848,"url":"https://github.com/geshtng/go-base-backend","last_synced_at":"2026-01-14T15:57:07.276Z","repository":{"id":61628723,"uuid":"550791189","full_name":"geshtng/go-base-backend","owner":"geshtng","description":"Go backend clean architecture boilerplate.","archived":false,"fork":false,"pushed_at":"2024-08-22T02:13:27.000Z","size":136,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-25T18:39:14.348Z","etag":null,"topics":["architecture","article","backend","boilerplate","clean-architecture","database","gin","go","go-architecture","go-clean-architecture","go-rest-api","go-template","golang","gorm","grpc","mysql","postgresql","project-template","rest","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geshtng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-10-13T10:33:20.000Z","updated_at":"2024-11-04T08:02:18.000Z","dependencies_parsed_at":"2024-04-17T06:44:09.700Z","dependency_job_id":"f815ff76-f618-49c2-8fd5-30c9fafaac8a","html_url":"https://github.com/geshtng/go-base-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geshtng/go-base-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geshtng%2Fgo-base-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geshtng%2Fgo-base-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geshtng%2Fgo-base-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geshtng%2Fgo-base-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geshtng","download_url":"https://codeload.github.com/geshtng/go-base-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geshtng%2Fgo-base-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["architecture","article","backend","boilerplate","clean-architecture","database","gin","go","go-architecture","go-clean-architecture","go-rest-api","go-template","golang","gorm","grpc","mysql","postgresql","project-template","rest","rest-api"],"created_at":"2026-01-14T15:57:06.625Z","updated_at":"2026-01-14T15:57:07.265Z","avatar_url":"https://github.com/geshtng.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Focused on PostgreSQL database (master branch)\n\n# go-base-backend\n\n## Release List\n1. Database using PostgreSQL: master branch\n2. Database using MySQL: checkout branch [mysql](https://github.com/geshtng/go-base-backend/tree/mysql)\n3. Support for gRPC (database using PostgreSQL): checkout branch [grpc-postgresql](https://github.com/geshtng/go-base-backend/tree/grpc-postgresql)\n4. Support for gRPC (database using MySQL): checkout branch [grpc-mysql](https://github.com/geshtng/go-base-backend/tree/grpc-mysql)\n\n## Description\nExample implementation go backend (clean) architecture. It is very easy to configure.\n\nThis project has 4 domain layers:\n\n- Model\n  \u003cbr\u003e\n  This layer will save models that were used in the other domains. Can be accessed from any other layer and other domains.\n- Handler\n  \u003cbr\u003e\n  This layer will do the job as the presenter of the application.\n- Service\n  \u003cbr\u003e\n  This layer will do the job as a controller and handle the business logic.\n- Repository\n  \u003cbr\u003e\n  This layer is the one that stores the database handler. Any operation on database like querying, inserting, updating, and deleting, will be done on this layer.\n\n## Setup\n1.  Clone project.\n    ```bash\n    $ git clone https://github.com/geshtng/go-base-backend\n    ```\n2.  Init Database.\n    - Create a new database. Example database name: `go_base_backend`.\u003cbr\u003e\n    - After you run the server, it will automatically create tables and relations in the database `go_base_backend`.\u003cbr\u003e\n3.  Change config.\n\n    Make a new file named `config.yaml` inside the folder `/config`.\u003cbr\u003e\n    Use `config.yaml.example` to see the example or see the config sample below.\u003cbr\u003e\n    ```yaml\n    app:\n        name: go-base-backend\n\n    server:\n        host: localhost\n        port: 8080\n\n    database:\n        db_host: localhost\n        db_port: 5432\n        db_name: go_base_backend\n        db_username: postgres\n        db_password: postgres\n        db_postgres_ssl_mode: disable\n\n    jwt:\n        expired: 60\n        issuer: go-base-backend\n        secret: sKk6E5gpVD\n    ```\n\n## Run the Project\n   ```bash\n   $ make run\n   ```\n\n## API List\nYou can find API list on file `routes/routes.go`\n\n## Example API with Authentication\nI have set up an example of an API that uses authentication:\n```http\nGET localhost:8080/profiles\n```\n\n## Postman Collection\nImport files `go-base-backend.postman_collection.json` to your postman\n\n## Framework and Library\n  - [Gin](https://github.com/gin-gonic/gin)\n  - [Gorm](https://github.com/go-gorm/gorm)\n  - [Copier](https://github.com/jinzhu/copier)\n  - [Golang-jwt](https://github.com/golang-jwt/jwt)\n  - [Viper](https://github.com/spf13/viper)\n  - [Testify](https://github.com/stretchr/testify)\n  - [Go-Sqlmock](https://github.com/DATA-DOG/go-sqlmock)\n  - Other libraries listed in `go.mod`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeshtng%2Fgo-base-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeshtng%2Fgo-base-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeshtng%2Fgo-base-backend/lists"}