Over a million developers have joined DZone.

Introducing the CLEAN Stack

DZone 's Guide to

Introducing the CLEAN Stack

There's the MEAN stack, and now here's a variation on the theme: the CLEAN stack! Read on to find out about how this JavaScript-based stack can help you with your next project.

· Web Dev Zone ·
Free Resource

The popularity and success of JavaScript is amazing. There are 1 million tagged questions on StackOverflow, according to RedMonk there are more JavaScript projects on GitHub than projects in any other language, and there are 250,000 npm packages available. Impressive numbers.

Within the JavaScript community, the MEAN stack is a very popular full stack framework to build backends and frontends for applications with JavaScript. I think it’s a great stack, but to make it even simpler to build applications with REST APIs, applications with role-based access control and to support multiple databases, the Node.js framework LoopBack is a great addition.

Introducing the CLEAN stack for IBM Bluemix…


Just to get this out of the way. The term CLEAN is just something I’m using personally. While this model fits nicely into Bluemix, there is no such IBM product or offering.

CLEAN stands for Cloudant NoSQL DB, LoopBack, Express, AngularJS, and Node.js. It’s similar to the MEAN stack with two significant differences.

1) LoopBack

With the importance of the API economy, I looked for a mechanism to easily build and document APIs. LoopBack has a lot to offer along those lines and last week even more exciting announcements were made around API management.

Also, a lot of applications require access control to certain information on both the application and object level. I briefly evaluated other ways to do authorization in Node.js applications, but for me, the built-in functionality in LoopBack was much easier to use.

2) Cloudant NoSQL Database

The CLEAN stack uses Cloudant instead of MongoDB, but LoopBack actually supports MongoDB as well. One reason I chose Cloudant was just because I like it. The other reason was that the Bluemix MongoDB service is not fully integrated with Bluemix yet, and I wanted the deployment to be as easy as possible.

Open Source Sample

I’ve open sourced a simple sample that shows how to use the CLEAN stack and how to deploy the application to Bluemix. JavaScript and JSON are used everywhere.


  • Node.js for business logic
  • AngularJS for web application
  • Ionic, Cordova, and AngularJS for hybrid mobile apps
  • Gulp build script


  • Definitions of business objects
  • Property files

Get the code from GitHub.

Check out the slides and the series of blog articles for more information.


web dev ,cloudant ,loopback ,express ,node.js ,angular ,bluemix ,nosql ,javascript

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}