What is mbake?

mbake is a modern CLI static app generation tool. Apps and sites you generate with mbake are extreme serverless, allow user authentication and work with JSON and database APIs for dynamic databinding. You can use mbake for simple blogs or sites to the most complex web and mobile app projects.

If you don't have time, see tl;dr at the bottom of this page.

mbake compares to other static generators and grunt/gulp; but it does a lot more with a lot less coding.

mbake is part of the Metabake™ approach but can be used by itself.

What is Metabake?

Metabake™ is a modern development approach that helps you deliver web apps 10X faster with less coding. Metabake™ has 10 pillars.

Find out more about Metabake:

Metabake allows for gradual adoption. You can start by adopting just one or a few of its pillars. mbake is a good start.

Metabake and mbake are open source. The source code is available at github.com/metabake

See Resources for related projects.

How to install mbake

From a command line such as PowerShell, type:

   yarn global add mbake

That's it! If you don't have Yarn installed, first go here.

How to create a Hello World app with mbake

## Create index.pug
      p Hello #{key1}

## Create dat.yaml
   key1: World

## Generate index.html from Pug and Yaml:
   mbake .

   or: mbake subfoldername

Auto-build/generate: if you are using a Metabake META build server (see META doc), you don't even have to do the 'mbake .'. META has a watcher that triggers 'mbake' when you save a file.

How to run an mbake app (such as Hello World)

mbake apps run on any static web server. This includes low-cost cloud hosting such as Amazon S3. We show how to work with S3 later in this doc.

When you develop locally, you could use 'Web Server for Chrome' to run mbake apps. To install it, open your Google Chrome web browser and install the 'Web Server for Chrome' app from here. Launch the app, click the 'Choose Folder' button and select the root folder of your app (e.g. where index.html of your Hello World app is). Also ensure 'Options' has 'Automatically show index.html' checked. Ensure the Web Server is STARTED, then navigate to the proposed URL (e.g.

Even though mbake apps are installed on a static server, they are dynamic because they allow user authentication and work with JSON for dynamic rendering and and database APIs for dynamic databinding.

How to generate a sample app with mbake

## Run mbake help to see the list of current sample apps

## Generate sample app, e.g.
   mbake -c

## Navigate to it, e.g.
   cd crud
  • mbake -t . - Convert Pug/Riot files to useable tag/js, e.g.: data binding.
  • mbake -i . - Convert dat.yaml static files to JSON, for dynamic binding. More about this in B-M-SPA docs.

How to see all mbake options


How to make mbake apps serverless

To go extreme serverless, we show how to use mbake with

  • Amazon Web Services (AWS) S3 HTTP hosting
  • Mounting software so you can mount AWS S3 as a drive
  • Google Firebase/Firestore

Go extreme serverless in four steps (Tutorials):

  • Tutorial 1: Setup S3 as your cloud server and mount it.
  • Tutorial 2: Learn Pug and static binding; view via S3 HTTP server.
  • Tutorial 3: Learn serverless websites with dynamic data binding.
  • Tutorial 4: Generate a serverless CRUD webapp.

When done, you should see this.

Serverless/Cloud V2, Mount and Pug are some of the pillars of Metabake.


   yarn global add mbake
   mbake -c
   cd crud
   mbake .

NEXT: Go to Tutorial 1.