Skip to content

Latest commit

 

History

History
82 lines (45 loc) · 2.8 KB

README.md

File metadata and controls

82 lines (45 loc) · 2.8 KB

📚 Storybooks

Share stories easily.

A web app for sharing public stories or use as a private web-based diary!

storybooks-web-app.herokuapp.com

storybooks-img-preview


✨ Features

  • Public Stories (Share stories with friends)

  • Private Stories (Keep a private diary you can access anytime)

📚 Tech Stack

The frontend is rendered with Handlebars and fully server rendered. On the backend, a REST API handles saving user content and user management, a MongoDB database is used for data storage and data retrieval.

Frontend

Handlebars Template . MaterializeCSS . HTML

Backend

Express.js . Javascript

Authentication

Passport.js for Google OAuth

Database

MongoDB

Infrastructure as Code

Terraform

Continuous Deployment

Github Actions

💫 Hosting

Heroku

🚀 Deploy

Docker

Development - Deployment Process

Docker Compose was used to manage the docker containers running both the backend service and the mongodb service locally.

Terraform was used as the Infrastructure as Code tool to provision the cloud services that runs both the staging environment and production environment.

The cloud services provisioned and used for the running of the app both in staging and production are:

  • Heroku for running and hosting the deployed docker containers
  • MongoDB Atlas hosting the MongoDB database for data persistence
  • SecretHub as a secret manager for both services secret codes including Google OAuth secrets for authentication.
  • AWS S3 bucket for Terraform state management (with versioning enabled to preserve, retrieve, and restore every version of the state object stored in the bucket).
  • AWS DynamoDB (a NoSQL database) for Terraform state locking useful when making multiple concurrent infrastructural changes which could potentially corrupt the state.

The CI/CD pipeline uses Github Actions:

Github Actions automatically deploy the server Docker container in both staging and production environments in Heroku

  • The staging app delivery is a push based pipeline wherein there are automatic builds of the image, pushes of the image to DockerHub then pulls of that image which is pushed to Heroku registry and releases from the Heroku registry image to the staging environment(app) hosted on Heroku on pushes to the main branch.

  • The production app delivery pipeline is the same as the staging but its triggered on tags pushes after the staging deploy has been tested. :)