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 microflame
microflame init my-app
This 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 dev
Create a new MicroFlame project:
microflame init <directory>
This command initializes a new project in the specified directory.
Example:
microflame init my-new-app
Scaffold components for your app:
microflame generate controller user --mode api
This generates a new controller for the user
resource, with an API mode.
Example:
microflame generate controller user --mode views
microflame generate model user
This generates a model for the user
resource.
Example:
microflame generate model post
microflame generate view home
This generates a view template for the home
page.
Example:
microflame generate view about
microflame generate route user
This generates a route for the user
resource.
Example:
microflame generate route post
Add a new environment variable to .env.development
, .env.production
, and the config system:
Example:
microflame add-env TEMPLATE_JWTPRIVATEKEY mySecretKey true
This 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) 🛠️