npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dooboostore/simple-boot

v1.0.55

Published

A powerful and flexible framework for building robust applications with Dependency Injection, AOP, Routing, Caching, and more.

Readme

@dooboostore/simple-boot

NPM version Build and Test License: MIT

A decorator-driven application framework for TypeScript services with DI container, routing, intent events, lifecycle hooks, caching, and exception handling.


Features

  • Dependency injection with @Sim and runtime resolution through SimpleApplication.
  • Constructor parameter injection with @Inject.
  • Routing decorators (@Router, @Route) and route manager integration.
  • Intent publish/subscribe architecture for decoupled workflows.
  • Method-level caching with @Cache (key, delete, set, children-key strategies).
  • Lifecycle/event/exception decorators for robust service orchestration.
  • Root-first exports and explicit bundle-entry support.

Quick Start

npm install @dooboostore/simple-boot

Import Guide

Root import (recommended)

import { SimpleApplication, Sim, Inject, Router, Route } from '@dooboostore/simple-boot';

Bundle entry import

import { SimpleApplication } from '@dooboostore/simple-boot/bundle-entry';

Core Architecture

simple-boot is centered around SimpleApplication.

  • SimpleApplication owns container/runtime managers.
  • SimstanceManager manages registered sims and proxies.
  • RouterManager handles route resolution.
  • IntentManager handles event-like intent publish/subscribe.

Quick Start Example

import 'reflect-metadata';
import {
	SimpleApplication,
	Sim,
	Inject,
	Router,
	Route,
	Cache
} from '@dooboostore/simple-boot';

@Sim()
class UserRepository {
	findById(id: string) {
		return { id, name: 'dooboostore' };
	}
}

@Sim()
class UserService {
	constructor(@Inject() private readonly repo: UserRepository) {}

	@Cache({ key: (id: string) => `user:${id}`, ms: 30000 })
	getUser(id: string) {
		return this.repo.findById(id);
	}
}

@Sim()
@Router({ path: '/users' })
class UserController {
	constructor(@Inject() private readonly userService: UserService) {}

	@Route({ path: '/:id' })
	detail(intent: any) {
		const id = intent?.pathVariable?.id ?? 'unknown';
		return this.userService.getUser(id);
	}
}

const app = new SimpleApplication();
app.run();

const userService = app.getInstance(UserService);
console.log(userService.getUser('100'));

Public API Surface (Root)

  • SimpleApplication, SimOption
  • alert/*, cache/*, decorators/*, errors/*, fetch/*
  • intent/*, lifecycle/*, proxy/*, route/*, simstance/*, throwable/*, types/*
  • Core namespace re-export from @dooboostore/core/bundle-entry

Common Patterns

1) Resolve instance from container

const app = new SimpleApplication();
app.run();

const service = app.getInstance(MyService);

2) Intent publish

await app.publishIntent({ path: '/domain/user/created' }, { id: 'u-1' });

3) Route invoke

const result = await app.routing('/users/100');
console.log(result);

4) SimOption customization

import { SimpleApplication, SimOption } from '@dooboostore/simple-boot';

const app = new SimpleApplication(
	new SimOption({
		cache: { enable: true, ms: 60000 }
	})
);

app.run();

Best Practices

  • Import reflect-metadata once at application bootstrap.
  • Prefer root imports from @dooboostore/simple-boot.
  • Register services with @Sim and resolve through SimpleApplication.
  • Keep route handlers thin and delegate business logic to service sims.
  • Use explicit cache keys in @Cache for predictable invalidation.

Troubleshooting

Issue: DI target resolves as undefined
Solution: verify class is decorated with @Sim and app has executed run().

Issue: Decorators not working in runtime
Solution: ensure reflect-metadata is imported before decorated classes are evaluated.

Issue: Cache not applied
Solution: check SimOption.cache.enable and verify method is invoked through managed instance.

Issue: Routing not matched
Solution: verify @Router({ path }) + @Route({ path }) path composition and run sequence.

Learn More

The detailed API documentation, including all decorators and usage examples, is available on our documentation website.

Related Packages

License

This package is licensed under the MIT License.