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

cra-template-econsor

v0.1.6

Published

## πŸš€ Get Started

Downloads

4

Readme

cra-template-econsor

πŸš€ Get Started

To use this template, add --template econsor when creating a new app. For example:

npx create-react-app my-app --template econsor

or

yarn create react-app my-app --template econsor

Note: Avoid using Hello World as the project name.

πŸ“¦ Includes

✨ Features

Built-in layout infrastructure for both anonymous and authorized states

Layout Banner

Each page in the project must be wrapped with one of these layouts.

import AuthLayout from '../../../layout/AuthLayout';

<AuthLayout title="Login" authorize="unauthorized">
    {/*Your page content here!*/}
</AuthLayout>
import MainLayout from '../../../layout/MainLayout';

<MainLayout title="Dashboard" authorize="authorized">
    {/*Your page content here!*/}
</MainLayout>

The authorize prop can take one of three options.

  • authorized Only authorized users can access this page.
  • unauthorized Only unauthorized users can access this page.
  • anyone Anyone can access this page.

Feature-oriented infrastructure

Prev infrastructure

This infrastructure is good infrastructure, and we've been using it since we started building React apps. However, this infrastructure makes it difficult to create a new feature within the project. Like you need to create a new file in each root directory (like actions, reducers, types). You must also do the same if you want to delete a feature. And I don't need to tell you about copying a feature into another project.

Next infrastructure

Using feature-oriented infrastructure will make it easy to remove a feature or copy it to another project.

Built-in user-authentication system

SignIn

SignUp

Reset Password (missing)

Change Password (missing)

Profile (missing)

create-react-process (crp)

πŸš€ Get Started

CRP is a tool built by econsor used to generate an easy CRUD process by fetching data structure from strapi.

Notes:

  1. Make sure you are running >= 14 node version
  2. Before running the command below, you must create a file named schemas.js in the /src/config/ directory
  3. Make sure the full path to your project does not contain Hello World or any instances of it (e.g. hello-world, HelloWorld)
node ./crp.js ../path/to/your/strapi/api/root/directory

This command will fetch all collection types from the strapi API and create a CRUD processs for each.

Supported Types

  • 🟒 Β  Already supported
  • πŸ”΅ Β  Planned to be supported
  • πŸ”΄ Β  No plans to support it. Has to be handled manually

After running the crp command, you will find a new folder created in the /src/features directory for each collection type you have in your strapi API. For example, if you have a collection type called Favorite Place, your /src/features directory will contain a folder named FavoritePlaces.

πŸ“‚ features
┣ πŸ“‚ FavoritePlaces
┃   ┣ πŸ“‚ logic
┃   ┃   ┣ πŸ“„ actions.ts
┃   ┃   ┣ πŸ“„ api.ts
┃   ┃   ┣ πŸ“„ reducer.ts
┃   ┃   β”— πŸ“„ types.ts
┃   β”— πŸ“‚ views
┃       ┣ πŸ“„ CreateFavoritePlaceDialog.tsx
┃       ┣ πŸ“„ FavoritePlaceRow.tsx
┃       β”— πŸ“„ FavoritePlaces.tsx

πŸ“ Template