{"id":35672314,"url":"https://github.com/bborbe/skeleton","last_synced_at":"2026-01-05T19:03:28.818Z","repository":{"id":316579106,"uuid":"1063968205","full_name":"bborbe/skeleton","owner":"bborbe","description":"Project skeleton for a Golang service running in Kubernetes with Kafka","archived":false,"fork":false,"pushed_at":"2025-12-10T11:57:01.000Z","size":523,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-10T16:46:07.356Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bborbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T11:07:15.000Z","updated_at":"2025-12-10T11:57:04.000Z","dependencies_parsed_at":"2025-09-25T13:21:57.755Z","dependency_job_id":"c829ddc2-3bee-4561-8ea0-71470857e9a9","html_url":"https://github.com/bborbe/skeleton","commit_stats":null,"previous_names":["bborbe/skeleton"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/bborbe/skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fskeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fskeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fskeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fskeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bborbe","download_url":"https://codeload.github.com/bborbe/skeleton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fskeleton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28218049,"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":"2026-01-05T02:00:06.358Z","response_time":57,"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":"2026-01-05T19:01:53.300Z","updated_at":"2026-01-05T19:03:28.809Z","avatar_url":"https://github.com/bborbe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Microservice Skeleton\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/bborbe/skeleton.svg)](https://pkg.go.dev/github.com/bborbe/skeleton)\n[![CI](https://github.com/bborbe/skeleton/actions/workflows/ci.yml/badge.svg)](https://github.com/bborbe/skeleton/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bborbe/skeleton)](https://goreportcard.com/report/github.com/bborbe/skeleton)\n\n**A template/skeleton project for creating new Go microservices.** This project demonstrates patterns and integration of common technologies, serving as a copy-paste starting point for new services rather than a complete production implementation.\n\n---\n\n## Table of Contents\n\n* [Technologies Demonstrated](#technologies-demonstrated)\n* [Installation](#installation)\n* [Quick Start](#quick-start)\n* [Standard Endpoints](#standard-endpoints)\n* [Development Commands](#development-commands)\n* [Configuration](#configuration)\n* [Deployment](#deployment)\n  * [Kubernetes](#kubernetes)\n  * [Docker](#docker)\n* [Architecture](#architecture)\n* [API Documentation](#api-documentation)\n* [Testing](#testing)\n* [Usage as Template](#usage-as-template)\n* [License](#license)\n\n---\n\n## Technologies Demonstrated\n\n- **Go**: Modern Go service with proper project structure\n- **Docker**: Containerization with multi-stage builds\n- **Kubernetes**: Complete deployment manifests (Deployment/StatefulSet options)\n- **Kafka**: Message broker integration with producers/consumers\n- **BoltDB**: Local embedded database for persistent storage\n- **HTTP Services**: RESTful API with standard endpoints\n- **Monitoring**: Prometheus metrics and Sentry error tracking\n- **Security**: Comprehensive vulnerability scanning and license management\n\n---\n\n## Installation\n\nAs a template project, you typically copy this repository rather than installing it as a dependency. However, if you need to reference it:\n\n```bash\ngo get github.com/bborbe/skeleton\n```\n\n## Quick Start\n\n```bash\n# Install dependencies\nmake deps\n\n# Run the service locally\nmake run\n\n# Run full development workflow\nmake precommit\n```\n\n## Standard Endpoints\n\nThe service includes these standard endpoints:\n- `/healthz` - Health check\n- `/readiness` - Readiness check\n- `/metrics` - Prometheus metrics\n- `/resetdb` - Database reset\n- `/setloglevel/{level}` - Dynamic log level adjustment\n- `/testloglevel` - Test logging at all levels\n- `/sentryalert` - Test Sentry integration\n\n## Development Commands\n\n```bash\nmake ensure    # Dependency management (go mod tidy, verify)\nmake format    # Code formatting (gofmt, goimports-reviser, golines)\nmake generate  # Code generation\nmake test      # Run tests with coverage\nmake check     # Security and quality checks (vet, errcheck, vulncheck, osv-scanner, trivy)\nmake precommit # Complete development workflow\n```\n\n## Configuration\n\nConfiguration is managed through environment variables. See `example.env` for development defaults.\n\n### Runtime Configuration\n- `KAFKA_BROKERS` - Kafka broker addresses (default: localhost:9092)\n- `LISTEN` - HTTP server listen address (default: :8080)\n- `SENTRY_DSN` - Sentry error tracking DSN (required for production)\n- `SENTRY_PROXY` - Sentry proxy URL (optional)\n- `DATADIR` - Database storage directory (required)\n- `BATCH_SIZE` - Kafka batch consume size (default: 1)\n\n### Build/Deployment Configuration\n- `DOCKER_REGISTRY` - Docker registry for image publishing\n- `IMAGE` - Docker image name\n- `CLUSTER_CONTEXT` - Kubernetes cluster context\n- `BUILD_GIT_VERSION` - Build version (auto-set in CI/Docker)\n- `BUILD_GIT_COMMIT` - Build commit hash (auto-set in CI/Docker)\n- `BUILD_DATE` - Build timestamp (auto-set in CI/Docker)\n\n## Deployment\n\n### Kubernetes\nThe `k8s/` directory contains complete Kubernetes manifests:\n- Choose between Deployment (`skeleton-deploy.yaml`) or StatefulSet (`skeleton-sts.yaml`)\n- Service, Ingress, Secret, and User configurations included\n- **To activate**: Change replicas from 0 → 1\n- **For Deployment**: Delete StatefulSet manifest if using Deployment\n\n### Docker\nMulti-stage Docker build included. See `Dockerfile` and `Makefile.docker`.\n\n## Architecture\n\nStandard Go microservice architecture:\n- `main.go` - Application entry point with dependency injection\n- `pkg/factory/` - Factory functions for handler creation\n- `pkg/handler/` - HTTP handlers for various endpoints\n- Uses proven libraries for service framework, HTTP handling, Kafka, database, and monitoring\n\n## API Documentation\n\nFor complete API documentation of the handlers and packages, visit [pkg.go.dev](https://pkg.go.dev/github.com/bborbe/skeleton).\n\n---\n\n## Testing\n\nUses Ginkgo BDD framework with Gomega matchers. Run tests with `make test` or `ginkgo run ./...`.\n\nExample tests are included to demonstrate testing patterns - copy and adapt these when building your service.\n\n## Usage as Template\n\n1. Copy this repository as a starting point for your new service\n2. Update service name throughout (replace \"skeleton\")\n3. Modify handlers and add your business logic\n4. Update configuration in `example.env` and K8s manifests\n5. Implement your specific Kafka consumers/producers and database schema\n\n---\n\n## License\n\nBSD-style license. See [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborbe%2Fskeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbborbe%2Fskeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborbe%2Fskeleton/lists"}