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

inversitron

v0.5.12

Published

Simple framework based on InversifyJS

Downloads

38

Readme

Simple DDD based micro web framework.

Table of contents

About

Inversitron is a simple micro framework based on InversifyJS, TypeORM and Express, aiming to improve performance when building projects based on Domain Driven Design stategies, ensuring improvement on code style standards, provisioning good starting point to projects that will be using OOP as standard paradigm, helping with DDD approach setting up DI Container using the InversifyJS, give good starting point to API projects with AbstractController simple setup and all can be connected to PostgreSQL (currently this is the only option available, will be fixed soon) easily with TypeORM pre configured.

Getting Started

Install Inversitron as a dependency:

# locally
$ npm i inversitron
# or globaly
$ npm i -g inversitron

The Inversitron package comes with Inversitron, the framework itself thats used to build the application, and Tron, the CLI used to create, run and build inversitron applications.

Setup

To start a Inversitron application run:

$ npx tron init myapp
# or
$ tron init myapp

After running init command a simple setup will be added to the current work directory with a tronconfig.json file that provides Inversitron configuration about your application.

Running in development mode

Run the application in development environment using the Tron CLI:

$ npx tron dev
# or
$ tron dev

Build application for production

In order to build Inversitron application run the build command (currently unavailable):

$ npx tron build
# or
$ tron build

Usage examples

Assuming that all Getting Started setup steps are already done now is possibly to setup a Post example. In entities folder a Post.ts file could be added, and will be representating a database entity with the same structure like:

/* ----- src/entities/Post.ts ----- */

@Entity()
export class Post extends BaseEntity {
  @Column({ length: 100 })
  name: string
}

In order to use the created Post entity is needed the Repository, Service and Controller to provide a web interface to access it.

The PostRepository.ts will look like:

/* ----- src/repositories/PostRepository.ts ----- */

export class PostRepository extends AbstractRepository<Post> {
  constructor () {
    super(Post)
  }
}

The PostService.ts will look like:

/* ----- src/services/PostService.ts ----- */

export class PostService extends AbstractService<Example, PostRepository> {
  constructor (
    @inject(PostRepository)
    protected readonly postRepository: PostRepository
  ) { super(postRepository) }
}

And the PostController.ts as follow:

/* ----- src/controllers/PostController.ts ----- */

@controller('/post')
export class ExampleController extends AbstractController<Post, PostService> {
  constructor (
    @inject(PostService)
    protected readonly postService: PostService
  ) { super(postService) }
}

With all files you could run the application in development mode with Tron CLI and test the route in http://localhost:8080/api/post/getAll, the Abstract Controller/Service/Repository already has all code needed to the basic implementation of CRUD with the routes:

  • GET: /getAll
  • GET: /getById/:id
  • POST: /
  • PATCH: /
  • DELETE: /