How It Works

Gravity uses a standard Model-View-Controller pattern with a RESTFUL API. Adding your own features is as simple as adding a new view, setting up a new API route and connecting it to a model via a controller.

Technology Stack

The Gravity Core is built with Node.js and has the following dependencies:

  • bcrypt 3.0.0
  • client-sessions 0.8.0
  • express 4.16.3
  • express-handlebars 3.0.0
  • gulp 4.0.0
  • gulp-connect 5.6.1
  • mailgun-js 0.20.0
  • mysql 2.16.0
  • randomstring 1.1.5
  • stripe 6.3.0

The front-end is built with HTML5, SCSS/CSS and jQuery.

Routes & API

The page routes and API routes are defined in /router.js and /api.js respectfully.


Routes are handled by the controllers located in the /controller directory.


Models are located in the /model directory.

There are separate models for:

  • account
  • auth
  • chart
  • config
  • database
  • mail
  • metrics
  • stripe
  • user
  • utilities
  • view


Views contain the different interfaces presented to the user and are located in the /views directory.

Install Node.js

Let's go ahead and start the installation process next.

Install Node.js