Skip to content

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.

License

Notifications You must be signed in to change notification settings

Yaman-cyber/microflame.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 MicroFlame.js – Express MVC CLI Generator

npm version downloads license

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.

MicroFlame Logo


✨ Features

  • 📦 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

🤔 Why MicroFlame?

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

🚀 Getting Started

1. Install MicroFlame CLI globally

npm install -g microflame

2. Initialize a New Project

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

🛠️ CLI Commands

📦 init

Create a new MicroFlame project:

microflame init <directory>

This command initializes a new project in the specified directory.

Example:

microflame init my-new-app

⚙️ generate (alias: g)

Scaffold components for your app:

Controller

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

Model

microflame generate model user

This generates a model for the user resource.

Example:

microflame generate model post

View

microflame generate view home

This generates a view template for the home page.

Example:

microflame generate view about

Route

microflame generate route user

This generates a route for the user resource.

Example:

microflame generate route post

🔐 add-env

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).

📁 Project Code Structure

A detailed explanation of the project architecture, folder structure, and best practices.

➡️ Code Structure Guide


❤️ Contributing

If you'd like to contribute to MicroFlame, feel free to submit a pull request or open an issue.


📃 License

MIT License


🧯 Author

Built with care by Yaman Arab(Github: Yaman-cyber) 🛠️

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •