MicroFlame is a command-line tool (CLI) for generating full-featured Node.js Express MVC applications with views, models, routes, and environment setup — all in seconds.
It scaffolds boilerplate code for Express + Mongoose projects using best practices, including folder structure, routing, environment management, and logging. Perfect for quickly starting REST APIs or web apps with a view engine.
- 📦 Uses Express, Mongoose, and Winston with zero wrapping
- 🏗️ Scaffold models, views, controllers, and routes easily
- 🚀 Initialize a fully structured project in seconds
- ⚙️ Add environment variables across all environments with one command
Most Node.js boilerplate tools either add too much overhead or are not flexible enough. MicroFlame gives you:
- A clean Express + Mongoose setup
- CLI scaffolding for MVC architecture
- Views, routes, models, and environment config
- A fast way to prototype or build production-ready apps
npm install -g microflamemicroflame init my-appThis will:
- Create a new directory
my-app - Copy the base project boilerplate
- Print instructions for running the development server
Next Steps:
cd my-app
npm install
# Fill in your environment variables in .env.development
npm run devCreate a new MicroFlame project:
microflame init <directory>This command initializes a new project in the specified directory.
Example:
microflame init my-new-appScaffold components for your app:
microflame generate controller user --mode apiThis generates a new controller for the user resource, with an API mode.
Example:
microflame generate controller user --mode viewsmicroflame generate model userThis generates a model for the user resource.
Example:
microflame generate model postmicroflame generate view homeThis generates a view template for the home page.
Example:
microflame generate view aboutmicroflame generate route userThis generates a route for the user resource.
Example:
microflame generate route postAdd a new environment variable to .env.development, .env.production, and the config system:
Example:
microflame add-env TEMPLATE_JWTPRIVATEKEY mySecretKey trueThis adds a new environment variable called TEMPLATE_JWTPRIVATEKEY with the value mySecretKey and marks it as required (true).
A detailed explanation of the project architecture, folder structure, and best practices.
If you'd like to contribute to MicroFlame, feel free to submit a pull request or open an issue.
MIT License
Built with care by Yaman Arab(Github: Yaman-cyber) 🛠️
