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 🙏

© 2024 – Pkg Stats / Ryan Hefner

shzam

v0.5.1

Published

Nodejs-expressjs starter kit with boilerplate code CLI

Downloads

15

Readme

Shzam

This is an open-source Project that provides a starter template for building Node.js with TypeScript. The project comes with a clean folder structure, ESLint, Prettier, and Jest, making it easy for developers to write clean and maintainable code while promoting best practices for new projects.

Getting Started

To get started with this project, follow the steps below:

  1. install the package npm i -g shzam
  2. To create project run shzam init
  3. If you are using the Nodejs/Expressjs template and would like to create a module with basic CRUD boilerplate, simply use the command shzam addApp.

Note

If you are using the Node.js/Express.js/MongoDB template, make sure to set up MongoDB and ensure that you provide the correct url, username, and password.

Currently supported

currently it only have 2 templates.

  1. Empty Template :- This template does not include any framework; it only has basic Node.js and TypeScript configurations.

  2. Nodejs/Expressjs :- This template comes with the basic configuration of Express.js and Node.js with TypeScript, along with some boilerplate code that can speed up the development process. Additionally, it also contains a test example.

  3. Module Generater :- You can easly create Modules with basic crud boiler plate by running shzam addApp.

Planned For the Future

  1. Graphql Support

  2. prisma Support

  3. Reactjs/Typescript boilerplate template

Design Pattern

We are promoting the use of the 'Repository pattern'. The Node.js/Express.js example project demonstrates the use of the boilerplate, and our aim is to minimize the amount of code that programmers need to write. I have come up with this folder structure based on my experience with different frameworks that I have used.

Folder structure

├── jest.config.ts
├── nodemon.json
├── src
│   ├── app.ts
│   ├── apps    // This were the modules goes
│   │   ├── Demo
│   │   │   ├── demo.controller.ts
│   │   │   ├── demo.router.ts
│   │   │   ├── demo.schema.ts
│   │   │   ├── index.ts
│   │   │   └── model
│   │   │       ├── index.ts
│   │   │       ├── model.ts
│   │   │       └── repository.ts
│   │   └── index.ts
│   ├── config.ts
│   ├── core
│   │   ├── ApiError.ts
│   │   ├── ApiResponse.ts
│   │   └── Logger.ts
│   ├── database.ts
│   ├── helpers
│   │   ├── asyncHandler.ts
│   │   ├── utils.ts
│   │   ├── validator.ts
│   │   └── withErrorHandling.ts
│   ├── server.ts
│   └── tests
│       ├── apps
│       │   └── demo.test.ts
│       └── setup.ts
└── tsconfig.json

Features

This project starter comes with the following features:

  • TypeScript: This project uses TypeScript, making it easy to write and maintain code.
  • Express: This project uses Express, a popular Node.js web framework. Clean Folder Structure: The project follows a clean folder structure that makes it easy to navigate and maintain.
  • ESLint: The project comes with ESLint, which helps identify and fix common code issues and maintain a consistent coding style.
  • Prettier: The project comes with Prettier, which ensures code formatting is consistent across the project.
  • Jest: The project comes with Jest, a popular testing framework for JavaScript.

License

This project is licensed under MIT licensed.