Complete Documentation

Documentation

Everything you need to know about using Boilerify to scaffold production-ready fullstack projects

Features

Interactive CLI with beautiful prompts using Clack.js
React + Vite for lightning-fast frontend development
Optional Tailwind CSS with latest @tailwindcss/vite plugin
Express.js minimal and flexible Node.js backend
dotenv support for secure configuration
Clean frontend/backend separation structure
Colorful terminal output with Chalk
Robust error handling and validation

Prerequisites

Before using Boilerify, make sure you have:

Node.js (v18 or higher) - Download Node.js
npm (comes with Node.js)

Quick Start

Option 1: Use npx (Recommended)

Run Boilerify directly without installation:

npx boilerify

Option 2: Global Installation

Install globally to use anywhere:

npm install -g boilerify
boilerify

Option 3: Local Development

Clone and run locally:

# Clone the repository
git clone https://github.com/khilesh321/boilerify-cli.git
cd boilerify-cli

# Install dependencies
pnpm install

# Run the CLI
node index.js

Usage

Simply run the command and follow the interactive prompts:

boilerify

Interactive Prompts

  1. Project Name - Enter your desired project name
  2. Frontend - Choose whether to include React + Vite
  3. Tailwind CSS - (If frontend selected) Set up Tailwind CSS
  4. Backend - Choose whether to include Express server
  5. Environment Variables - (If backend selected) Add dotenv support

Example Session

🚀 Boilerify - Fullstack Starter CLI

? What is your project name? › my-awesome-app
? Include frontend (React + Vite)? › Yes
? Set up Tailwind CSS? › Yes
? Include backend (Express)? › Yes
? Add dotenv for environment variables? › Yes

✔ Project created successfully!

┌─────────────────────────────────────────┐
│  Success! 🎉                            │
│                                         │
│  Project: my-awesome-app                │
│  Location: /path/to/my-awesome-app      │
│                                         │
│  Structure:                             │
│  ✔ Frontend (React + Vite) + Tailwind   │
│  ✔ Backend (Express) + dotenv           │
│                                         │
│  Next steps:                            │
│    $ cd my-awesome-app                  │
│    $ cd frontend && npm install && ...  │
│    $ cd backend && npm run dev          │
└─────────────────────────────────────────┘

Happy coding! 🚀

Generated Project Structure

A full-stack project with both frontend and backend:

my-awesome-app/
├── frontend/
│   ├── public/
│   ├── src/
│   │   ├── assets/
│   │   ├── App.jsx
│   │   ├── App.css
│   │   ├── index.css        # With @import "tailwindcss"
│   │   └── main.jsx
│   ├── index.html
│   ├── package.json
│   ├── vite.config.js       # With @tailwindcss/vite plugin
│   └── .gitignore
├── backend/
│   ├── server.js            # Express server with CORS & routes
│   ├── .env                 # Environment variables
│   ├── package.json
│   └── .gitignore
├── README.md                # Auto-generated documentation
└── .gitignore

Backend Server (server.js)

The generated Express server includes:

  • Express.js setup with JSON middleware
  • CORS configuration for frontend communication
  • Health check endpoint (/api/health)
  • Error handling middleware
  • Environment variable support with dotenv
  • Development-ready logging

Frontend Setup

The Vite + React frontend includes:

  • Modern React with hooks
  • Vite for ultra-fast HMR
  • ESLint configuration
  • Optional Tailwind CSS with new @tailwindcss/vite plugin (no PostCSS config needed!)

Environment Variables

A .env file is created in the backend with:

PORT=5000
NODE_ENV=development

Running Your Project

Start the Backend

cd my-awesome-app/backend
npm install  # First time only
npm run dev  # Starts server with auto-reload

Backend will run on: http://localhost:5000

Start the Frontend

cd my-awesome-app/frontend
npm install  # First time only
npm run dev  # Starts Vite dev server

Frontend will run on: http://localhost:5173

Development Scripts

Frontend Scripts

  • npm run devStart development server with HMR
  • npm run buildBuild for production
  • npm run previewPreview production build
  • npm run lintRun ESLint

Backend Scripts

  • npm run devStart server with auto-reload (Node.js --watch)
  • npm startStart production server

Package Manager Support

Boilerify uses npm by default for scaffolding projects, but you can use any package manager:

npm

Default, widely supported

pnpm

Fast, disk-space efficient

yarn

Popular alternative

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Issues & Support

Found a bug or have a feature request? Please open an issue.

Contact

Khilesh - LinkedIn

Project Link: Boilerify CLI

Ready to Start Building?

Get started with Boilerify in seconds