{"id":48966848,"url":"https://github.com/stormsidali2001/ioc-arise","last_synced_at":"2026-04-18T04:35:36.835Z","repository":{"id":300031477,"uuid":"999113828","full_name":"stormsidali2001/ioc-arise","owner":"stormsidali2001","description":"Arise type-safe IoC containers from your code. Zero overhead, zero coupling.","archived":false,"fork":false,"pushed_at":"2026-03-06T19:18:59.000Z","size":1826,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T17:42:43.843Z","etag":null,"topics":["ast","dependency-injection","ioc","nodejs","static-code-analysis","typescript"],"latest_commit_sha":null,"homepage":"https://ioc-arise.notjustcoders.com/","language":"TypeScript","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/stormsidali2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-06-09T18:59:20.000Z","updated_at":"2026-03-06T19:19:02.000Z","dependencies_parsed_at":"2025-06-19T14:47:21.277Z","dependency_job_id":"7a5f881c-0b79-491b-a0de-26db5fd5299c","html_url":"https://github.com/stormsidali2001/ioc-arise","commit_stats":null,"previous_names":["stormsidali2001/ioc-arise"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/stormsidali2001/ioc-arise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormsidali2001%2Fioc-arise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormsidali2001%2Fioc-arise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormsidali2001%2Fioc-arise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormsidali2001%2Fioc-arise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stormsidali2001","download_url":"https://codeload.github.com/stormsidali2001/ioc-arise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormsidali2001%2Fioc-arise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31957084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["ast","dependency-injection","ioc","nodejs","static-code-analysis","typescript"],"created_at":"2026-04-18T04:35:36.095Z","updated_at":"2026-04-18T04:35:36.813Z","avatar_url":"https://github.com/stormsidali2001.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoC Arise\n\n\u003e **A lightweight, type-safe dependency injection framework for TypeScript. Zero decorators, zero coupling, zero overhead.**\n\nA  dependency injection container framework that works standalone or with automated code generation. The core `@notjustcoders/di-container` package provides a powerful, type-safe DI runtime (~4KB), while the optional CLI tool automates container setup by analyzing your code and generating configuration.\n\n[![npm version](https://badge.fury.io/js/@notjustcoders%2Fdi-container.svg)](https://www.npmjs.com/package/@notjustcoders/di-container)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Documentation](https://img.shields.io/badge/docs-ioc--arise.notjustcoders.com-blue)](https://ioc-arise.notjustcoders.com)\n\n## Features\n\n- 🔒 **100% Type Safe** - Full TypeScript support with compile-time validation\n- 🪶 **Lightweight** - Only ~4KB with zero dependencies\n- 🚫 **Zero Decorators** - Pure TypeScript, no framework coupling\n- 💎 **Value Objects** - Inject plain objects and functional services\n- 🏭 **Factory Functions** - Custom instance creation logic\n- 🏗️ **Class Injection** - Traditional class-based dependency injection\n- 📐 **Abstract Classes** - First-class support for abstract base classes\n- 🏗️ **Modular Architecture** - Built-in module system\n- 🔄 **Lifecycle Management** - Singleton and Transient scopes\n- 🌐 **Universal Runtime** - Works in Node.js, Browser, Deno, Bun, Edge Workers\n\n## Table of Contents\n\n- [Installation](#installation)\n- [How It Works](#how-it-works)\n  - [Step 1: Write Your Code](#step-1-write-your-code-pure-typescript-no-decorators)\n  - [Step 2: Generate Your Container](#step-2-generate-your-container)\n  - [Step 3: All Your Code is Automatically Registered](#step-3-all-your-code-is-automatically-registered-)\n  - [Step 4: Use It with Full Type Safety](#step-4-use-it-with-full-type-safety)\n- [Documentation](#documentation)\n- [Links](#links)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install @notjustcoders/di-container\n```\n\n## How It Works\n\n### Step 1: Write Your Code (Pure TypeScript, No Decorators!)\n\nWrite your classes, interfaces, value objects, and factory functions in pure TypeScript:\n\n**Value Objects:**\n\n```typescript\n/**\n * @value\n */\nconst config: IConfig = { apiUrl: 'https://api.example.com' };\n\n/**\n * @value\n */\nconst userService: IUserService = {\n  getUser: (id: string) =\u003e Promise.resolve({ id, name: 'User' })\n};\n```\n\n**Factory Functions (Separate Parameters):**\n\n```typescript\n/**\n * @factory\n */\nfunction createService(repo: IRepo1, config: IConfig) {\n  return (userId: string) =\u003e {\n    if (config.environment === 'prod') {\n      return new ProductionService(repo, userId);\n    }\n    return new DevelopmentService(repo, userId);\n  };\n}\n```\n\n**Factory Functions (Context Object):**\n\n```typescript\n/**\n * @factory\n */\nfunction createTodoUseCase(\n  context: { userRepo: IUserRepository, todoRepo: ITodoRepository }\n) {\n  return (userId: string, title: string): void =\u003e {\n    const user = context.userRepo.getUser(userId);\n    console.log(`Creating todo for ${user}`);\n    context.todoRepo.saveTodo(title);\n  };\n}\n```\n\n**Classes:**\n\n```typescript\ninterface IService1 {\n  getData(id: string): Promise\u003cany\u003e;\n}\n\ninterface IRepo1 {\n  findById(id: string): Promise\u003cany\u003e;\n}\n\nclass Repo1 implements IRepo1 {\n  async findById(id: string) { /* ... */ }\n}\n\nclass Service1 implements IService1 {\n  constructor(private repo: IRepo1) {}\n  async getData(id: string) { /* ... */ }\n}\n```\n\n**Abstract Classes:**\n\n```typescript\nabstract class BaseRepo {\n  abstract findById(id: string): Promise\u003cany\u003e;\n}\n\nclass Repo1 extends BaseRepo {\n  async findById(id: string) { /* ... */ }\n}\n```\n\n### Step 2: Generate Your Container\n\nRun the CLI command to auto-generate, or type the container registration code manually:\n\n```bash\nnpx @notjustcoders/ioc-arise generate\n```\n\n### Step 3: All Your Code is Registered! ✨\n\n**If you used the CLI**, it analyzes your code and generates two files. **If you typed it manually**, you'll have the same structure:\n\n**`container.gen.d.ts`** - Type-safe registry interface:\n\n```typescript\n// container.gen.d.ts (auto-generated)\nimport type { IConfig } from './config';\nimport type { IUserService } from './userService';\nimport type { IService1 } from './services/IService1';\nimport type { IRepo1 } from './repositories/IRepo1';\nimport type { BaseRepo } from './repositories/BaseRepo';\n\nexport interface ContainerRegistry {\n  'IConfig': IConfig;\n  'IUserService': IUserService;\n  'IService1': IService1;\n  'IRepo1': IRepo1;\n  'BaseRepo': BaseRepo;\n}\n```\n\n**`container.gen.ts`** - Container with all registrations:\n\n```typescript\n// container.gen.ts (auto-generated)\nimport { Container, Lifecycle } from '@notjustcoders/di-container';\nimport type { ContainerRegistry } from './container.gen.d';\nimport { config } from './config';\nimport { userService } from './userService';\nimport { createService } from './createService';\nimport { Repo1, Service1 } from './classes';\n\nexport const container = new Container\u003cContainerRegistry\u003e();\n\n// All your value objects, factories, and classes are registered!\ncontainer.register('IConfig', { useValue: config });\ncontainer.register('IUserService', { useValue: userService });\ncontainer.register('IService1', { \n  useFactory: createService, \n  dependencies: ['IRepo1', 'IConfig'] \n});\ncontainer.register('IService1', { \n  useClass: Service1, \n  dependencies: ['IRepo1'],\n  lifecycle: Lifecycle.Singleton \n});\n// ... and more\n```\n\n### Step 4: Use It with Full Type Safety\n\n```typescript\nimport { container } from './container.gen';\n\nconst service = container.resolve('IService1');\n//    ^? IService1 - Full IntelliSense!\n```\n\n## Documentation\n\nFor comprehensive documentation and examples, visit **[ioc-arise.notjustcoders.com](https://ioc-arise.notjustcoders.com)**\n\n## Links\n\n- **Container Package**: [@notjustcoders/di-container](https://www.npmjs.com/package/@notjustcoders/di-container)\n- **CLI Tool**: [@notjustcoders/ioc-arise](https://www.npmjs.com/package/@notjustcoders/ioc-arise)\n- **GitHub**: [spithacode/ioc-maker](https://github.com/spithacode/ioc-maker)\n\n## License\n\nMIT © [NotJustCoders](https://notjustcoders.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormsidali2001%2Fioc-arise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstormsidali2001%2Fioc-arise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormsidali2001%2Fioc-arise/lists"}