{"id":36456947,"url":"https://github.com/mikros-dev/mikros","last_synced_at":"2026-02-05T19:07:08.291Z","repository":{"id":222062781,"uuid":"744155364","full_name":"mikros-dev/mikros","owner":"mikros-dev","description":"A framework to create micro services and applications in general, following an opinionated standard.","archived":false,"fork":false,"pushed_at":"2026-01-03T20:54:38.000Z","size":463,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T00:54:01.068Z","etag":null,"topics":["framework","golang","grpc","http","microservices"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikros-dev.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-16T18:20:54.000Z","updated_at":"2025-10-18T12:04:47.000Z","dependencies_parsed_at":"2024-04-05T13:26:48.590Z","dependency_job_id":"83cd42d0-5feb-4a1b-af61-10f8451bb2fa","html_url":"https://github.com/mikros-dev/mikros","commit_stats":null,"previous_names":["somatech1/mikros","mikros-dev/mikros"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/mikros-dev/mikros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikros-dev%2Fmikros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikros-dev%2Fmikros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikros-dev%2Fmikros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikros-dev%2Fmikros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikros-dev","download_url":"https://codeload.github.com/mikros-dev/mikros/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikros-dev%2Fmikros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29130119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T18:55:47.139Z","status":"ssl_error","status_checked_at":"2026-02-05T18:55:04.010Z","response_time":65,"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":["framework","golang","grpc","http","microservices"],"created_at":"2026-01-11T23:04:53.342Z","updated_at":"2026-02-05T19:07:08.267Z","avatar_url":"https://github.com/mikros-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mikros\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mikros.dev\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/mikros-dev/mikros/main/.assets/images/go-logo.png\" alt=\"mikros logo\" width=\"650\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003emikros is a Go framework for creating applications.\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/mikros-dev/mikros\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/mikros-dev/mikros.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://mikros.dev\"\u003e\u003cimg src=\"https://img.shields.io/badge/site-mikros.dev-blue\" alt=\"Docs\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/mikros-dev/mikros\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/mikros-dev/mikros\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/mikros-dev/mikros/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/mikros-dev/mikros?sort=semver\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/mikros-dev/mikros/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/mikros-dev/mikros\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\nThis framework is an API built to ease and standardize the creation of applications\nthat need to run for long periods, usually executing indefinitely, performing some\nspecific operation. But it also supports standalone applications that execute its\ntask and finish right after.\n\nIts main idea is to allow the user to create (or implement) an application, written\nin Go, of the following categories:\n\n* gRPC: an application with an API defined from a [protobuf](https://protobuf.dev) file.\n* HTTP (spec): an HTTP application with its API defined from a [protobuf](https://protobuf.dev) file.\n* HTTP (std): an HTTP application built directly with Go’s standard `net/http` library (routers, handlers, middlewares).\n* worker: a general-purpose application, without a defined API, with the ability to execute any code for long periods.\n* script: also a general-purpose application, without a defined API, but that only needs to execute a single function and stop.\n\n### Service\n\nService here is considered an application that may or may not remain running\nindefinitely, performing some type of task or waiting for commands to activate it.\n\nThe framework consists of an SDK that facilitates the creation of these applications\nin a way that standardizes their code so that they all perform tasks with the\nsame behavior and are written in a very similar manner. In addition to providing\nflexibility, allowing these applications to also be customized when necessary.\n\nBuilding a service using the framework's SDK must adhere to the following points:\n\n* Having a structure where mandatory methods according to its category must be implemented;\n* Initialize the SDK correctly;\n* Have a configuration file, called `service.toml`, containing information about itself and its functionalities.\n\n### Example of a service\n\nThe following example demonstrates how to create a service of a `script`\ntype. The `service` structure implements an [interface](apis/services/script/api.go)\nthat makes it being supported by this type of service inside the framework.\n\n```golang\npackage main\n\nimport (\n    \"context\"\n\n    \"github.com/mikros-dev/mikros\"\n    \"github.com/mikros-dev/mikros/components/options\"\n    logger_api \"github.com/mikros-dev/mikros/apis/features/logger\"\n)\n\n// service is a structure that will hold all required data and information\n// of the service itself. It is also the place to define all features that\n// the service will use.\ntype service struct {\n    Logger logger_api.LoggerAPI `mikros:\"feature\"`\n}\n\nfunc (s *service) Run(ctx context.Context) error {\n    s.Logger.Info(ctx, \"service Run method executed\")\n    return nil\n}\n\nfunc (s *service) Cleanup(ctx context.Context) error {\n    s.Logger.Info(ctx, \"cleaning up things\")\n    return nil\n}\n\nfunc main() {\n    // Creates a new service using the framework API.\n    svc := mikros.NewService(\u0026options.NewServiceOptions{\n        Service: map[string]options.ServiceOptions{\n            \"script\": \u0026options.ScriptServiceOptions{},\n        },\n    })\n\n    // Puts it to execute.\n    svc.Start(\u0026service{})\n}\n```\n\nIt must have a `service.toml` file with the following content:\n\n```toml\nname = \"script-example\"\ntypes = [\"script\"]\nversion = \"v1.0.0\"\nlanguage = \"go\"\nproduct = \"Matrix\"\n```\n\nWhen executed, it outputs the following (with a different time according to the execution):\n\n```bash\n{\"time\":\"2024-02-09T07:54:57.159265-03:00\",\"level\":\"INFO\",\"msg\":\"starting service\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159405-03:00\",\"level\":\"INFO\",\"msg\":\"starting dependent services\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159443-03:00\",\"level\":\"INFO\",\"msg\":\"service resources\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\",\"svc.http.auth\":\"false\"}\n{\"time\":\"2024-02-09T07:54:57.159449-03:00\",\"level\":\"INFO\",\"msg\":\"service is running\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\",\"service.mode\":\"script\"}\n{\"time\":\"2024-02-09T07:54:57.159458-03:00\",\"level\":\"INFO\",\"msg\":\"service Run method executed\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159464-03:00\",\"level\":\"INFO\",\"msg\":\"stopping service\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159467-03:00\",\"level\":\"INFO\",\"msg\":\"stopping dependent services\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159804-03:00\",\"level\":\"INFO\",\"msg\":\"cleaning up things\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n{\"time\":\"2024-02-09T07:54:57.159815-03:00\",\"level\":\"INFO\",\"msg\":\"service stopped\",\"service.name\":\"script-example\",\"service.type\":\"script\",\"service.version\":\"v1.0.0\",\"service.env\":\"local\",\"service.product\":\"Matrix\"}\n```\n\n## Roadmap\n\n* ~~Support for custom tags, key-value, declared in the 'service.toml' file, to be added in each log line.~~\n* ~~Support for receiving custom 'service.toml' definition rules.~~\n* ~~Support for HTTP services without being declared in a protobuf file.~~\n* ~~Remove unnecessary Logger APIs.~~\n\n## License\n\n[Mozilla Public License 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikros-dev%2Fmikros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikros-dev%2Fmikros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikros-dev%2Fmikros/lists"}