(POC) Monorepo that includes serverless microservices using AWS Lambda and Amazon MQ (RabbitMQ) for backend, Vercel for frontend (Next.js) with Terraform CDK infrastructure.
Monorepo using serverless microservices design with AWS Lambda
and Amazon MQ (RabbitMQ)
for backend,
Vercel for frontend (Next.js) with Terraform CDK infrastructure.
This turborepo uses pnpm as a packages manager. It includes the following packages/apps:
csv-to-pdf-microservice
: a python microservice that converts csv to pdf with RabbitMQ & kombu (messaging library)aggregation
: a Nestjs backend for frontend (Lambda function)web
: Next.js appeslint-config-custom
: eslint
configurations (includes eslint-config-next
and eslint-config-prettier
)tsconfig
: tsconfig.json
s used throughout the monorepoThis turborepo has some additional tools already setup for you:
git clone https://github.com/sinanbekar/turborepo-cdktf-microservices-app
cd turborepo-cdktf-microservices-app
pnpm install
To build all apps and packages, run the following command:
pnpm run build
To deploy frontend to Vercel, backend to AWS (Lambda), first install cdktf-cli:
pnpm add --global cdktf-cli@latest
cd infrastructure/cdktf
cdktf get # generate constructs from hcl providers
Please make sure that set up these environment variables: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
and VERCEL_API_TOKEN
and deploy
cdktf deploy backend frontend
To develop all apps and packages, run the following command:
pnpm run dev
Learn more about Terraform and CDK for Terraform:
Learn more about the power of Turborepo: