Mobile Platform For Mindfulness Based Stress Reduction

A React Native iOS/Android app powered by a CMS to manage and stream content.

Project Repository:

Project Video:


Mindfulness is the state of being aware of one’s self, one’s surroundings, and the present moment. This state is often achieved through silent meditation, allowing one to focus entirely within the present moment. Due to a lack of reliable sources and evidence to prove the effectiveness of mindfulness, its practice receives mixed receptions from the public eye.

To examine the validity of mindfulness practice, various studies were conducted at UMass Medical School on individuals practicing various forms of mindfulness practice. Examined practices with success acquired classification under Mindfulness Based Stress Reduction (MBSR), the clinically proven application of mindfulness to address stress, anxiety, depression, and other mental health issues. UMass Medical School currently instructs MBSR in the form of an eight week course.

The goal of this project is to create a source for for college students and young adults to engage in practice of MBSR. From August-December 2019, I designed and implemented an initial prototype myself in the form of a mobile application for iOS and Android. I will continue development with a team of students in the 2020-2021 academic year as part of my Major Qualifying Project (MQP) at WPI.

Back-end Design

A back-end platform was designed to enable the distribution of dynamic content to the mobile app. The platform is composed of three main services: A database service, a CMS server, and the MBSR server. Each service is ran in its own Docker container for quick and simple deployment using docker-compose.

The Deployment Diagram for the MBSR Platform’s Back-end

The Database Service

The database service is the foundation of the back-end that provides an outlet for storing and managing information that is crucial to the platform’s operation. It is used to store user account information for the app and entries for the content that is served.

I decided to employ MongoDB to fulfill this service. Unlike relational dialects, document-oriented databases like MongoDB store data in key-value pairs similar to a hashmap or dictionar, Which provides a performance advantage with respect to managing data in high volumes concurrently. Because the majority of data in the MBSR platform is content that will be sent to multiple users, this advantage is important as the amount of content and users requesting content at a given time scales.

The CMS Server

CMS servers typically provide a web portal to manage the content that is then served. This provides an easy to use interface for people who want to publish their own website with minimal web development experience.

Having worked with CMS services in the past, I researched the feasibility of incorporating one into the MBSR platform to provide an easy interface to manage the content that gets streamed to the app. I then discovered Strapi, an open source CMS service with enough versatility to achieve this goal. Unlike most CMS services, Strapi is a headless CMS. Instead of being bound to rendering HTML pages for a website like most CMS services, Strapi instead serves its content in a JSON format that can be used across multiple applications. This data is requested with an auto-generated REST API. Strapi also supports the ability to define custom content types, a feature that is extremely beneficial for customizing the formatting for content to be served on each screen of the application. Because Strapi is open source, the CMS service is self hosted and modified to best suit the needs of the MBSR platform.

The MBSR Server

The MBSR server is the heart of the platform that bridges the back-end services together and serves content to the user’s phone. Any request made from the app is sent to the MBSR server, which then processes the request, gathers data to create an appropriate response, and serves it back to the user. In its current state, each feature in the app could have been implemented without the MBSR server. However, its integration is important for production for 3 main reasons:

  • It provides an additional layer of security. Any request from the app has to go through the MBSR server first, acting as a filter for what users can access. This also allows for additional security measures to be taken on the CMS server. The implementation of Strapi in this platform is configured to require administrator credentials in order to access or modify any content. The MBSR server is equipped with these credentials, allowing it to make authenticated requests to retrieve content and serve it to the user.
  • It reduces complexity for client requests. In some situations, multiple requests may need to be made in order to properly render content. Coordinating these requests from the client side can be challenging, and requires more code on the app to be implemented to handle cases when these requests fail or become unreliable. The MBSR server provides a layer in between the client and rest of the back-end so that app only needs to make a single request to retrieve the data it needs.
  • It keeps API endpoint definitions on the server side. If the endpoint URL to any request needs to change at some point in the future (i.e for changing content providers), it can be updated in the MBSR server code without any change to the app. This helps limit the number of updates pushed to users and helps prevent older builds of the app from breaking.

A React Native Front-end

While not necessary for a prototype application, the need for cross-platform support in production was evident. Releasing for iOS and Android would not only significantly increase usability across the project’s target demographic, but also establish a professional presence to stand out on both respective app stores.

To explore the possibility of providing cross-platform comparability in the prototype app, I researched various techniques that mobile developers use to develop iOS and Android apps alongside each other. A common technique that small companies often use to achieve this to build their app with React Native, framework developed by Facebook that takes project code written in JavaScript and compiles it to Android Studio and iOS Xcode projects. Although support to features unique to either platform is limited, the framework’s capabilities were suitable for achieving the deliverables of the prototype app, and provided great aid to streamlining development.

Prototype Experience

For MBSR Content Managers:

For Users:

Leave a Reply

Your email address will not be published. Required fields are marked *