Build and deploy a disaster donations website with end-to-end encryption


This code pattern shows you how to build and deploy a Node.js frontend and a Python backend to present a disaster donations website that stores data in a MongoDB database.


After a natural disaster, folks often want to donate to the cause. To do so, they generally want to provide their credit card details — sensitive, personal information. How secure is this information? Where should you store it to protect it from attackers, especially in light of regulations like the EU General Data Protection Regulation (GDPR)?

To start, I’ll show you how to create an IBM Cloud Hyper Protect DBaaS MongoDB instance, a managed MongoDB instance with encrypted connections and storage. You’ll then build and deploy a Python backend application that converts RESTful JSON requests into Mongo calls, to make it easier to interface with the database. Finally, you’ll build and deploy a Node.js application using the Express framework to serve a static website that employs jQuery to make requests to the Python backend app; this, in turn, can be served over HTTPS. The result is a donations website that can accept credit card details and send some of this sensitive information to a database, ensuring that it is encrypted at all times. By running the applications on an IBM Cloud Hyper Protect Virtual Server, you can ensure that the storage used by the applications is also encrypted.

When you’ve completed this code pattern, you’ll understand how to:

  • Build and run Docker containers
  • Deploy a Python RESTful interface to a MongoDB database
  • Deploy a Node.js Express application to serve a static website
  • Build and run an Nginx reverse proxy in Cloud Foundry to provide TLS



  1. User requests website.
  2. Nginx routes request onto Node.js frontend.
  3. Frontend calls the Nginx proxy, which matches URL to route to backend Python application.
  4. Python backend translates RESTful JSON to Hyper Protect DBaaS.


Find detailed steps for this pattern in the README file, which links to README files for the frontend, backend, and proxy components.