CLI to generate ready-to-run fullstack or backend applications
npm install create-fullstack-setup> A modern CLI tool to generate production-ready backend or full-stack applications with Express in seconds.
create-fullstack-setup streamlines project setup by automating repetitive tasks like folder structure creation, dependency installation, middleware configuration, and environment setupβso you can focus on building features, not boilerplate.
---
The fastest way to use the CLI is with npx (no global install required):
``bash`
npx create-fullstack-setup@latest
---
- π― Interactive Setup - Guided prompts for a personalized project
- β‘ Fast Scaffolding - Ready-to-run projects in under a minute
- π§ Feature-Based - Only include what you need (JWT, MongoDB, Cloudinary, etc.)
- π¦ Multiple Frontends - Choose React, Next.js, or backend-only
- π οΈ TypeScript & JavaScript - Full support for both languages
- π Cross-Platform - Works on Windows, macOS, and Linux
- π Zero Configuration - Pre-wired middleware and utilities
---
- Node.js v18 or higher
- npm v9 or higher
---
Install the CLI globally via npm:
`bash`
npm install -g create-fullstack-setup@latest
Verify the installation:
`bash`
create-fullstack-setup --version
---
`bash`
create-fullstack-setup@latest my-app
`bash`
create-fullstack-setup@latest .
The CLI will guide you through an interactive setup process.
---
The CLI prompts you step-by-step to customize your project:
``
? Project name: my-awesome-app
---
Select a frontend framework or skip for a backend-only project:
- React - Modern UI library
- Next.js - Full-stack React framework
- None - Backend API only
``
? Choose frontend framework:
β React
β Next.js
β None
---
Currently supported:
- Express - Fast, minimalist web framework
``
? Choose backend framework:
β Express
---
Choose your preferred language:
- JavaScript - Classic, widely supported
- TypeScript - Type-safe, modern development
``
? Select language:
β JavaScript
β TypeScript
---
Enable features individually based on your needs:
| Feature | Description |
|---------|-------------|
| JWT Authentication | Token-based auth with middleware |
| Cloudinary | Cloud-based media management |
| CORS | Cross-Origin Resource Sharing |
| Cookie Parser | Parse cookies from requests |
| Dotenv | Environment variable management |
| MongoDB | NoSQL database with Mongoose ODM |
| Zod Validation | Schema validation library |
| Bcrypt | Password hashing utilities |
| Multer | File upload handling |
``
? Enable JWT Authentication? (Y/n)
? Enable Cloudinary? (Y/n)
? Enable CORS? (Y/n)
...
---
``
my-app/
βββ server/
β βββ src/
β β βββ app.ts # Express app configuration
β β βββ server.ts # Server entry point
β β βββ routes/ # API routes
β β βββ controllers/ # Request handlers
β β βββ middlewares/
β β β βββ auth.middleware.ts # JWT authentication
β β βββ utils/
β β β βββ Cloudinary.ts # Cloudinary setup
β β βββ config/
β β βββ db.ts # MongoDB connection
β βββ .env.example # Environment template
β βββ tsconfig.json # TypeScript config
β βββ nodemon.json # Dev server config
β βββ package.json
βββ client/ # (if frontend selected)
βββ ...
``
my-app/
βββ server/
β βββ app.js # Express app configuration
β βββ server.js # Server entry point
β βββ routes/ # API routes
β βββ controllers/ # Request handlers
β βββ middlewares/
β β βββ auth.middleware.js # JWT authentication
β βββ utils/
β β βββ Cloudinary.js # Cloudinary setup
β βββ .env.example # Environment template
β βββ package.json
βββ client/ # (if frontend selected)
βββ ...
---
When enabled, the CLI generates:
- Authentication middleware for protected routes
- Support for both Authorization header and HTTP-only cookies
- Token verification utilities
Environment variable:
`env`
ACCESS_TOKEN_SECRET=your_secret_key_here
---
When enabled, the CLI generates:
- Pre-configured Cloudinary utility class
- Automatic connection on server startup
- Ready-to-use upload/delete methods
Environment variables:
`env`
CLOUDINARY_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
---
When enabled, the CLI generates:
- Database connection utility
- Automatic connection with retry logic
- Connection error handling
Environment variable:
`env`
MONGO_URI=mongodb://localhost:27017/myapp
---
Enables Cross-Origin Resource Sharing with sensible defaults.
---
Parses cookies from incoming requests for session management.
---
Utilities for hashing and comparing passwords securely.
---
Middleware for handling multipart/form-data file uploads.
---
Schema-based validation for request data.
---
All required environment variables are written to:
``
server/.env.example
Example file:
`envServer
PORT=5000
$3
Copy
.env.example to .env and fill in your actual values before running:`bash
cp server/.env.example server/.env
`---
π Running Your Project
$3
`bash
cd my-app/server
npm install
npm run dev
`The server starts on
http://localhost:5000 (or your configured PORT).---
$3
`bash
cd my-app/client
npm install
npm run dev
`- React: Runs on
http://localhost:5173 (Vite default)
- Next.js: Runs on http://localhost:3000---
π― Use Cases
- π Rapid Prototyping - Get ideas running quickly
- π Learning Express - Study well-structured projects
- π₯ Team Consistency - Standardize project scaffolding
- ποΈ Production Starters - Begin with best practices
---
π οΈ Design Principles
- β
Feature-Based Injection - Only include what you select
- π Language Aware - Respects JavaScript vs TypeScript conventions
- π Idempotent Operations - No duplicate injections or overwrites
- π Cross-Platform - Works on all operating systems
- π¦ Template Resolution - Uses
__dirname` for global CLI safety---
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
---
Uttam Yadav
Full-Stack Developer
---
---
- This CLI focuses on project setup, not application logic
- Generated code is fully customizableβmodify as needed
- Templates follow industry best practices
- No vendor lock-inβstandard Express/Node.js code
---
If you find this tool helpful, consider giving it a star on GitHub!
---
Happy Coding! π