If you want to build a serverless app with AWS CDK, Lambda, and Postgres, this is the template for you.
You can click "Use this template" button in GitHub to fork this repo. You can merge in improvements in this repo to your project over time.
Clone your copy of this template, then do a search and replace for "myapp" to give it a name.
Assumes you have Node 18 installed and AWS credentials configured.
npm i -g pnpm # install pnpm globally
pnpm i # install dependencies + generate types from DB and GQL schemas
pnpm dev # start local dev server
All features are optional, delete what you don't need.
Click links to learn more and view documentation.
- 🌩 Serverless Stack - powerful CDK developer experience tools
- 🌤 AWS CDK - cloud-native infrastructure as code
- ፨ GraphQL API
- ⇅ AWS AppSync - serverless GraphQL AWS service
- ✽ Code generation of TypeScript + apollo client
- 🌐 REST API gateway
- 🖥 NextJS frontend w/ Material-UI
- 🎨 Material-UI - react components and styling solution
- 🔓 NextAuth.js - authentication and session management
- 🔓 AWS Cognito - authentication backend
- 💾 Prisma ORM
- 📚 Prisma engine lambda layer
- 📜 Prisma DB migration CDK script
- 🐳 Database integration test setup with postgres in docker
- 🔋 Aurora Serverless RDS PostgreSQL
- ⚡️ Live local lambda development (
pnpm dev
)- 🐞 Lambda debugging - set breakpoints on your lambda functions and step through in your IDE
- 📦 pnpm - fast and correct package manager
- 🚅 vitest - fast tests
- 🐛 ES Modules
- 🔧 ESBuild - fast code bundling on backend (under the hood) with tree-shaking
- 🫙 Middy - middleware for Lambda functions
- 🛠 AWS Lambda Powertools - for custom metrics, structured logging, and tracing.
Please see package.json scripts
for more.
pnpm dev
pnpm dev:web
pnpm db:migrate:dev
pnpm watch
pnpm deploy
pnpm deploy --region eu-west-1 --profile dev
pnpm exec sst
pnpm exec cdk