{"id":37100562,"url":"https://github.com/gopherd/core","last_synced_at":"2026-01-14T12:14:47.672Z","repository":{"id":251461618,"uuid":"837483291","full_name":"gopherd/core","owner":"gopherd","description":"A powerful Go library that provides a component-based development framework for building backend services.","archived":false,"fork":false,"pushed_at":"2024-10-24T12:18:29.000Z","size":446,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T12:41:47.739Z","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/gopherd.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-08-03T05:40:22.000Z","updated_at":"2024-10-24T12:18:32.000Z","dependencies_parsed_at":"2024-08-28T06:24:06.639Z","dependency_job_id":"ab9b2cc7-b248-4862-a40a-7ac036c176cb","html_url":"https://github.com/gopherd/core","commit_stats":null,"previous_names":["gopherd/core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gopherd/core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopherd%2Fcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopherd%2Fcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopherd%2Fcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopherd%2Fcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gopherd","download_url":"https://codeload.github.com/gopherd/core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopherd%2Fcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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-01-14T12:14:47.016Z","updated_at":"2026-01-14T12:14:47.642Z","avatar_url":"https://github.com/gopherd.png","language":"Go","readme":"# 🚀 gopherd/core\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/gopherd/core.svg)](https://pkg.go.dev/github.com/gopherd/core)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gopherd/core)](https://goreportcard.com/report/github.com/gopherd/core)\n[![codecov](https://codecov.io/gh/gopherd/core/branch/main/graph/badge.svg)](https://codecov.io/gh/gopherd/core)\n[![Build Status](https://github.com/gopherd/core/workflows/Go/badge.svg)](https://github.com/gopherd/core/actions)\n[![License](https://img.shields.io/github/license/gopherd/core.svg)](https://github.com/gopherd/core/blob/main/LICENSE)\n\n`gopherd/core` is a Go library that provides a component-based development framework for building backend services, leveraging the power of Go's generics. It's a modern, type-safe approach to creating scalable applications! 🌟\n\n## 🌟 Overview\n\nThis library offers a state-of-the-art mechanism for component-based development, enabling Go developers to create highly modular and maintainable backend services. By harnessing the power of `gopherd/core` and Go's generics, developers can:\n\n- 🧩 Easily create and manage type-safe components for various functionalities (e.g., database connections, caching, authentication)\n- 🔌 Implement a plugin-like architecture for extensible services with compile-time type checking\n- 🛠️ Utilize a set of fundamental helper functions to streamline common tasks, all with the benefits of generics\n\nThe component-based approach, combined with Go's generics, allows for better organization, reusability, and scalability of your Go backend services. It's like LEGO for your code, but with perfect fit guaranteed by the type system! 🧱✨\n\n## 🔥 Key Features\n\n- **Modern, generic-based architecture**: Leverage Go's generics for type-safe component creation and management\n- **Flexible configuration**: Load configurations from files, URLs, or standard input with type safety\n- **Template processing**: Use Go templates in your component configurations for dynamic setups\n- **Multiple format support**: Handle JSON, TOML, YAML, and other arbitrary configuration formats through encoders and decoders\n- **Automatic dependency injection**: Simplify component integration with built-in dependency resolution and injection\n\n## 📦 Installation\n\nTo use `gopherd/core` in your Go project, install it using `go get`:\n\n```bash\ngo get github.com/gopherd/core\n```\n\n## ⚡ Quick Start\n\nHere's a simple example showcasing the power of generics in our library:\n\n```go\n// demo/main.go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/gopherd/core/component\"\n\t\"github.com/gopherd/core/service\"\n)\n\n// helloComponent demonstrates the use of generics for type-safe options.\ntype helloComponent struct {\n\tcomponent.BaseComponent[struct {\n\t\tMessage string\n\t}]\n}\n\nfunc (c *helloComponent) Init(ctx context.Context) error {\n\tfmt.Println(\"Hello, \" + c.Options().Message + \"!\")\n\treturn nil\n}\n\nfunc init() {\n\tcomponent.Register(\"hello\", func() component.Component { return \u0026helloComponent{} })\n}\n\nfunc main() {\n\tservice.Run()\n}\n```\n\nYes, it's that simple and type-safe! 😮 With just these few lines of code, you can leverage the power of our generic-based, component-driven architecture. The simplicity of this example demonstrates how our library abstracts away the complexities of component management while maintaining type safety, allowing you to focus on building your application logic. Modern magic, right? ✨🔮\n\n### Basic Usage\n\nRun your application with a configuration file:\n\n```sh\n./demo app.json\n```\n\n\u003e Here's an example `app.json`\n\n```json\n{\n\t\"Components\": [\n\t\t{\n\t\t\t\"Name\": \"hello\",\n\t\t\t\"Options\": {\n\t\t\t\t\"Message\": \"world\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n### Load Configuration from Different Sources\n\n- From a file: `./demo app.json` 📄\n- From a URL: `./demo http://example.com/config/app.json` 🌐\n- From stdin: `echo '{\"Components\":[...]}' | ./demo -` ⌨️\n\n### Command-line Options\n\n- `-p`: Print the configuration 🖨️\n- `-t`: Test the configuration for validity ✅\n- `-T`: Enable template processing for component configurations 🧩\n\n## 🎓 Example Project\n\nFor a more comprehensive example of how to use `gopherd/core` in a real-world scenario, check out our example project:\n\n[https://github.com/gopherd/example](https://github.com/gopherd/example)\n\nThis project demonstrates how to build a modular backend service using `gopherd/core`, including:\n\n- Setting up multiple components\n- Configuring dependencies between components\n- Using the event system\n- Implementing authentication and user management\n\nIt's a great resource for understanding how all the pieces fit together in a larger application! 🧩\n\n## 📚 Documentation\n\nFor detailed documentation of each package and component, please refer to the GoDoc:\n\n[https://pkg.go.dev/github.com/gopherd/core](https://pkg.go.dev/github.com/gopherd/core)\n\n## 👥 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. Let's make this library even more awesome together! 🤝\n\n## 📜 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## 🆘 Support\n\nIf you encounter any problems or have any questions, please open an issue in this repository. We're here to help! 💪\n\n---\n\nWe hope you find `gopherd/core` valuable for your modern Go backend projects! Whether you're building a small microservice or a complex distributed system, `gopherd/core` provides the foundation for creating modular, maintainable, and efficient backend services with the power of generics. Welcome to the future of Go development! 🚀🎉","funding_links":[],"categories":["\u003ca name=\"Go\"\u003e\u003c/a\u003eGo"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopherd%2Fcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgopherd%2Fcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopherd%2Fcore/lists"}