cdkbase

The AWS serverless template
built for Claude Code.

cdkbase is a fork-ready starter that ships with a Claude Code skill and MCP servers — so Claude can deploy, query, and extend your app from day one. Three frontends, a Hono API, Aurora DSQL, Cognito auth, and Stripe billing, all wired on AWS CDK.

Frontends

Three ways to ship a UI — all sharing one framework-agnostic auth core and one typed API client.

React Router SSR

Server-rendered React (React Router v7) on Lambda behind CloudFront, with server-authoritative sessions stored in httpOnly cookies. This very site runs on it.

Vite SPA

A client-only React app served from S3 + CloudFront, holding tokens in localStorage. Same API and auth core as the SSR app — a different rendering model to fork from.

Expo mobile

A React Native app (Expo Router) that reuses the same auth and API client, keeping tokens in the device keychain via expo-secure-store.

API & data

A typed backend on serverless Postgres, with passwordless auth across every client.

Hono API

A typed REST API (Hono) on Lambda behind API Gateway, with JWT middleware and a public-route allowlist. Ships todos CRUD and a waitlist endpoint as working examples.

Aurora DSQL

Serverless, distributed Postgres with IAM authentication — no passwords, just short-lived cached tokens. A custom UUID-keyed migrator respects DSQL’s constraints.

Cognito auth

Authentication on Amazon Cognito with minimal abstraction — built directly on the AWS SDK for JavaScript v3, leaning on Cognito’s managed auth service rather than wrapping it. A small framework-agnostic core adds pluggable token storage for web, SPA, and mobile.

Built for Claude Code

Agent-native from day one — so Claude can deploy, query, and extend the app, not just read it.

Claude Code skill

An operating manual bundled in the repo that teaches Claude Code the layout, deploy commands, and guardrails — so an agent can extend and ship it from the first session.

MCP servers

Two Model Context Protocol servers — one querying the database directly, one calling the REST API — that expose your data to Claude over HTTP with Cognito OAuth auto-discovery.

Payments

Subscription billing wired end-to-end and ready to switch on with your own keys.

Stripe billing

Multi-tier subscriptions via Stripe Checkout and the Customer Portal, behind a signature-verified, idempotent webhook. Secrets live in SSM Parameter Store, never in the Lambda env.

Infrastructure

One CDK app, nine focused stacks, deployed straight from your terminal.

AWS CDK — nine stacks

DNS, Auth, Database, the three frontends, the API, both MCP servers, and Billing — each its own CloudFormation stack, wired explicitly in code. Drop a feature by deleting its stack and folder.

SSO deploy model

AWS SSO with AWS_PROFILE selects the target environment; a single deploy command ships everything. No CI/CD indirection, no context flags, and no runtime feature toggles.

Fork it, point it at your AWS account, and ship.