create-sapmenc-app v1.0.1
create-sapmenc-app
A CLI tool to bootstrap client projects with customized templates for Sapmen C.
Overview
create-sapmenc-app
is a command-line tool that allows you to quickly scaffold new client projects with predefined templates. It provides an interactive experience to choose your preferred framework, TypeScript support, and additional features.
Features
- 🚀 Quick project scaffolding
- 🎯 Choose between React or Next.js
- 🔄 TypeScript or JavaScript support
- 📊 Prisma database integration for Next.js projects
- 🎨 Consistent project structure across all client work
Installation
# Using npx (recommended)
npx create-sapmenc-app
# Or install globally
npm install -g create-sapmenc-app
create-sapmenc-app
Usage
Simply run the command and follow the interactive prompts:
npx create-sapmenc-app
The CLI will guide you through the following options:
- Project Name: Name of your new project
- Framework: Choose between React or Next.js
- TypeScript: Enable TypeScript support
- Prisma (Next.js only): Set up Prisma for database access
- ShadCN UI: Set up ShadCN
After answering the prompts, the tool will:
- Create a new directory with your project name or make neccessary files in the existing directory
- Set up the selected template
- Install dependencies
- Configure additional tools if selected
Available Templates
React Templates
react - JavaScript React template with:
- Create React App configuration
- Sapmen C. component structure
- ESLint and Prettier setup
react-ts - TypeScript React template with:
- TypeScript configuration
- Type definitions
- All features from the JavaScript template
react-ts-shadcn - TypeScript React template with:
- All features from the React + Typescript template
- ShadCN UI setup
Next.js Templates
nextjs - JavaScript Next.js template with:
- Pages router
- API routes setup
- Sapmen C. layout structure
nextjs-shadcn - TypeScript Next.js template with:
- All features from the JavaScript template
- ShadCN UI setup
nextjs-ts - TypeScript Next.js template with:
- TypeScript configuration
- Type definitions
- All features from the JavaScript template
nextjs-ts-shadcn - TypeScript Next.js template with:
- All features from the Next.js + TypeScript template
- ShadCN UI setup
When selecting Prisma (with either JavaScript or TypeScript):
- Prisma client setup
- Basic schema with User model
- Database connection configuration
Development
Local Development
# Clone the repository
git clone https://github.com/sapmenc/create-sapmenc-app.git
cd create-sapmenc-app
# Install dependencies
npm install
# Build the project
npm run build
# Create a symlink to test locally
npm link
# Run the CLI
create-sapmenc-app
Adding New Templates
Templates are stored in the templates/
directory. To add a new template:
- Create a new folder in
templates/
- Add all necessary files for the template
- Update the CLI code to include the new template option
About Sapmen C.
This tool is maintained by Sapmen C. to standardize and accelerate client project setup.