Code Monkey home page Code Monkey logo

loginov.rocks

Contentful Webhook CI Infrastructure CI Shared CI Update GitHub CI Web App CI

CD

This open-source project introduces a monorepo tailored for the development, management, and deployment of my website, serving as a showcase for various web development concepts, it is an embodiment of efficiency, automation, and scalability.

Architecture

Overview

At its core, the Monorepo architecture consolidates the code of different services, the website itself, and configurations within a single repository, simplifying versioning and dependency management. Embracing Serverless architecture, powered by AWS Lambda functions, ensures a cost-effective approach to handling tasks triggered by events like content updates or scheduled GitHub data retrieval.

Cloud-native principles drive the utilization of AWS services such as SQS and S3, optimizing scalability and integration. The project also adheres to Infrastructure as Code (IaC) practices, defining the entire infrastructure for reproducibility and simplified change management. Static Site Generation enhances website performance, and pre-rendering content to boost user experience and search engine visibility.

The project's Event-driven approach adeptly responds to changes in content or the codebase. Continuous Integration and Continuous Deployment (CI/CD) pipelines, incorporating Quality Gates like build, test, and deployment processes, automate workflows seamlessly. Security remains paramount through the implementation of the Principle of Least Privilege, effectively minimizing potential risks.

Notably, the project also incorporates a Headless CMS approach for flexible content management and Containerization for efficient deployment and scalability. Website implements Single Page Application (SPA) architecture supporting Hybrid Rendering to strike a balance between server-side generation and client-side rendering for optimal performance.

This simplified yet comprehensive project benefits from efficient content management, automated workflows, and a scalable, cost-effective infrastructure. It stands as a practical template, showcasing best practices in modern web development, and provides an inclusive solution for developers seeking to elevate their projects.

Infrastructure View

Infrastructure View

Workflows

A) Contentful Update

  1. Editor changes the content in Contentful
  2. Contentful triggers Contentful Webhook Lambda
  3. Contentful Webhook sends a message to SQS Queue
  4. see C) Static Site Generation

B) GitHub Update

  1. EventBridge Update GitHub Rule triggers Update GitHub Function Lambda by schedule (once a day)
  2. Update GitHub Function gets data from GitHub API
  3. GitHub API resolves personal access token to a particular user's GitHub Profile and returns user data
  4. Update GitHub Function writes GitHub file (if not changed) to S3 Data Bucket
  5. Data Bucket sends a Put Object notification in the form of a message to SQS Queue
  6. see C) Static Site Generation

C) Static Site Generation

  1. SQS Queue waits for a batch of messages for 5 minutes and triggers Web App Function Lambda
  2. Web App Function gets GitHub file from S3 Data Bucket
  3. Web App Function gets Contentful data from Contentful Delivery API
  4. Contentful Delivery API gets data from Contentful and returns
  5. Web App Function builds Web App static assets and deploys them to S3 Web App Bucket

D) Continuous Deployment

  1. Developer pushes tag to GitHub Repository
  2. GitHub Repository triggers GitHub CD Action
  3. GitHub CD Action builds artifacts and uploads them to AWS Infrastructure
  4. GitHub CD Action deploys Lambdas from artifacts uploaded

Docs

Reference

Danila Loginov's Projects

bluetooth-terminal icon bluetooth-terminal

ES6 class for serial communication with your own Bluetooth Low Energy (Smart) devices

connected-espresso-machine icon connected-espresso-machine

DIY project to upcycle old De'Longhi espresso machine into a smart Wi-Fi connected device with IoT capabilities

express-openapi-validator icon express-openapi-validator

🦋 An OpenApi validator for ExpressJS that automatically validates API requests using an OpenAPI 3.x specification,

gulpdoc icon gulpdoc

Documentation generator for Gulp tasks

locales-bundler icon locales-bundler

Script to merge deep hierarchy of JSON files into a flat set of objects (files) containing deep objects inside

node-aws-app icon node-aws-app

Monorepo for an application built completely with JavaScript, based on React and Nest frameworks and combining serverless and containerized approach on AWS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.