The Gravity Framework: The boilerplate web framework solution for your next embedded project

Photo by Harrison Broadbent on Unsplash

Have you been looking for a baseline web framework to build your next embedded systems project? I have the solution for you. The Gravity Framework is a python based boilerplate web framework to get your next project up and running quickly.

But first, what exactly is a boilerplate web framework and why would you want to use one? Boilerplate web frameworks offer core features that every project should have from the start of a project. They provide a standard way to build and deploy applications on the internet or local area networks.  When you build a car, you don’t have to re-invent the wheel right? Well in the software world, you also shouldn’t have to re-invent many of the basic features that are necessary to get a new project running.

You shouldn’t have to build your own user authentication system, you shouldn’t have to build your own API (Application Programmer Interface), you shouldn’t have to create a software architecture from scratch, and you shouldn’t have to struggle with terrible documentation as you develop new features.

That’s exactly why I build The Gravity Framework, to save you months or even years of development time, and to build a supportive global community of developers passionate about creating something special for the world.

What is The Gravity Framework Used for?

Photo by Ilya Pavlov on Unsplash

You might be asking yourself, what exactly could Gravity be used for? Maybe you don’t quite understand why you would want to build a web framework into your next embedded project?

Gravity is a python-based web framework that is an alternative to other frameworks such as Ruby on Rails or Django. Gravity is a full-stack web framework that you can have running in minutes and is very lightweight with a limited number of other dependencies. It can run both natively on your host operating system, or it can also be deployed as a Docker image.

Let’s think about an embedded project you are probably more familiar with, your home Wi-Fi router. Have you every needed to make some basic changes to the configuration of your home Wi-Fi router, such as changing the security password to access the Wi-Fi network?

Typically this process would look something like going to a web page on 192.168.1.1 in your browser and typing in a default username and password. You would then navigate to a configuration page, enter a new password, and submit it back to the local web server running on the Wi-Fi router where the change would be applied.

If you have used this type of system in the past, then you have used a local web server to configure an embedded systems device. The local web server creates a configuration interface that anyone on the local network can access, and changes can be made within a web browser.

Now let’s say you want to build a brand new Wi-Fi router (or any other Internet-of-Things (IoT) device) and you are building everything from scratch. You would need to think about the following.

  • What framework can you start from so you don’t have to implement basic features?
  • How will you make the web server secure via user authentication? 
  • Will you have an API available so in addition to the browser interface, 3rd party software could configure the device? 
  • How much will it cost to develop all of the features you need and can The Gravity Framework save you a significant amount of money? 
  • How can a global community of open source developers support you and can you leverage the fact that the community is continually making the core product better at no cost to you?

That is just some of what you get with The Gravity Framework. I’ve taken the headache out of getting the software for an embedded project started for you. I’ve also created a software architecture for you where you can build other software systems and integrate them with Gravity so status and control information can be available to the user of the product, anywhere on a network. I believe this is going to be extremely important as more companies build and integrate IoT devices.

What are some of the core features of this boilerplate web framework?

As mentioned above, I believe there are several core features that are needed for any new embedded systems project. In my opinion, the features available in The Gravity Framework are essential for any new embedded systems project include:

  • User-friendly web interface
  • Application Programmer Interface (API) using a JSON messaging format
  • JSON Web Token (JWT) authentication security for the web interface and API.
  • Easily and customizable AJAX support for the API
  • Websocket support
  • File upload over HTTP POST
  • Server-side template rendering
  • Complete offline support, meaning the global internet is not necessary to run Gravity.

What type of devices has The Gravity Framework been run on?

The Gravity Framework has been run on a Raspberry PI, a FitPC running Ubuntu, and Mac OS.  It also is the software currently running www.thegravityframework.com, so while it is designed for embedded systems, it is not limited to them and can run on the global internet as well. The website currently runs on a Digital Ocean VPS running Ubuntu.

How do you get started?


You can get started using and developing on The Gravity Framework by going to http://www.thegravityframework.com and clicking the “Download Now” link to get the source code from GitLab.  The documentation is meant to be clear and robust so you can get Gravity working on your embedded system quickly.  Just clone the source code from GitLab and follow the instructions in the README.md file.  Happy coding!

If you have more questions, comment below or follow me and send me a message on Instagram @thegingernomad.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: