{"id":44376903,"url":"https://github.com/hyp3rd/starter","last_synced_at":"2026-02-11T21:12:35.457Z","repository":{"id":328214257,"uuid":"1074213749","full_name":"hyp3rd/starter","owner":"hyp3rd","description":"A comprehensive starter template for Go projects with pre-configured tooling, linting, testing, and best practices.","archived":false,"fork":false,"pushed_at":"2026-02-02T23:23:56.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T10:32:56.796Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyp3rd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-11T11:07:55.000Z","updated_at":"2026-02-02T20:14:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hyp3rd/starter","commit_stats":null,"previous_names":["hyp3rd/starter"],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/hyp3rd/starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyp3rd%2Fstarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyp3rd%2Fstarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyp3rd%2Fstarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyp3rd%2Fstarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyp3rd","download_url":"https://codeload.github.com/hyp3rd/starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyp3rd%2Fstarter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29345433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-02-11T21:12:33.221Z","updated_at":"2026-02-11T21:12:35.451Z","avatar_url":"https://github.com/hyp3rd.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Project Starter Template\n\n[![lint](https://github.com/hyp3rd/starter/actions/workflows/lint.yml/badge.svg)](https://github.com/hyp3rd/starter/actions/workflows/lint.yml)\n\nOpinionated Go starter with Fiber v3, pre-commit hooks, linting, testing, proto tooling, Docker, and CI skeletons. Version pins in this template are intentional. Do not change them during setup.\n\n## Quick Start\n\n1. Clone and set your module name\n\n    ```bash\n    git clone https://github.com/hyp3rd/starter.git my-new-project\n    cd my-new-project\n    ./setup-project.sh --module github.com/your/module\n    ```\n\n1. Install toolchain (core). Proto tools stay optional.\n\n    ```bash\n    make prepare-toolchain\n    # If you need proto/gRPC/OpenAPI\n    PROTO_ENABLED=true make prepare-proto-tools\n    ```\n\n1. Run quality gates and sample app\n\n    ```bash\n    make lint\n    make test\n    make run   # serves /health on HOSTNAME:PORT (defaults localhost:8000)\n    ```\n\n1. Optional: Docker and Compose\n\n    ```bash\n    cp .env.example .env   # shared runtime config for compose/requests\n    docker build -t starter-app .\n    docker compose up --build\n    ```\n\n## What’s Included\n\n- Fiber v3 sample service with `/health`\n- Pre-commit hooks (gci, gofumpt, golangci-lint, tests, spell/yaml/markdown lint)\n- Make targets for lint/test/vet/security/proto\n- Proto tooling via buf (configs promoted from examples)\n- Dockerfile (multi-stage) and docker-compose.yml\n- GitHub Actions templates for lint, test+coverage, proto, security, and pre-commit\n- Dependabot for Go modules and GitHub Actions\n\n## Configuration \u0026 Customization\n\n- **Module path \u0026 imports**: `setup-project.sh` replaces `#PROJECT` in Makefile and hooks. If you change the module later, rerun the script with `--module`.\n- **Go version**: Target Go 1.25.x (keep pins as provided).\n- **GCI prefix**: Set by the setup script; defaults to `#PROJECT` (see `.project-settings.env`).\n- **Project settings**: `.project-settings.env` is the single source for tool versions, Go version, proto toggle, and GCI prefix; CI and hooks source it.\n- **Proto toggle**: Set `PROTO_ENABLED=false` in `.project-settings.env` to skip proto lint/format/CI. When enabled, run `make prepare-proto-tools`.\n- **Proto**: Copy/edit `api/core/v1/health.proto`. Generate stubs with `make proto`. Generated files land in `pkg/api/core/v1/`.\n- **HTTP request examples**: `requests/*.http` read variables from `requests/.env` (copy from `.env-example` or reuse the root `.env`). `health_get.http` hits `/health`.\n- **Docker**: Override `APP_VERSION`, `HOSTNAME`, `PORT` via `.env` (used by docker compose) or `docker run -e`. Healthchecks call `/health` via the app binary.\n\n## Make Targets (high level)\n\n- `prepare-toolchain` — install core tools (gci, gofumpt, golangci-lint, staticcheck, govulncheck, gosec)\n- `prepare-proto-tools` — install buf + protoc plugins (optional, controlled by PROTO_ENABLED)\n- `init` — run setup-project.sh with current module and install tooling (respects PROTO_ENABLED)\n- `lint` — gci, gofumpt, staticcheck, golangci-lint\n- `test` / `test-race` / `bench`\n- `vet`, `sec`, `proto`, `run`, `run-container`, `update-deps`, `update-toolchain`\n\nRun `make help` for the full list.\n\n## Platform Prerequisites\n\n- Go 1.25.x\n- Docker\n- Git\n- Python 3 + `pre-commit`\n- Optional proto toolchain (installed via `make prepare-proto-tools`)\n\n## CI/CD (templates)\n\n- `.github/workflows/lint.yml` — gofumpt, gci, staticcheck, golangci-lint (caches + tidy check)\n- `.github/workflows/test.yml` — unit tests (race + coverage artifact, caches)\n- `.github/workflows/proto.yml` — buf format/lint/generate (skips when `PROTO_ENABLED=false`)\n- `.github/workflows/security.yml` — govulncheck + gosec\n- `.github/workflows/pre-commit.yml` — pre-commit hooks on all files\n- `.github/dependabot.yml` — Go modules + GitHub Actions updates\n\n## Contribution Notes\n\n- Tests required for changes; run `make lint test` before PRs.\n- Suggested branch naming: `feat/\u003cscope\u003e`, `fix/\u003cscope\u003e`, `chore/\u003cscope\u003e`.\n- Update docs when altering tooling, Make targets, or setup steps.\n\n## Environment Files\n\n- `.project-settings.env` — versions and prefixes for tooling/CI/Docker.\n- `.env.example` — runtime defaults for the app/compose/requests. Copy to `.env` for local runs and docker compose. Copy to `requests/.env` if you prefer a dedicated file.\n\n## PR Expectations\n\n- CI jobs to pass: lint, test, security, pre-commit (and proto when `PROTO_ENABLED=true`).\n- Run `make lint test` locally before opening a PR; include docs updates when changing tooling or workflows.\n\n## Troubleshooting\n\n- **go.mod/go.sum changes after tidy**: run `go mod tidy`, commit the changes.\n- **Tool missing errors**: rerun `make prepare-toolchain` (or `prepare-proto-tools` for proto).\n- **Pre-commit slow**: run `pre-commit run --all-files` once to warm caches.\n\n## License\n\nGNU GPL v3. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyp3rd%2Fstarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyp3rd%2Fstarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyp3rd%2Fstarter/lists"}