{"id":50189465,"url":"https://github.com/iamteppei/simple-di","last_synced_at":"2026-05-25T12:01:18.499Z","repository":{"id":359987092,"uuid":"1248256357","full_name":"iamteppei/simple-di","owner":"iamteppei","description":"A Simple Dependency Injection Framework","archived":false,"fork":false,"pushed_at":"2026-05-24T12:39:29.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T14:21:05.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamteppei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2026-05-24T11:59:45.000Z","updated_at":"2026-05-24T12:39:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iamteppei/simple-di","commit_stats":null,"previous_names":["iamteppei/simple-di"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iamteppei/simple-di","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamteppei%2Fsimple-di","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamteppei%2Fsimple-di/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamteppei%2Fsimple-di/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamteppei%2Fsimple-di/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamteppei","download_url":"https://codeload.github.com/iamteppei/simple-di/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamteppei%2Fsimple-di/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33473706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: 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-05-25T12:01:17.444Z","updated_at":"2026-05-25T12:01:18.493Z","avatar_url":"https://github.com/iamteppei.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-di\n\nA lightweight, modular dependency injection container for Java.\n\n[![CI](https://github.com/iamteppei/simple-di/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/iamteppei/simple-di/actions/workflows/ci-cd.yml)\n[![Java](https://img.shields.io/badge/java-21-blue)](#requirements)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)\n\n## Why simple-di\n\n- Small surface area and straightforward API.\n- Modular architecture with a clear split between API and implementation.\n- Designed for predictable lifecycle management and testability.\n\n## Project Status\n\n- Active prototype / proof-of-concept.\n- API and internals may still evolve.\n- Feedback and contributions are welcome.\n\n## Project Structure\n\n- `simple-di-api`: Public DI contracts and interfaces.\n- `simple-di-core`: Container implementation, module loader, bootstrap starter, and tests.\n\n## Requirements\n\n- JDK 21\n- Gradle Wrapper (included)\n\nThis project uses Java toolchains and can auto-download missing JDKs (configured in `gradle.properties`).\n\n## Build and Test\n\nBuild all modules:\n\n```bash\n./gradlew build\n```\n\nRun core tests:\n\n```bash\n./gradlew :simple-di-core:test\n```\n\nGenerate JaCoCo coverage report:\n\n```bash\n./gradlew :simple-di-core:jacocoTestReport\n```\n\nCoverage reports:\n\n- `simple-di-core/build/reports/jacoco/test/html/index.html`\n- `simple-di-core/build/reports/jacoco/test/jacocoTestReport.xml`\n\n## Quick Start\n\nTypical bootstrap flow:\n\n```java\nimport io.abc.platform.container.pure.impl.ContainerRunner;\nimport io.abc.shared.di.AppContext;\n\npublic class Main {\n    public static void main(String[] args) {\n        AppContext context = ContainerRunner.start(args);\n        // Resolve and use your beans from context.\n    }\n}\n```\n\n### Quick Start with ServiceLoader Modules\n\nYou can register modules using Java ServiceLoader so they are discovered automatically by `ContainerRunner.start(...)`.\n\n1. Create a module implementation and configure bindings:\n\n```java\npackage com.example;\n\nimport io.abc.shared.di.ConfigurableContext;\nimport io.abc.shared.di.ConfigurableModule;\nimport io.abc.shared.di.Scope;\n\npublic class GreetingModule implements ConfigurableModule {\n    @Override\n    public void configure(ConfigurableContext context) {\n        context.bind(GreetingService.class, DefaultGreetingService.class, \"greetingService\")\n            .scope(Scope.SINGLETON)\n            .usePostConstruct(service -\u003e service.warmUp())\n            .usePreDestroy(service -\u003e service.shutdown())\n            .usePostContainerInitialized(service -\u003e service.onContainerReady());\n\n        context.bind(TimeProvider.class, SystemTimeProvider.class, \"timeProvider\")\n            .factory(SystemTimeProvider::new)\n            .scope(Scope.PROTOTYPE);\n    }\n}\n```\n\n2. Add service registration file:\n\n`src/main/resources/META-INF/services/io.abc.shared.di.ConfigurableModule`\n\nwith content:\n\n```text\ncom.example.GreetingModule\n```\n\n3. Start the container:\n\n```java\nimport io.abc.platform.container.pure.impl.ContainerRunner;\nimport io.abc.shared.di.AppContext;\n\npublic class Main {\n    public static void main(String[] args) {\n        AppContext context = ContainerRunner.start(args);\n        // GreetingModule is auto-loaded from META-INF/services\n    }\n}\n```\n\n## Configuration and Conventions\n\nRoot Gradle and project configuration lives in:\n\n- `settings.gradle.kts`\n- `build.gradle.kts`\n- `gradle.properties`\n\nCore logging stack:\n\n- API: `org.slf4j:slf4j-api`\n- Backend: `ch.qos.logback:logback-classic`\n- Config: `simple-di-core/src/main/resources/logback.xml`\n\n## Roadmap\n\n- Stabilize public API for a first tagged release.\n- Expand usage examples and guides.\n- Add compatibility matrix and benchmark notes.\n- Improve publishing and release automation.\n\n## Contributing\n\nContributions are welcome.\n\nSuggested workflow:\n\n1. Fork and create a feature branch.\n2. Make focused changes with tests.\n3. Run `./gradlew build` locally.\n4. Open a pull request with a clear description.\n\nWhen adding or changing behavior, include or update tests in `simple-di-core/src/test/java`.\n\n## Code of Conduct\n\nPlease be respectful and constructive in all interactions.\n\nSee `CODE_OF_CONDUCT.md` for details.\n\n## Security\n\nIf you discover a vulnerability, please report it privately to the maintainers instead of opening a public issue.\n\nSee `SECURITY.md` for reporting guidance.\n\n## License\n\nThis project is licensed under the Apache License 2.0.\n\nSee `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamteppei%2Fsimple-di","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamteppei%2Fsimple-di","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamteppei%2Fsimple-di/lists"}