Languages and tools used
- Typescript
- AWS CDK
- ReactJS
- Webpack
- Nx Monorepo
yarn install
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 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
.
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
WIP
- CI
- ACM
- Monitoring-Base
- Lambda
- API
- CDN
- S3
- Monitoring-Wrapper
Note Deployment order is important as subsequent stacks have dependencies on previous ones.
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'
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
Full license details can be found in LICENSE.md