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

@redswitch/generator

v0.0.7-alpha

Published

A Strapi to Feature-based React frontend generator for models

Downloads

2

Readme

rsgen

A plop-based generator to generate opinionated React files from Strapi-defined models.

Templated applications currently available:

  • Atomic React frontend
    • Generate a fully featured frontend with Auth
    • Generate Feature components from Strapi Models
  • Strapi backend
    • User and user datum models included
    • Clients for heavy AWS integrations

Templated applications to come soon:

  • Terraform

How to use

Every generation prompt is run through one command:

rsgen

1. Generate the rsgen config file

Run rsgen to generate the rsgen.config.json file. This will generate a file with the configurations below:

{
  /* These properties are generated by rsgen */
  // The name of the frontend directory
  "frontendFolder": "<USER_INPUT>",
  
  // The name of the backend directory
  "strapiFolder": "<USER_INPUT>",
  
  
  /* These properties can be added to the rsgen.config.json file after creation to override the defaults */
  // The base path for the generator. By default, this will point to the app's base package.json (where @redswitch/generator is installed)
  "base": "/base/root/path",
  
  // The plurality of the folder names, grabbed from Strapi's model attributes fields. Can be 'pluralName' or 'singularName', defaults to 'pluralName'
  "modelNamePlurality": "pluralName",
}

WARNING: Modifying the rsgen.config.json fields frontendFolder and strapiFolder after it has been generated will break functionality unless you also change those folder names on your machine to match.

2. Bootstrap the necessary applications

Run rsgen and choose Bootstrap Applications in the prompts. The generator will generate the template files as well as npm install the necessary modules.

NOTE: Make sure to refer to the README files within both your frontend and backend directory, as there is some additional setup depending on your choices.

3. Generate feature components

Run rsgen and choose either Generate frontend feature from a strapi model or Generate frontend features from all strapi models. This step assumes you have read the backend README and provisioned the necessary resources to run the Strapi backend.