Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c986401
feat!: migrate to pnpm workspaces monorepo with Aurora DSQL and Drizz…
konokenj Mar 20, 2026
1b11ecb
fix: lazy db initialization and document VPC ENI cleanup for v2→v3 mi…
konokenj Mar 20, 2026
c894c39
docs: expand task 12 with staged verification methodology
konokenj Mar 20, 2026
bcaa396
feat(db): add drizzle-kit generate workflow with DSQL compatibility c…
konokenj Mar 20, 2026
b909331
feat(db): auto-transform drizzle-kit output for DSQL compatibility
konokenj Mar 20, 2026
bd5d6ac
docs: document migration-runner responsibility separation in plan
konokenj Mar 20, 2026
3675408
feat(db): add DSQL-compatible migration runner with tests
konokenj Mar 21, 2026
7c7926b
docs: add v3.0.0 design doc, ADRs, and migration prompt
konokenj Mar 22, 2026
87f325d
docs: restructure v3.0.0 design doc and ADRs
konokenj Mar 22, 2026
5654754
docs: review and consolidate v3.0.0 documentation
konokenj Mar 22, 2026
9bba505
chore: expand oxlint plugins and add agentic coding section
konokenj Mar 22, 2026
530c512
docs: rewrite migration-prompt.ja.md for agent accuracy and user-cent…
konokenj Mar 22, 2026
568dba0
docs: add staged build verification steps to migration prompt Phase 4
konokenj Mar 22, 2026
3d0bc10
docs: clarify migration prompt as planning template and add agentic c…
konokenj Mar 22, 2026
f764b29
build: add pre-commit hooks with simple-git-hooks and lint-staged
konokenj Mar 24, 2026
50af6f8
docs(db): apply v3 migration feedback from sample-ai-storybook
konokenj Mar 24, 2026
6d5cc8a
docs: reflect pre-commit hooks and script convention in v3 docs
konokenj Mar 24, 2026
9cb6eae
docs: document DSQL admin role as known limitation
konokenj Mar 25, 2026
7341043
docs: revise ADR-004 with accurate GRANT semantics and security analysis
konokenj Mar 26, 2026
ee2609c
docs: add Aurora PostgreSQL Express support plan
konokenj Mar 26, 2026
393e96c
feat(cdk): build all container images in CodeBuild via ContainerImage…
konokenj Mar 26, 2026
b2734cc
fix: address PR #126 review comments
konokenj Mar 26, 2026
50e5eb9
fix: apply feedback from v3 migration field testing
konokenj Mar 26, 2026
e9f4a4c
refactor: extract sendEvent into @repo/event-utils package and apply …
konokenj Mar 27, 2026
c2764c8
refactor: rewrite DSQL cluster management in TypeScript and add Name …
konokenj Mar 27, 2026
a0d90c8
chore: add minimumReleaseAge for supply chain security
konokenj Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# dependencies (reinstalled inside container)
**/node_modules

# build artifacts
**/.next
apps/cdk/cdk.out
apps/cdk/.cdk.staging

# vcs / ci / editor
.git
.github
.kiro
.playwright-cli

# docs / meta
.serverless-full-stack-webapp-starter-kit
scripts
*.md
LICENSE
CHANGELOG.md
42 changes: 13 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,23 @@ on:
workflow_dispatch:
pull_request:
jobs:
Build-and-Test-CDK:
Build-and-Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '22.x'
- run: |
npm ci
npm run format:check
working-directory: ./cdk
name: Install dependencies and run static analysis
- run: |
npm run build
npm run test
working-directory: ./cdk
name: build and test
Build-and-Test-Webapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '22.x'
- run: |
npm ci
npm run format:check
working-directory: ./webapp
name: Install dependencies and run static analysis
- run: |
cp .env.local.example .env.local
npm run build
working-directory: ./webapp
name: build
- name: Install pnpm
run: corepack enable && corepack prepare pnpm@10.8.1 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check
run: pnpm -r run check:ci
- name: Test
run: pnpm -r run test:unit
- name: Build
run: |
cp apps/webapp/.env.local.example apps/webapp/.env.local
pnpm -r run build
9 changes: 5 additions & 4 deletions .github/workflows/update_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: "22.x"
- name: Install pnpm
run: corepack enable && corepack prepare pnpm@10.8.1 --activate
- run: |
npm ci
npm run test -- -u
working-directory: ./cdk
pnpm install --frozen-lockfile
cd apps/cdk && pnpm run test:unit -u
- name: Add & Commit
uses: EndBug/add-and-commit@v7.2.0
with:
add: "cdk/test/__snapshots__/."
add: "apps/cdk/test/__snapshots__/."
message: "update snapshot"
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
node_modules
.DS_Store
*.pem
*.tsbuildinfo
*.bkp

# env files
.env*
!.env.local.example
!.env.credentials

# next.js
.next
out

# cdk
cdk.out
.cdk.staging

