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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jean.anjos/coresuit-gen-crud

v1.1.5

Published

Gerador de services e types (React/TS) no padrão CoreSuit

Readme

CoreSuit React Generator

Gerador de CRUD completo em React + TypeScript, seguindo o padrão arquitetural CoreSuit, focado em produtividade, padronização e integração direta com APIs REST.

Este gerador cria automaticamente types, services, páginas, hooks, filtros, formulários, tabelas e modais utilizando:

  • React + TypeScript
  • MUI (Material UI)
  • React Hook Form
  • Yup
  • React Query
  • Estrutura modular e escalável

🎯 Objetivo

Padronizar e acelerar a criação de módulos CRUD no front-end, garantindo:

  • Consistência de código
  • Redução de erros manuais
  • Facilidade de manutenção
  • Integração direta com APIs REST
  • Escalabilidade para sistemas grandes (ERP, CRM, SaaS)

📦 O que é gerado automaticamente

Para cada entidade, o gerador cria:

🔹 Types

  • Interface principal da entidade (I<Entity>)
  • Types de request (Get, Create, Update, Delete, Restore)

🔹 Service

  • Funções de comunicação com a API:
    • Get (paginado)
    • GetById
    • Create
    • Update
    • Delete (soft delete)
    • Restore

🔹 Páginas

  • Listagem com tabela paginada
  • Create (Drawer)
  • Update (Drawer)
  • Delete (Dialog)
  • Restore (Dialog)

🔹 Hooks

  • useIndex
  • useCreate
  • useUpdate
  • useDelete
  • useRestore

🔹 UI / UX

  • Filtros dinâmicos
  • Drawer de filtros
  • Tabela com ordenação
  • Labels de status (ativo/inativo)
  • Feedback visual com Snackbar
  • Integração com React Query

🗂️ Estrutura gerada

src/
├── types/
│   └── system/
│       └── i-bank.ts
│
├── services/
│   └── system/
│       └── bank/
│           ├── index.ts
│           └── types.ts
│
├── pages/
│   └── bank/
│       ├── index.tsx
│       ├── consts/
│       │   └── index.ts
│       ├── components/
│       │   └── bank-filters-component.tsx
│       ├── hooks/
│       │   ├── use-bank-index.ts
│       │   ├── use-bank-create.ts
│       │   ├── use-bank-update.ts
│       │   ├── use-bank-delete.ts
│       │   └── use-bank-restore.ts
│       ├── create/
│       ├── update/
│       ├── delete/
│       └── restore/

⚙️ Instalação no projeto

1 Instalar o gerador como dependência de desenvolvimento

npm install -D C:\dev\core-suit\generate-crud-react-js
npm i @jean.anjos/coresuit-gen-crud

Pode ser publicado no npm e instalado via npm i -D @coresuit/react-gen.

2 Configurar script no package.json

{
  "scripts": {
    "generate": "coresuit-react-gen"
  }
}

🚀 Como usar o gerador

🔹 Modo

Geração direta informando nome da entidade e campos:

npm run generate -- --name=Bank --fields="Code:string:true,Name:string:true"
  • Formato dos campos:
  • Campo:Tipo:Obrigatório

Exemplo:

  • Code:string:true
  • Name:string:true

Tipos suportados:

  • nstring

  • int

  • number

  • boolean

  • date

🧠 Convenções adotadas

Entidade: PascalCase (Bank)

Service: camelCase (bankService)

Rotas: nome da entidade (Bank)

Campos da API: respeitam exatamente o contrato do backend

Soft Delete: baseado em deletedAt

Paginação: padrão PageNumber, PageSize, SortBy, Direction

📤 Publicação no npm (para mantenedores)

Após atualizar versão no package.json:

npm publish --access public

É necessário:

Conta no npm

2FA habilitado

📄 Licença

MIT © CoreSuit

👨‍💻 Autor

  • Jean Anjos
  • Arquiteto de Software | Full Stack Engineer
  • Especialista em sistemas corporativos, SaaS, ERPs e automação de CRUDs.