Skip to content

pseudo-su/cdk-monorepo-template

Repository files navigation

CDK Monorepo Template

This repo is to experiment with having a NodeJS monorepo that contains multiple "service" packages that contain AWS CDK "apps" that can be packaged, versioned, published (as immutable artifacts) and deployed.

Goals

  • Support for packaging multiple "web services" from this monorepo where:
    • Everything will be packaged as CDK apps (made of cdk constructs and stacks)
    • Support creating immutable deployment artifacts (EG the opposite of this)
    • Uniform support for packages regardless of whether they "web apis" or "web sites"

Quickstart

Install global dependencies:

  • Install nvm
  • Install rush
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash;

# Install rush
npm install -g @microsoft/rush;

Run project scripts

nvm use;

rush install;

rush build;

rush verify;

rush test;

Packages

Services

The packages within the services/ folder contain web services. For our purposes a "service" is defined as a set of infastructure and code artifacts that combines together to culminate in something that exposes

  • @services/api-example: Example service containing an AWS Lambda + API Gateway Web API.
  • @services/site-example-spa: Example service containing a "Single Page App" (SPA) Web site (Using NextJS static export).
  • @services/site-example-ssr: Example service containing a "Server Side Rendered" (SSR) Web site (Using NextJS serverless mode).

Libraries

The packages within the libs/ folder contain libraries used at runtime by other libraries or services.

  • @libs/api-common: a set of re-usable utilities to assist in the creation of AWS Lambda + API Gateway Web API services.

Tools

  • @tools/base-config-eslint: Common base eslint rules and config to be used across all packages in this repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published