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

@saboosanket/code-generator

v1.0.2

Published

This npm package is a versatile setup tool tailored for Node.js projects, enabling users to generate customized project structures and functionalities. It supports integration with Google Cloud Platform (GCP), RabbitMQ, a Prisma query generator, and a rob

Downloads

189

Readme

Code Generator

This npm package is a versatile setup tool tailored for Node.js projects, enabling users to generate customized project structures and functionalities. It supports integration with Google Cloud Platform (GCP), RabbitMQ, a Prisma query generator, and an HTTP module, streamlining the development process and enhancing project efficiency.

Key Features

  • GCP Integration: Add Google Cloud Platform (GCP) functionalities to your project.
  • RabbitMQ Integration: Seamlessly integrate RabbitMQ, a message broker for managing message queues.
  • HTTP Module for API Management: Generate a module that handles API requests with features like retries, backoff, and more.
  • Prisma Model CRUD Operations:
    • Automate the generation of CRUD operations with pagination support for a specific Prisma model.
    • Optionally generate CRUD operations for all models defined in the Prisma schema.
  • Interactive CLI: The CLI offers a simple, user-friendly interface with real-time feedback and validation.

Installation

To install the package, use the following command:

npm install @saboosanket/code-generator

Usage

Once installed, you can run the CLI to set up the desired project structure by executing the following command at the root layer where we have prisma folder in case of query generation else in root level where entry point is present:

npx @saboosanket/code-generator

Folder Structure

project-root/
│
├── README.md                # Project documentation
├── app.js                   # Main application entry point
├── controllers/             # Controllers for handling requests
├── middlewares/             # Middleware functions
├── node_modules/            # Node.js dependencies
├── package.json             # Package metadata and dependencies
├── package-lock.json        # Exact versions of package dependencies
├── prisma/                  # Prisma schema and migrations
├── rabbitMQ/                # RabbitMQ integration and related files
├── routes/                  # API route definitions
├── services/                # Business logic and service layer
├── validations/             # Validation schemas and logic

CLI Prompts

The CLI will guide you through a series of prompts where you can select the features you want to include in your project:

  1. Cloud Provider: Choose to add GCP functionality.
  2. RabbitMQ: Opt-in for RabbitMQ integration.
  3. HTTP Module: Decide if you want the HTTP module to manage API calls with built-in retry and backoff mechanisms.
  4. Prisma Model Queries:
    • Generate CRUD operations for a specific Prisma model, including pagination.
    • Optionally generate CRUD operations for all Prisma models in your schema.

Output

After completing the CLI prompts, the package will generate the necessary files and configurations based on your selections, providing a jumpstart to your project.

Here’s a "TODO" section you can add to your README file to outline future features for adding support for AWS, Kafka, and Sequelize:


TODO

  1. Add Support for AWS:
  • Integrate functionalities specific to Amazon Web Services (AWS) to expand cloud provider options.
  1. Add Support for Kafka:
  • Implement integration for Apache Kafka, enabling robust streaming capabilities and message processing.
  1. Add Support for Sequelize:
  • Introduce support for Sequelize ORM to manage database interactions for various SQL databases easily.

License

This project is licensed under the MIT License.


Enjoy using the package and feel free to contribute or open issues if you encounter any problems!