rgenex

April 27, 2026 Β· View on GitHub

npm version license npm downloads

Config-driven React architecture scaffolding for teams.
Define your project structure once in rgenex.config.js and generate code consistently across your entire team.


πŸš€ Quick Start

npm install --save-dev rgenex

Install

npx rgenex init
# Creates rgenex.config.js based on your detected stack

Init

npx rgenex generate component Button
# shorthand
npx rgenex g component Button

Generate


✨ Core Features

  • 🎯 Config-Driven Generation β€” Define structure, naming conventions, and file patterns once in rgenex.config.js
  • πŸ‘₯ Team Standardization β€” Enforce consistent React architecture across your team
  • ⚑ Instant Scaffolding β€” Generate components, hooks, and pages in one command
  • πŸ›‘οΈ Safe Generation β€” Preview output before writing and prevent accidental overwrites
  • πŸ§ͺ Built-in Test Support β€” Auto-generate test files (Vitest, Jest)
  • 🎨 Smart Stack Detection β€” Detects TypeScript, styling, and testing setup automatically
  • πŸ“¦ Zero Bundle Impact β€” Dev-only tool, excluded from production builds
  • πŸ”§ Configurable Structure β€” Adapt templates, paths, and conventions to your architecture

πŸ†• Improved Developer Experience in v1.1.0

rgenex v1.1.0 Features

Preview Before Generating

npx rgenex g component Button --dry

Preview files before writing them to disk.


Safe Overwrite Protection

npx rgenex g component Button

If files already exist, rgenex prompts before overwriting.


Force Overwrite

npx rgenex g component Button --force

Skip overwrite prompts when needed.


List Available Generators

npx rgenex list

View all configured generators in your project.


πŸ“– Documentation


πŸ’‘ What It Generates

Components

npx rgenex g component Button

Creates:

  • Button.tsx
  • Button.test.tsx
  • Button.module.scss
  • index.ts

(Structure depends on your config)


Hooks

npx rgenex g hook useCounter

Creates:

  • useCounter.ts
  • useCounter.test.ts

Pages

npx rgenex g page Dashboard

Creates:

  • Dashboard.tsx
  • Dashboard.test.tsx

βš™οΈ Configuration β€” The Real Power

After running npx rgenex init, configure your team’s standards once:

// rgenex.config.js - Your team's code standards
module.exports = {
  language: "typescript", // Enforce TypeScript
  styling: "scss-modules", // Your design system
  testing: "vitest", // Your test framework

  paths: {
    components: "src/components", // Where to generate
    pages: "src/pages",
    hooks: "src/hooks",
  },

  generators: {
    component: {
      structure: "grouped", // Grouped or flat structure
      includeTest: true, // Always generate tests
      includeStyle: true, // Always generate styles
      updateBarrel: true, // Auto-update index.ts exports
    },
  },
};

Define Once. Enforce Everywhere.

Every team member uses the same configuration.

No more debates about:

  • Folder structure
  • Naming conventions
  • Test file placement
  • Style file conventions

πŸ› οΈ Requirements

  • Node.js >= 16.0.0
  • npm or yarn

πŸ“ License

MIT


🀝 Contributing

See CONTRIBUTING.md


Built by Aditya Singh Sengar