# debug
npm-debug.log*
yarn-debug.log*
.pnpm-debug.log*

# generated
dist

# dev tools
.kiro/settings/
.playwright-cli/
8 changes: 8 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120
}
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

80 changes: 80 additions & 0 deletions .serverless-full-stack-webapp-starter-kit/DESIGN_PRINCIPLES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Design Principles

This document is for kit maintainers. If you copied this kit to build your own app, you can safely delete the `.serverless-full-stack-webapp-starter-kit/` directory.

## What this kit is

A template you **copy** (not fork) and grow into your own app. It is not a framework — users are expected to read, understand, and modify every file.

## Quality standards

As an aws-samples project:

- Correctness is the top priority — users learn patterns from this code.
- Reproducibility — following the README must produce a working deployment.
- Readability — code should be understandable by developers new to serverless.
- One-command deploy — `pnpm exec cdk deploy --all` must be the only deployment step.

The litmus test for any PR: "After this merges, will a developer who copies the kit build their app on a correct understanding?"

## Design decisions

### Template, not framework

- Breaking changes have low impact — users copy and diverge. Major versions can be bumped without a lengthy deprecation cycle.
- The sample app exists solely to prove all kit components work together. Users will delete it. Do not expand sample app features beyond what is needed for this proof.
- Avoid over-abstraction. Readability and modifiability matter more than DRY.

### What to include

- Patterns that every serverless full-stack webapp needs (auth, DB, async jobs, real-time).
- Operational essentials (migration, logging, cost-optimized defaults).
- Only what cannot be trivially added later.

### What to exclude

- App-specific business logic.
- Dependencies on specific AI models or services.
- Patterns needed by fewer than half of expected users.

### Technology choices

| Choice | Rationale |
|--------|-----------|
| Aurora DSQL over Aurora Serverless v2 | No VPC required, true pay-per-request, IAM authentication. Eliminates NAT Instance cost and VPC complexity. |
| Drizzle ORM over Prisma | Pure TypeScript (no `prisma generate`), `relations()` naturally fits DSQL's no-FK constraint, simpler monorepo sharing. |
| Custom migration runner over `drizzle-kit push` | DSQL requires 1 DDL per transaction. The runner splits SQL on blank lines and validates DSQL compatibility before execution. |
| Single Lambda for all async jobs | Reduces cold starts and simplifies deployment. `cmd` parameter selects the entry point. |
| `proxy.ts` over Next.js middleware | Runs inside Lambda handler, avoiding cold-start CPU starvation from JWKS fetch in middleware. |
| `output: 'standalone'` | Required for Lambda deployment via Docker image. |
| Lambda Web Adapter | Enables response streaming with CloudFront + Lambda Function URL. |
| oxlint + oxfmt over ESLint + Prettier | Faster linting and formatting. Type-aware linting via oxlint-tsgolint replaces `tsc --noEmit`. |

## Major version process

Design documents and ADRs record not just decisions but **intent**. In AI-driven development, intent outlives code: when models or workflows evolve, regenerating from intent can produce better results than patching existing code. Users who "copy and grow" this kit may not copy files verbatim — they read the intent and have an AI agent re-implement it for their context.

When a major technology decision is made (e.g., ORM migration, database engine change), the following artifacts are produced. In practice the process is iterative, but the dependency direction is:

```
research → ADR → design doc → implementation plan → code → migration prompt
```

| Artifact | Path | Committed | Description |
|----------|------|-----------|-------------|
| research | — | No | Technology investigation, constraint analysis, prototype validation. |
| ADR | `docs/<version>/adr-NNN-<slug>[.lang].md` | Yes | Immutable decision records (Nygard format). What was chosen, what was rejected, and why. Must be self-contained. Once published, write a new ADR to supersede rather than editing. |
| design doc | `docs/<version>/design[.lang].md` | Yes | Implementation specification. References ADRs for rationale; focuses on "how it works". |
| implementation plan | — | No | Task breakdown with ordering, dependencies, and verification criteria. Working document consumed during implementation and discarded after. |
| code | — | Yes | Implementation following the design doc. |
| migration prompt | `docs/<version>/migration-prompt[.lang].md` | Yes | AI coding agent meta-prompt for migrating user codebases. Written last — requires knowledge that only emerges during implementation (e.g., VPC ENI cleanup timing, ESM module evaluation order). Not a step-by-step procedure for humans; the agent reads it, compares against the user's codebase, and builds a project-specific migration plan with phased execution and checkpoints to prevent data loss. |

To surface the migration guide in release notes, include a link in the `BREAKING CHANGE:` commit footer:

```
feat!: replace ORM from Prisma to Drizzle

BREAKING CHANGE: ORM has been replaced. See [migration guide](docs/v3.0.0/migration-prompt.ja.md) for details.
```

release-please will carry this into the Breaking Changes section of the GitHub Release.

This file was deleted.

Loading
Loading