# young-steveo/bottlejs

A powerful dependency injection micro container for JavaScript applications

Repository: https://github.com/young-steveo/bottlejs
Canonical: https://ross.abutalabs.com/products/bottlejs
Language: JavaScript
License: MIT
License Family: permissive
Topics: dependency-injection, javascript, container, service-locator, decorators, middleware
Last push: 2026-04-15T10:02:33+00:00

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 77, release rhythm 8, longevity 100
- inputs: {"age_days": 4361, "days_push": 140, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1304, forks 63 (observed 2026-08-28T04:04:18.514899+00:00)

## What it is
BottleJS is a tiny dependency injection container for JavaScript applications, inspired by the AngularJS Module API and PHP's Pimple. It supports lazy loading, middleware hooks, decorators, and service registration in both browser and Node.js environments.

## Use cases
- manage dependency injection in a JavaScript app
- replace a kitchen-sink framework with composable components
- lazily instantiate services on first access
- register and resolve services with dependencies
- decouple objects using a service locator pattern
- add middleware hooks around service resolution

## When to avoid
- you are already using a framework with built-in DI like Angular or NestJS
- you need advanced features like scoped lifetimes or async injection
- you prefer compile-time type-based DI in TypeScript

## Facets
- artifact type: library
- maturity: maintenance
- function: middleware, plugin-system
- domain: developer-tools, web-development
- platform: browser, cross-platform
- tags: dependency-injection, service-locator, di-container, micro-library, lazy-loading, decorators, javascript, nodejs

## Member repositories
- young-steveo/bottlejs (main) score 57

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.514899+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:51:09.499997+00:00, confidence not recorded.
  - readme: https://github.com/young-steveo/bottlejs (fetched 2026-08-28T04:04:18.514899+00:00, sha 96a06ebc60ba)
  - registry_npm: https://registry.npmjs.org/bottlejs (fetched 2026-08-29T12:09:24.044362+00:00, sha 0c3f7e1dd283)
- Data as of 2026-08-30T08:39:29.467469+00:00.
