{"id":18914783,"url":"https://github.com/laaraujo/go-echo-api-sample","last_synced_at":"2025-10-05T17:23:41.973Z","repository":{"id":228720176,"uuid":"773648400","full_name":"laaraujo/go-echo-api-sample","owner":"laaraujo","description":"Go Echo API template with Docker, live reload, SQLC and Goose migrations","archived":false,"fork":false,"pushed_at":"2024-03-20T19:26:15.000Z","size":27,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T21:46:26.484Z","etag":null,"topics":["docker","docker-compose","echo","golang","goose","live-reload","sqlc"],"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/laaraujo.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-03-18T06:26:13.000Z","updated_at":"2024-09-21T19:15:13.000Z","dependencies_parsed_at":"2024-03-20T06:25:28.792Z","dependency_job_id":"1ce36581-0789-4e5b-a7af-246a8860599d","html_url":"https://github.com/laaraujo/go-echo-api-sample","commit_stats":null,"previous_names":["laaraujo/go-echo-api","laaraujo/go-echo-api-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laaraujo/go-echo-api-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fgo-echo-api-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fgo-echo-api-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fgo-echo-api-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fgo-echo-api-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laaraujo","download_url":"https://codeload.github.com/laaraujo/go-echo-api-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fgo-echo-api-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486611,"owners_count":25995006,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","docker-compose","echo","golang","goose","live-reload","sqlc"],"created_at":"2024-11-08T10:12:51.536Z","updated_at":"2025-10-05T17:23:41.955Z","avatar_url":"https://github.com/laaraujo.png","language":"Go","readme":"# Golang Echo API\n\nSample Rest API project I made while learning some Go and [Echo](https://echo.labstack.com/)\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Production Docker image](#production-docker-image)\n- [License](#license)\n\n## Overview\n\nThis project intends to serve as a template to kickstart Go API development with Echo framework.\n\n## Features\n\n- Database schema and migrations with [Goose](https://pressly.github.io/goose/)\n- Type-safe SQL interfaces with [sqlc](https://sqlc.dev/)\n- Local development setup with [Docker](https://www.docker.com/), [Docker Compose](https://docs.docker.com/compose/), [Make](https://www.gnu.org/software/make/manual/make.html)\n- Live reload with [Air](https://github.com/cosmtrek/air) in [Docker](https://www.docker.com/)\n- Very basic placeholder auth middleware with API_KEY\n\n## Installation\n\nSetup your local environment with the following commands\n```sh\n# Install goose and sqlc locally\n$ make setup\n# Build your containers\n$ make build\n```\n\n## Usage\n\n### Run locally\n```sh\n# Start your containers\n$ make run\n```\n\nThen in another shell:\n```sh\n# Update your database schema by applying the migrations\n$ make goose/migrate\n```\n\n### Create a new migration file\n```sh\n$ make goose/create\n```\n* Note: this will create a file with the default name `*_rename_this_file.sql` so you may want to rename it.\n\n### Generate SQLC types\n```sh\n$ make sqlc/generate\n```\n\n### Stop local containers\n```sh\n$ make stop\n```\n\n## Production Docker image\n\nIf you want to test your Docker image:\n\n```sh\n# Build your image\n$ docker build -f docker/Dockerfile -t golang-echo-api .\n```\n\n```sh\n# Replace the corresponding env vars and run it!\n$ docker run -p 8000:\u003cPORT\u003e -e PORT=\u003cPORT\u003e -e DATABASE_URL=\u003cdatabase_url\u003e -e API_KEY=\u003capi_key\u003e golang-echo-api\n```\n\n* If you want to use your local DB to test this build you can use [host.docker.internal](https://docs.docker.com/desktop/networking/#use-cases-and-workarounds) in your database url env var parameter (i.e. `-e DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres`)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaaraujo%2Fgo-echo-api-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaaraujo%2Fgo-echo-api-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaaraujo%2Fgo-echo-api-sample/lists"}