1.0.0 • Published 6 months ago

royalty-cli v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Royalty CLI 👑

NPM Version License: ISC

A powerful Command Line Interface (CLI) tool for scaffolding React and Express.js projects with modern configurations and best practices. Royalty CLI helps you bootstrap your projects quickly with pre-configured templates and essential features.

Features

React Templates

  • Dashboard Only: A clean dashboard template with Vite, TypeScript, Tailwind CSS, and Shadcn UI
  • Dashboard + About: Extended dashboard template with an about page
  • Login + Dashboard + About: Complete template with authentication, dashboard, and about page

Express.js Features

  • TypeScript Support: Optional TypeScript configuration
  • Database Integration: Support for PostgreSQL, MySQL, and MongoDB
  • Logging: Pre-configured Winston logger
  • Project Structure: Well-organized directory structure following best practices
  • Environment Configuration: Ready-to-use .env setup
  • CORS Enabled: Cross-Origin Resource Sharing configured
  • API Ready: Basic API endpoint setup

Installation

npm install -g royalty-cli

Usage

Royalty CLI provides several commands to help you scaffold your projects:

# Create a new project (interactive mode)
royalty create

# Create a new project with React
royalty create-react app-name

# Create a new project with Express
royalty create-express app-name

# Quick create with default settings (react project with dashboard only)
royalty new app-name

# Show help and available commands
royalty --help

# Show CLI version
royalty --version

Creating a React Project

Method 1: Interactive Mode 1. Run royalty create or royalty create-react 2. Enter your project name 3. Choose your preferred template:

  • Dashboard Only
  • Dashboard + About
  • Login + Dashboard + About

Method 2: Direct Command

# Create a React project with dashboard template
royalty create-react my-app --template dashboard

# Create a React project with dashboard and about pages
royalty create-react my-app --template dashboard-about

# Create a React project with full template
royalty create-react my-app --template full

Creating an Express.js Project

Method 1: Interactive Mode 1. Run royalty create or royalty create-express 2. Enter your project name 3. Choose your configurations:

  • TypeScript support
  • Database setup

Method 2: Direct Command

# Create an Express project with TypeScript
royalty create-express my-api --typescript

# Create an Express project with specific database
royalty create-express my-api --database mongodb

# Create an Express project with TypeScript and PostgreSQL
royalty create-express my-api --typescript --database postgresql

Project Structure

React Project Structure