{"id":29901957,"url":"https://github.com/42lm/go-backend-skeleton","last_synced_at":"2025-08-01T15:16:09.201Z","repository":{"id":305748988,"uuid":"1021646565","full_name":"42LM/go-backend-skeleton","owner":"42LM","description":"A minimal Go backend skeleton with a focus on few dependencies.","archived":false,"fork":false,"pushed_at":"2025-07-21T19:24:15.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T21:26:20.352Z","etag":null,"topics":[],"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/42LM.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,"zenodo":null}},"created_at":"2025-07-17T18:05:02.000Z","updated_at":"2025-07-21T19:24:19.000Z","dependencies_parsed_at":"2025-07-21T21:26:22.563Z","dependency_job_id":"15c1771f-03d9-4cf5-bc3d-56d9fac84d23","html_url":"https://github.com/42LM/go-backend-skeleton","commit_stats":null,"previous_names":["42lm/go-backend-skeleton"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/42LM/go-backend-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42LM%2Fgo-backend-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42LM%2Fgo-backend-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42LM%2Fgo-backend-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42LM%2Fgo-backend-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/42LM","download_url":"https://codeload.github.com/42LM/go-backend-skeleton/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42LM%2Fgo-backend-skeleton/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268248987,"owners_count":24219561,"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-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2025-08-01T15:16:08.642Z","updated_at":"2025-08-01T15:16:09.187Z","avatar_url":"https://github.com/42LM.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-backend-skeleton\nThis repository acts as a template for a simple go backend with the focus on not using too much external dependencies.\n\nIt utilizes:\n* [spf13/cobra](https://github.com/spf13/cobra) to create a cli command to run the server\n* [vektra/mockery](https://github.com/vektra/mockery) to generate mocks from interfaces\n* [stretchr/testify](https://github.com/stretchr/testify) for simpler testing in general\n* [42lm/muxify](https://github.com/42LM/muxify) for a better handling of the default `*http.ServeMux`\n\n## Development\nCopy `.envrc.example`\n```sh\ncp .envrc.example .envrc\n```\n\u003e [!TIP]\n\u003e Use a tool like [direnv](https://github.com/direnv/direnv) to load and unload environment variables depending on the current directory.\n\nInstall tools (currently only mockery)\n```sh\ngo install tool\n```\n\nSetup DB (currently only dynamodb)\n```sh\ndocker compose up -d\n```\n\nRun tests\n```\ngo test ./...\n```\n\nRun server\n```sh\ngo run main.go server\n```\n\nMake a request\n```sh\ncurl localhost:8080/v1/none\n```\n\n```sh\ncurl localhost:8080/v1/msg/777\n```\n\n```sh\ncurl -X POST localhost:8080/v2/msg/777 -d '{\"msg\":\"test-msg\"}'\n```\n\n### Generate mocks + proto\nGenerate mocks from interfaces with [mockery](https://vektra.github.io/mockery/latest/installation/) and use \n```sh\ngo generate ./...\n```\n\n### Build\n```sh\ngo build -ldflags \"-X go-backend-skeleton/app/cmd.version=v0.0.0\" -o gbs\n```\n\n### Troubleshoot\nMake sure the following is installed on your machine. For more info check [protobuf](https://github.com/golang/protobuf).\n* `brew install protobug`\n* `brew install protoc-gen-go`\n* `brew install protoc-gen-go-grpc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F42lm%2Fgo-backend-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F42lm%2Fgo-backend-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F42lm%2Fgo-backend-skeleton/lists"}