{"id":21151622,"url":"https://github.com/purposeinplay/go-starter","last_synced_at":"2025-03-14T14:26:14.372Z","repository":{"id":47760947,"uuid":"313224253","full_name":"purposeinplay/go-starter","owner":"purposeinplay","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-02T08:29:45.000Z","size":4933,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T02:12:12.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/purposeinplay.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}},"created_at":"2020-11-16T07:38:56.000Z","updated_at":"2021-10-02T08:29:49.000Z","dependencies_parsed_at":"2022-09-04T13:51:56.397Z","dependency_job_id":null,"html_url":"https://github.com/purposeinplay/go-starter","commit_stats":null,"previous_names":["oakeshq/go-starter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purposeinplay%2Fgo-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purposeinplay%2Fgo-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purposeinplay%2Fgo-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purposeinplay%2Fgo-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purposeinplay","download_url":"https://codeload.github.com/purposeinplay/go-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243591616,"owners_count":20315880,"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":[],"created_at":"2024-11-20T10:17:53.129Z","updated_at":"2025-03-14T14:26:14.353Z","avatar_url":"https://github.com/purposeinplay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"GoStarter\n==========\n\n\u003e This starter kit is designed to get you up and running with a project structure optimized for developing RESTful API services in Go. It is an opinionated Go starter kit built on top of Chi, using battle tested libraries proven to provide a good foundation for a project written in Golang.\n\n### Prerequisites\n\nThe codebase requires these development tools:\n\n* Go compiler and runtime: 1.15.2 or greater.\n* Docker Engine: 19.0.0 or greater.\n\n### Go Dependencies\n\nThe project uses Go modules which should be vendored:\n\n```shell\nenv GO111MODULE=on GOPRIVATE=\"github.com\" go mod vendor\n```\n\n### Configuration\n\nYou may configure GoStarter using either a configuration file named .env, environment variables, or a combination of both. Environment variables are prefixed with GoStarter, and will always have precedence over values provided via file.\n\n#### Server\n```properties\nSERVER_ADDRESS: localhost\nSERVER_PORT: 8080\n```\n\n`ADDRESS` - `string`\n\nHostname to listen on.\n\n`PORT` - `number`\n\nPort number to listen on. Defaults to `8080`.\n\n#### Database\n\n```properties\nDB_DRIVER: postgres\nDB_HOST: dbhost\nDB_USER: dbuser\nDB_PASSWORD: dbpassword\nDB_NAME: dbname\n```\n\n**UUID Type:** This project uses the `uuid-ossp` module to generate ids:\n\n```\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n```\n\n**Migrations Note** Migrations are not applied automatically, so you will need to run them after you've built GoStarter.\n* If built locally: `./go-starter migrate`\n* Using Docker: `docker run --rm go-starter ./go-starter migrate`\n\n### Start in Development\n\nThe recommended workflow is to use Docker and the compose file to build and run the service and resources.\n\n```shell\ndocker compose -f d8t/docker-compose.dev.yml up --build\ndocker exec -it go-starter-db psql -U gostarter -d gostarter\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\ndocker exec -it go-starter go run main.go migrate\n```\n\n__Hot Reloading:__ GoStarter uses Reflex in development for hot reloading.\n\n### Start In Production\n\n```shell\nmake image\n```\n\nnow run the image with (make sure you've run the migrations first)\n```shell\ndocker run -it go-starter\n```\n\n### Run Tests\nRunning the tests locally requires a valid database connection. Configure `config.test.yaml` with the appropriate values.\n\n```shell\nmake test-prepare\nmake test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurposeinplay%2Fgo-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurposeinplay%2Fgo-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurposeinplay%2Fgo-starter/lists"}