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

backforge

v2.1.3

Published

A Command Line tool for creating a template of express api web server

Downloads

16

Readme

Backforge

Backforge is a templating tool designed for backend development, specifically for generating Express-based templates.

Getting Started

To get started with Backforge, open your command prompt and run one of the following commands using your preferred package manager:


    npx backforge
    #or
    yarn dlx backforge

After running the command, you may be prompted to answer a few questions in the terminal. Once completed, you'll have a ready-to-use Express template.

Module generation

Introducing new feature, Module Creation. This feature allows you to easily generate JavaScript and TypeScript modules with built-in CRUD operations and their corresponding routes.

How to Use

To create a module, run the following command from your project directory:

    npx backforge -m <module-name>
    #or if you have specific destination for modules
    npx backforge -m <module-name> -d <destination>

Naming Constraints

Please note that module names must adhere to the following rules:

  • The module name must not start with a number.
  • The module name must not contain any symbols
  • The destination is in path format(ex. path/to/modules)

Command options

    Usage: backforge [project-directory] [options]

    Options:
    -v, --version               Output the current version of backforge.
    -m, --module <module-name>  Creates a module for default express template of backforge
    -d, --dest <destination>    Destination path for module creation note: it does not work app generation
    -js, --javascript           Initialize express app with javascript template
    --basic                     Initialize with basic template of express app
    --disable-git               Skip initializing a git repository.
    -h, --help                  Display this help message.

Available templates

Backforge currently offers two types of templates:

  • basic

    • js
  • default

    • js
    • ts

basic template

The basic template includes the following file and folder structure:

basic
|
├── configs
|   ├── index.js(blank)
|   :
├── controllers
|   ├── test.controller.js
|   :
├── middleware
|   ├── security.middleware.js
|   :
├── models
|   ├── test.model.js
|   :
├── routes
|   ├── index.js
|   ├── test.route.js
|   :
├── utils
|   ├── utils.js(blank)
|   :
├── app.js
├── index.js
:
:

default template

The default template is available in both TypeScript and JavaScript and includes the following structure:

default
|
├── configs
|   ├── error.ts
|   :
├── middleware
|   ├── security.middleware.ts
|   :
├── modules
|   ├── users
|   |   ├── user.controller.ts
|   |   ├── user.model.ts
|   |   ├── user.route.ts
|   |   └── user.service.ts
|   :
├── routes
|   ├── index.ts
|   :
├── types
|   ├── response.type.ts
|   :
├── utils
|   ├── catchAsync.ts
|   ├── sendResponse.ts
|   :
├── app.ts
├── index.ts
:
:

Contributing

This project is open-source and backforge welcomes contributions from everyone! Whether you're a seasoned developer or just starting out, your ideas and input are invaluable. Join us in shaping the future of Backforge—let's build something amazing together!

To request new feature open an issue on github. Contribute by report an issue or creating a PR or bug fix to backforge.

See Contributing Guidelines for more information on how to get involved and how to get compensated

License

You can check out the full license here

This project is licensed under the terms of the MIT license.