Giter Club home page Giter Club logo

crisboarna.com's Introduction

Table of Contents

Development

Languages and tools used

  1. Typescript
  2. AWS CDK
  3. ReactJS
  4. Webpack
  5. Nx Monorepo

Installation

yarn install

Running

Building

Build can be triggered across all services (api-mock,infra,web) by running

yarn build

Alternatively each can be run individually via one of the commands

nx build api-mock
nx build infra
nx build web

Linting

Linting can be triggered across all services (api-mock,infra,web) by running

yarn lint

Alternatively each can be run individually via one of the commands

nx lint api-mock
nx lint infra
nx lint web

Note

Infrastructure CDK code is linted with eslint and cdk-nag, the CDK equivalent of Cloudformation cfn_nag to ensure standard & best practice adherence by IaC.

Other apps are linted with eslint.

Testing

Tests can be run across all services (api-mock,infra,web) by running

yarn test

Alternatively each can be run individually via one of the commands

nx test api-mock
nx test infra
nx test web

Testing coverage is enforced globally via the individual jest.config.js as follows

Infrastructure

Architectural Diagram

WIP

Deployment order

  1. CI
  2. ACM
  3. Monitoring-Base
  4. Lambda
  5. API
  6. CDN
  7. S3
  8. Monitoring-Wrapper

Note Deployment order is important as subsequent stacks have dependencies on previous ones.

Local deployment

cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/CI.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/ACM.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/ACM.ts' -c GLOBAL_CONSTRUCTS=true
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/Monitoring-Base.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/Monitoring-Base.ts' -c GLOBAL_CONSTRUCTS=true
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/Lambda.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/API.ts'
cdk deploy -a 'npx ts-node --prefer-ts-exts -P apps/infra/tsconfig.app.json -r tsconfig-paths/register -r dotenv/config apps/infra/src/bin/CDN.ts'

Cloudformation Resource Diagrams

These are the diagrams of all resources and their connections as generated by cfn-diagram from the CDK source code.

To generate the diagram on the fly while tweaking the infrastructure run

nx diagram:ci infra
nx diagram:acm infra
nx diagram:monitoring-base infra
nx diagram:lambda infra
nx diagram:api infra
nx diagram:cdn infra

License

CC0

Full license details can be found in LICENSE.md

crisboarna.com's People

Contributors

crisboarna avatar semantic-release-bot avatar

Watchers

James Cloos avatar  avatar  avatar

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.