npm.io
1.0.19 • Published 7h agoCLI

create-stackflow

Licence
MIT
Version
1.0.19
Deps
8
Size
189 kB
Vulns
0
Weekly
39

create-stackflow

Professional interactive npm CLI for generating modern full-stack MERN and modern web applications.

npx create-stackflow

Overview

create-stackflow is a modern developer-focused CLI tool that automatically generates scalable full-stack applications with production-ready architecture.

The goal of StackFlow is to reduce repetitive setup time and instantly generate:

  • Frontend
  • Backend
  • Authentication
  • CRUD modules
  • Dashboard UI
  • API setup
  • Database connection
  • Protected routes
  • Upload system
  • Validation
  • Modern folder structure

Everything is generated automatically with interactive prompts.


Perfect For

create-stackflow is ideal for:

  • MERN Stack developers
  • Full-stack developers
  • SaaS starters
  • Admin dashboard projects
  • Startup MVPs
  • CRUD applications
  • Authentication systems
  • Portfolio projects
  • Client projects
  • Rapid prototyping
  • Agency development workflows

What StackFlow Generates

Frontend

Supports:

  • React + Vite
  • Next.js

Features:

  • JavaScript or TypeScript
  • Tailwind CSS
  • Shadcn UI
  • React Router DOM
  • Zustand / Redux Toolkit / Context API
  • React Hook Form
  • Zod / Yup validation (Joi is backend-only)
  • Axios API layer
  • TanStack Query
  • Protected routes
  • Dark mode
  • Toast notifications
  • Framer Motion
  • Charts
  • Drag & drop uploads

Backend

Supports:

  • Express.js
  • Fastify
  • NestJS

Features:

  • MongoDB
  • PostgreSQL
  • MySQL
  • SQLite
  • Mongoose / Prisma / Sequelize / Drizzle / TypeORM
  • JWT Authentication
  • bcryptjs / argon2
  • multer
  • Cloudinary
  • Cloudflare R2
  • AWS S3
  • UploadThing
  • Swagger Docs
  • Socket.IO
  • Winston / Morgan / Pino logging
  • Nodemailer
  • AWS SES
  • SendGrid
  • Mailgun
  • Postmark

Generated Features

StackFlow automatically generates:

  • Login page
  • Register page
  • Forgot password
  • Reset password
  • Role-based authentication
  • Refresh token support
  • Dashboard UI
  • CRUD APIs
  • CRUD frontend pages
  • API service layer
  • Validation structure
  • Auth middleware
  • Upload structure
  • Environment variables
  • MongoDB connection
  • Loading states
  • Toast notifications
  • Reusable component architecture

Generated Project Structure

my-app/
│
├── frontend/
│   └── package.json
│
├── backend/
│   └── package.json
│
└── node_modules/   (hoisted at project root after install)

Backend API Architecture

StackFlow uses a scalable modular API architecture.

Main Route File

Example:

router.use("/auth", authRoutes);

router.use("/users", userRoutes);

router.use("/products", productRoutes);

The main route file combines all module routes.


Separate Module Routes

Each module contains its own dedicated route file.

Example:

router.get("/");
router.post("/");
router.put("/:id");
router.delete("/:id");

This keeps the codebase:

  • clean
  • scalable
  • maintainable
  • enterprise-ready

Interactive Setup Questions

StackFlow asks setup questions like:

? Frontend framework?
 React
  Next.js

? Language?
 TypeScript
  JavaScript

? Database?
 MongoDB
  PostgreSQL

? Authentication strategy?
 JWT
  Session Auth

Everything is configured automatically based on user selections.


Local Development Workflow

Create Project

npx create-stackflow

Start Project

Start Backend
cd my-app/backend
npm run dev
Start Frontend
cd my-app/frontend
npm run dev

Local MongoDB

Default MongoDB connection:

MONGO_URI=mongodb://127.0.0.1:27017/myapp

CLI Architecture

src/
│
├── cli.js
│
├── commands/
│
├── generators/
│
├── templates/
│
├── prompts/
│
├── utils/
│
└── constants/

StackFlow Workflow

  1. Ask setup questions
  2. Validate project name
  3. Create frontend
  4. Create backend
  5. Install dependencies
  6. Configure Tailwind
  7. Configure Shadcn
  8. Configure backend
  9. Configure database
  10. Generate auth
  11. Generate CRUD
  12. Configure routes
  13. Generate dashboard
  14. Create env files
  15. Start project automatically

Dependency Strategy

StackFlow uses latest stable versions automatically.

Examples:

  • vite@latest
  • create-next-app@latest

Dependencies are dynamically installed based on selected features.


Auth Strategy

Generated authentication system includes:

  • JWT authentication
  • Password hashing
  • Protected APIs
  • Protected frontend routes
  • HTTP-only cookies
  • Refresh tokens
  • Role-based access

CRUD Strategy

StackFlow automatically generates:

Backend

  • Models
  • Controllers
  • Routes
  • Middleware
  • Validation

Frontend

  • Forms
  • Tables
  • Dashboard pages
  • API services
  • Loading states

Why StackFlow?

StackFlow helps developers:

  • save setup time
  • avoid repetitive boilerplate
  • follow scalable architecture
  • build production-ready projects faster
  • maintain consistent code structure

Frontend

  • React / Next.js
  • Tailwind CSS
  • Shadcn UI
  • Zustand
  • Axios
  • React Hook Form
  • Zod

Backend

  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • bcryptjs
  • multer
  • Cloudinary

Future Roadmap

Planned future support:

  • SaaS starters
  • AI application starters
  • React Native
  • Prisma
  • PostgreSQL
  • Redis
  • BullMQ
  • Docker
  • Admin generators
  • Visual generators

Local Testing

npm run smoke

node ./src/cli.js

Publishing

npm publish --access public

Install Globally

npx create-stackflow

License

MIT


Author

StackFlow CLI

Keywords