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

generator-backdraft

v1.1.5

Published

Implying the tool's ability to forge and shape Node.js backend code.

Downloads

24

Readme

Backdraft Code Generator

npm version License

Welcome to the Backdraft Multi-Framework Generator! This powerful Yeoman generator allows you to effortlessly scaffold a fully customized Node.js application, offering flexible options for frontend frameworks and additional features, tailored to streamline your development process and enhance productivity.

Installation

First, install Yeoman and generator-backdraft using npm (we assume you have pre-installed node.js):

npm install -g yo
npm install -g generator-backdraft

Then generate your new project:
yo backdraft

Add .env file

Environment Configuration

Database Connection Strings

DATABASE_DEVELOPMENT || DATABASE_STAGING || DATABASE_PRODUCTION || DATABASE_LIVE2= # Connection string for the

JWT Configuration

TOKEN_SECRET= # Secret key used for signing JWT tokens

Application Configuration

APP_PORT=3000 # Port on which the application will run

Environment Setting

NODE_ENV='test' # Set the environment (options: development, staging, production, live2, test)

API Versioning

API_VERSION='v1' # Version of the API to be used

Then Run

npm start

Here are the comprehensive features of the Backdraft Multi-Framework Generator:

  • Predefined Templates: Quickly scaffold projects with built-in templates and structures for common project setups.
  • Customizable Prompts: Gather specific project information with customizable prompts for a tailored application setup.
  • Frontend Framework Support: Supports React, Angular, Next.js, and Vue, giving flexibility in frontend setup.
  • Backend Integration: Includes backend boilerplate setup with options for MongoDB and Mongoose integration.
  • Authentication API: Provides an option to add an authentication API, facilitating secure user management.
  • Tailwind CSS Integration: Optionally includes Tailwind CSS for streamlined frontend styling.
  • State Management: Supports state management tools like Redux (for React) and Vuex (for Vue).
  • Testing Tools: Integrates Jest for unit testing and Cypress for end-to-end testing setups.
  • Code Patterns Automation: Automates common code patterns for efficient development.
  • ESLint Setup: Configurable ESLint setup for both frontend and backend code quality assurance.
  • Extensibility: Easily extensible to include new templates, frameworks, and actions for evolving development needs.
  • Productivity Focused: Designed to streamline and enhance development workflows, maximizing productivity.

Project Structure

It will generate a Backend boilerplate project like this

1 - app_name/frontend

2 - app_name//backend

│
├── config/
│   └── database.js          # Configuration for database connection
│
├── controller/
│   └── user.js              # User-related controller logic
│
├── models/
│   └── user.js              # User model schema
│
├── routes/
│   ├── index.js             # Main application router
│   └── user.js              # User-related route definitions
│
├── services/
│   └── user.js              # User-related business logic
│
├── validators/
│   ├── joi.validators.js    # Validation schema using Joi
│   └── index.js             # Exported validation functions
│
├── index.js                 # Application entry point
└── package.json             # Node.js package configuration

Prompts

During project setup, you'll be prompted to answer a few questions to tailor the generated application to your needs.

  1. App Name

    • Type: Input
    • Name: name
    • Message: "App Name"
    • Default: "myapp"
    • Description: Enter the desired name for your application.
  2. App Description

    • Type: Input
    • Name: description
    • Message: "App Description"
    • Default: "My App"
    • Description: Provide a brief description of your application.
  3. Select a Frontend Framework

    • Type: List
    • Name: frontendFramework
    • Message: "Select a frontend framework:"
    • Choices: ["React", "Angular", "Next.js", "Vue"]
    • Description: Choose the frontend framework you want to use.
  4. Select Additional Features

    • Type: Checkbox
    • Name: features
    • Message: "Select additional features to include:"
    • Choices:
      • Tailwind CSS
      • Redux (for React)
      • Vuex (for Vue)
      • Jest Testing
      • Cypress Testing
    • Description: Choose additional features to include in your project.

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © NishikantaRay