Everything you need to know about using Boilerify to scaffold production-ready fullstack projects
Before using Boilerify, make sure you have:
Run Boilerify directly without installation:
npx boilerifyInstall globally to use anywhere:
npm install -g boilerify
boilerifyClone 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.jsSimply run the command and follow the interactive prompts:
boilerify🚀 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! 🚀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
└── .gitignoreThe generated Express server includes:
The Vite + React frontend includes:
A .env file is created in the backend with:
PORT=5000
NODE_ENV=developmentcd my-awesome-app/backend
npm install # First time only
npm run dev # Starts server with auto-reloadBackend will run on: http://localhost:5000
cd my-awesome-app/frontend
npm install # First time only
npm run dev # Starts Vite dev serverFrontend will run on: http://localhost:5173
npm run devStart development server with HMRnpm run buildBuild for productionnpm run previewPreview production buildnpm run lintRun ESLintnpm run devStart server with auto-reload (Node.js --watch)npm startStart production serverBoilerify uses npm by default for scaffolding projects, but you can use any package manager:
Default, widely supported
Fast, disk-space efficient
Popular alternative
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Found a bug or have a feature request? Please open an issue.