From e7253b51c976ebcf4796c3aefaf37b9a061d76af Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Wed, 9 Jul 2025 23:38:38 -0400 Subject: [PATCH 01/17] docs: migrate to material for mkdocs and streamline configuration - Adopt the Material for MkDocs theme for a modern, responsive design. - Remove broken links and unused plugins from mkdocs.yml. - Relocate the site logo to docs/assets for proper loading. - Remove the redundant documentation link from the site footer. --- .github/workflows/docs.yml | 58 +++++++++++++ .gitignore | 3 +- icon.png => docs/assets/icon.png | Bin docs/constructs/dynamodb-table.md | 26 +++--- docs/constructs/lambda-function.md | 39 ++++----- docs/constructs/static-site.md | 26 +++--- docs/index.md | 29 +++---- mkdocs.yml | 126 +++++++++++++++++++++++++++++ requirements.txt | 3 + 9 files changed, 238 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/docs.yml rename icon.png => docs/assets/icon.png (100%) create mode 100644 mkdocs.yml create mode 100644 requirements.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..1fb356b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,58 @@ +name: Documentation + +on: + push: + branches: [main] + paths: + - 'docs/**' + - 'mkdocs.yml' + - 'requirements.txt' + - '.github/workflows/docs.yml' + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Build documentation + run: mkdocs build --clean + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./site + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 77b7f53..d7d4f0e 100644 --- a/.gitignore +++ b/.gitignore @@ -417,4 +417,5 @@ FodyWeavers.xsd *.msm *.msp -.idea \ No newline at end of file +.idea +/site diff --git a/icon.png b/docs/assets/icon.png similarity index 100% rename from icon.png rename to docs/assets/icon.png diff --git a/docs/constructs/dynamodb-table.md b/docs/constructs/dynamodb-table.md index 71cd55c..b00fc6b 100644 --- a/docs/constructs/dynamodb-table.md +++ b/docs/constructs/dynamodb-table.md @@ -1,22 +1,16 @@ ---- -layout: default -title: DynamoDB Table Construct -permalink: /constructs/dynamodb-table/ ---- - # DynamoDB Table Construct The `DynamoDbTableConstruct` provides a comprehensive, production-ready DynamoDB table with support for global secondary indexes, streams, TTL, and Lambda integration. -## Features +## :bar_chart: Features -- **Flexible Key Schema**: Support for partition keys, sort keys, and composite keys -- **Global Secondary Indexes**: Multiple GSIs with custom key schemas -- **DynamoDB Streams**: Real-time data processing with Lambda integration -- **TTL Support**: Automatic data expiration -- **CloudFormation Outputs**: Automatic exports for table ARN, name, and stream ARN -- **Lambda Integration**: Built-in method for attaching Lambda functions to streams -- **Billing Modes**: Support for both PAY_PER_REQUEST and PROVISIONED billing +- **:key: Flexible Key Schema**: Support for partition keys, sort keys, and composite keys +- **:index_pointing_at_the_viewer: Global Secondary Indexes**: Multiple GSIs with custom key schemas +- **:ocean: DynamoDB Streams**: Real-time data processing with Lambda integration +- **:hourglass: TTL Support**: Automatic data expiration +- **:outbox_tray: CloudFormation Outputs**: Automatic exports for table ARN, name, and stream ARN +- **:zap: Lambda Integration**: Built-in method for attaching Lambda functions to streams +- **:credit_card: Billing Modes**: Support for both PAY_PER_REQUEST and PROVISIONED billing ## Basic Usage @@ -274,8 +268,8 @@ var eventTable = new DynamoDbTableConstruct(this, "EventTable", new DynamoDbTabl ## Testing -See the [Testing Guide](../testing/) for comprehensive testing utilities and patterns specific to the DynamoDB Table construct. +See the [Testing Guide](../testing/index.md) for comprehensive testing utilities and patterns specific to the DynamoDB Table construct. ## Examples -For more real-world examples, see the [Examples](../examples/) section. \ No newline at end of file +For more real-world examples, see the [Examples](../examples/index.md) section. \ No newline at end of file diff --git a/docs/constructs/lambda-function.md b/docs/constructs/lambda-function.md index e48cf3e..9400537 100644 --- a/docs/constructs/lambda-function.md +++ b/docs/constructs/lambda-function.md @@ -1,22 +1,16 @@ ---- -layout: default -title: Lambda Function Construct -permalink: /constructs/lambda-function/ ---- - # Lambda Function Construct The `LambdaFunctionConstruct` provides a comprehensive, production-ready Lambda function with integrated OpenTelemetry support, IAM management, and environment configuration. -## Features +## :rocket: Features -- **OpenTelemetry Integration**: Built-in AWS OpenTelemetry collector layer -- **IAM Management**: Automatic role and policy creation with CloudWatch Logs permissions -- **Environment Configuration**: Easy environment variable management -- **Function URLs**: Optional HTTP endpoint generation -- **SnapStart Support**: Improved cold start performance for Java runtimes -- **Versioning & Aliases**: Automatic version management with "live" alias -- **Lambda Permissions**: Multi-target permission management (function, version, alias) +- **:chart_with_upwards_trend: OpenTelemetry Integration**: Built-in AWS OpenTelemetry collector layer +- **:shield: IAM Management**: Automatic role and policy creation with CloudWatch Logs permissions +- **:gear: Environment Configuration**: Easy environment variable management +- **:link: Function URLs**: Optional HTTP endpoint generation +- **:rocket: SnapStart Support**: Improved cold start performance for Java runtimes +- **:label: Versioning & Aliases**: Automatic version management with "live" alias +- **:key: Lambda Permissions**: Multi-target permission management (function, version, alias) ## Basic Usage @@ -174,15 +168,16 @@ var lambda = new LambdaFunctionConstruct(this, "MyLambda", new LambdaFunctionCon var domain = lambda.LiveAliasFunctionUrlDomain; // Returns the domain string ``` -## Runtime Configuration +## :computer: Runtime Configuration The Lambda functions use the following runtime configuration: -- **Runtime**: `PROVIDED_AL2023` (Amazon Linux 2023) -- **Handler**: `bootstrap` (for custom runtimes) -- **Architecture**: x86_64 -- **Log Retention**: 2 weeks -- **OpenTelemetry Layer**: AWS managed layer (us-east-1 region) +!!! info "Runtime Details" + - **Runtime**: `PROVIDED_AL2023` (Amazon Linux 2023) + - **Handler**: `bootstrap` (for custom runtimes) + - **Architecture**: x86_64 + - **Log Retention**: 2 weeks + - **OpenTelemetry Layer**: AWS managed layer (us-east-1 region) ## IAM Permissions @@ -206,8 +201,8 @@ The construct automatically creates: ## Testing -See the [Testing Guide](../testing/) for comprehensive testing utilities and patterns specific to the Lambda Function construct. +See the [Testing Guide](../testing/index.md) for comprehensive testing utilities and patterns specific to the Lambda Function construct. ## Examples -For more real-world examples, see the [Examples](../examples/) section. \ No newline at end of file +For more real-world examples, see the [Examples](../examples/index.md) section. \ No newline at end of file diff --git a/docs/constructs/static-site.md b/docs/constructs/static-site.md index 7205d5a..8e3cbfa 100644 --- a/docs/constructs/static-site.md +++ b/docs/constructs/static-site.md @@ -1,22 +1,16 @@ ---- -layout: default -title: Static Site Construct -permalink: /constructs/static-site/ ---- - # Static Site Construct The `StaticSiteConstruct` provides complete static website hosting with S3, CloudFront CDN, SSL certificates, Route53 DNS management, and optional API proxying. -## Features +## :globe_with_meridians: Features -- **S3 Website Hosting**: Optimized S3 bucket configuration for static websites -- **CloudFront CDN**: Global content delivery with custom error pages -- **SSL Certificates**: Automatic SSL certificate provisioning and management -- **Route53 DNS**: DNS record management for primary and alternate domains -- **API Proxy Support**: Optional CloudFront behavior for `/api/*` paths -- **Asset Deployment**: Automatic deployment with cache invalidation -- **Custom Error Pages**: 404 and 403 error page handling +- **:file_cabinet: S3 Website Hosting**: Optimized S3 bucket configuration for static websites +- **:zap: CloudFront CDN**: Global content delivery with custom error pages +- **:lock: SSL Certificates**: Automatic SSL certificate provisioning and management +- **:globe_with_meridians: Route53 DNS**: DNS record management for primary and alternate domains +- **:arrows_counterclockwise: API Proxy Support**: Optional CloudFront behavior for `/api/*` paths +- **:package: Asset Deployment**: Automatic deployment with cache invalidation +- **:warning: Custom Error Pages**: 404 and 403 error page handling ## Basic Usage @@ -211,8 +205,8 @@ var docs = new StaticSiteConstruct(this, "Docs", new StaticSiteConstructProps ## Testing -See the [Testing Guide](../testing/) for comprehensive testing utilities and patterns specific to the Static Site construct. +See the [Testing Guide](../testing/index.md) for comprehensive testing utilities and patterns specific to the Static Site construct. ## Examples -For more real-world examples, see the [Examples](../examples/) section. \ No newline at end of file +For more real-world examples, see the [Examples](../examples/index.md) section. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 7037054..6ad7ea7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,3 @@ ---- -layout: default -title: LayeredCraft CDK Constructs ---- - # LayeredCraft CDK Constructs [![Build Status](https://github.com/LayeredCraft/cdk-constructs/actions/workflows/build.yaml/badge.svg)](https://github.com/LayeredCraft/cdk-constructs/actions/workflows/build.yaml) @@ -11,14 +6,14 @@ title: LayeredCraft CDK Constructs A comprehensive library of reusable AWS CDK constructs for .NET projects, designed for serverless applications and static websites. Built with best practices, observability, and cost efficiency in mind. -## Key Features +## :rocket: Key Features -- **๐Ÿš€ Lambda Functions**: Comprehensive Lambda construct with OpenTelemetry support, IAM management, and environment configuration -- **๐ŸŒ Static Sites**: Complete static website hosting with S3, CloudFront, SSL certificates, and Route53 DNS management -- **๐Ÿ“Š DynamoDB Tables**: Full-featured DynamoDB construct with streams, TTL, and global secondary indexes -- **๐Ÿงช Testing Helpers**: Extensive testing utilities with fluent assertions and builders -- **๐Ÿ“ Type Safety**: Full TypeScript-style intellisense and compile-time validation -- **โšก Performance**: Optimized for cold starts with AWS Lambda SnapStart support +- **:zap: Lambda Functions**: Comprehensive Lambda construct with OpenTelemetry support, IAM management, and environment configuration +- **:globe_with_meridians: Static Sites**: Complete static website hosting with S3, CloudFront, SSL certificates, and Route53 DNS management +- **:bar_chart: DynamoDB Tables**: Full-featured DynamoDB construct with streams, TTL, and global secondary indexes +- **:test_tube: Testing Helpers**: Extensive testing utilities with fluent assertions and builders +- **:memo: Type Safety**: Full TypeScript-style intellisense and compile-time validation +- **:zap: Performance**: Optimized for cold starts with AWS Lambda SnapStart support ## Installation @@ -61,7 +56,7 @@ public class MyStack : Stack ## Available Constructs -### [Lambda Function Construct](constructs/lambda-function) +### [:zap: Lambda Function Construct](constructs/lambda-function.md) Full-featured Lambda functions with: - OpenTelemetry integration - IAM roles and policies @@ -70,7 +65,7 @@ Full-featured Lambda functions with: - SnapStart support - Versioning and aliases -### [Static Site Construct](constructs/static-site) +### [:globe_with_meridians: Static Site Construct](constructs/static-site.md) Complete static website hosting with: - S3 website hosting - CloudFront CDN @@ -78,7 +73,7 @@ Complete static website hosting with: - Route53 DNS - API proxy support -### [DynamoDB Table Construct](constructs/dynamodb-table) +### [:bar_chart: DynamoDB Table Construct](constructs/dynamodb-table.md) Production-ready DynamoDB tables with: - Global secondary indexes - DynamoDB streams @@ -87,8 +82,8 @@ Production-ready DynamoDB tables with: ## Documentation -- **[Testing Guide](testing/)** - Comprehensive testing utilities and patterns -- **[Examples](examples/)** - Real-world usage examples and patterns +- **[Testing Guide](testing/index.md)** - Comprehensive testing utilities and patterns +- **[Examples](examples/index.md)** - Real-world usage examples and patterns ## Requirements diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..6e7bb8b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,126 @@ +site_name: LayeredCraft CDK Constructs +site_description: Reusable AWS CDK constructs for .NET serverless applications +site_url: https://layeredcraft.github.io/cdk-constructs/ +site_author: LayeredCraft Team + +# Repository +repo_name: LayeredCraft/cdk-constructs +repo_url: https://github.com/LayeredCraft/cdk-constructs +edit_uri: edit/main/docs/ + +# Copyright +copyright: Copyright © 2024 LayeredCraft Team + +# Configuration +theme: + name: material + language: en + logo: assets/icon.png + favicon: assets/icon.png + + features: + - content.code.copy + - content.code.select + - navigation.expand + - navigation.footer + - navigation.instant + - navigation.sections + - navigation.tabs + - navigation.tabs.sticky + - navigation.top + - search.highlight + - search.share + - search.suggest + - toc.follow + + # Dark/Light mode toggle + palette: + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: indigo + accent: indigo + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: indigo + accent: indigo + toggle: + icon: material/brightness-4 + name: Switch to light mode + + font: + text: Roboto + code: Roboto Mono + +# Plugins +plugins: + - search + - minify: + minify_html: true + +# Extensions +markdown_extensions: + # Python Markdown + - abbr + - admonition + - attr_list + - def_list + - footnotes + - md_in_html + - toc: + permalink: true + + # Python Markdown Extensions + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.details + - pymdownx.emoji: + emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.snippets: + auto_append: + - includes/mkdocs.md + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + +# Navigation +nav: + - Home: index.md + - Constructs: + - Lambda Function: constructs/lambda-function.md + - Static Site: constructs/static-site.md + - DynamoDB Table: constructs/dynamodb-table.md + - Testing: testing/index.md + - Examples: examples/index.md + +# Social links +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/LayeredCraft/cdk-constructs + name: GitHub Repository + - icon: fontawesome/solid/download + link: https://www.nuget.org/packages/LayeredCraft.Cdk.Constructs/ + name: NuGet Package \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6d58373 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +mkdocs>=1.5.3 +mkdocs-material>=9.4.6 +mkdocs-minify-plugin>=0.7.1 \ No newline at end of file From cd9a7280ef3325f242dfb9e8ecf096687b0a1831 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Wed, 9 Jul 2025 23:44:56 -0400 Subject: [PATCH 02/17] Update docs.yml --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1fb356b..e359a79 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,7 +42,7 @@ jobs: run: mkdocs build --clean - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./site @@ -55,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v4 \ No newline at end of file From efabaf051d7a6984140bc5f5602194ce5bc85c09 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Wed, 9 Jul 2025 23:47:32 -0400 Subject: [PATCH 03/17] Update docs.yml --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e359a79..f7caf2e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,6 +8,7 @@ on: - 'mkdocs.yml' - 'requirements.txt' - '.github/workflows/docs.yml' + workflow_dispatch: permissions: contents: read From 33e7591f48797179528529620c2da93eac315b18 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Wed, 9 Jul 2025 23:44:56 -0400 Subject: [PATCH 04/17] Update docs.yml --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1fb356b..e359a79 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,7 +42,7 @@ jobs: run: mkdocs build --clean - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./site @@ -55,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v4 \ No newline at end of file From 263faffa71603fd315afd9386021f3ce99b18e94 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Wed, 9 Jul 2025 23:47:32 -0400 Subject: [PATCH 05/17] Update docs.yml --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e359a79..f7caf2e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,6 +8,7 @@ on: - 'mkdocs.yml' - 'requirements.txt' - '.github/workflows/docs.yml' + workflow_dispatch: permissions: contents: read From 97452cee16179f6055bcad061be455b1d364f7f8 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 09:52:40 -0400 Subject: [PATCH 06/17] Update mkdocs.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 6e7bb8b..165dec2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,8 +15,8 @@ copyright: Copyright © 2024 LayeredCraft Team theme: name: material language: en - logo: assets/icon.png - favicon: assets/icon.png + logo: docs/assets/icon.png + favicon: docs/assets/icon.png features: - content.code.copy From 0819e77e62c1f909832deb515364962d444b18aa Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 09:57:30 -0400 Subject: [PATCH 07/17] Update mkdocs.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- mkdocs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 165dec2..83640a5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -91,9 +91,7 @@ markdown_extensions: - pymdownx.keys - pymdownx.mark - pymdownx.smartsymbols - - pymdownx.snippets: - auto_append: - - includes/mkdocs.md + - pymdownx.snippets - pymdownx.superfences: custom_fences: - name: mermaid From 490136c3a37face18f29fd252c118bb9bf70d92a Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:03:33 -0400 Subject: [PATCH 08/17] Fix logo and add emoticons back to file --- docs/index.md | 33 +++++++++++++++++++++------------ mkdocs.yml | 7 ++----- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6ad7ea7..32dcafb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,7 @@ -# LayeredCraft CDK Constructs +--- +layout: default +title: LayeredCraft CDK Constructs +--- [![Build Status](https://github.com/LayeredCraft/cdk-constructs/actions/workflows/build.yaml/badge.svg)](https://github.com/LayeredCraft/cdk-constructs/actions/workflows/build.yaml) [![NuGet](https://img.shields.io/nuget/v/LayeredCraft.Cdk.Constructs.svg)](https://www.nuget.org/packages/LayeredCraft.Cdk.Constructs/) @@ -6,14 +9,14 @@ A comprehensive library of reusable AWS CDK constructs for .NET projects, designed for serverless applications and static websites. Built with best practices, observability, and cost efficiency in mind. -## :rocket: Key Features +## Key Features -- **:zap: Lambda Functions**: Comprehensive Lambda construct with OpenTelemetry support, IAM management, and environment configuration -- **:globe_with_meridians: Static Sites**: Complete static website hosting with S3, CloudFront, SSL certificates, and Route53 DNS management -- **:bar_chart: DynamoDB Tables**: Full-featured DynamoDB construct with streams, TTL, and global secondary indexes -- **:test_tube: Testing Helpers**: Extensive testing utilities with fluent assertions and builders -- **:memo: Type Safety**: Full TypeScript-style intellisense and compile-time validation -- **:zap: Performance**: Optimized for cold starts with AWS Lambda SnapStart support +- **๐Ÿš€ Lambda Functions**: Comprehensive Lambda construct with OpenTelemetry support, IAM management, and environment configuration +- **๐ŸŒ Static Sites**: Complete static website hosting with S3, CloudFront, SSL certificates, and Route53 DNS management +- **๐Ÿ“Š DynamoDB Tables**: Full-featured DynamoDB construct with streams, TTL, and global secondary indexes +- **๐Ÿงช Testing Helpers**: Extensive testing utilities with fluent assertions and builders +- **๐Ÿ“ Type Safety**: Full TypeScript-style intellisense and compile-time validation +- **โšก Performance**: Optimized for cold starts with AWS Lambda SnapStart support ## Installation @@ -56,8 +59,10 @@ public class MyStack : Stack ## Available Constructs -### [:zap: Lambda Function Construct](constructs/lambda-function.md) +### [Lambda Function Construct](constructs/lambda-function.md) + Full-featured Lambda functions with: + - OpenTelemetry integration - IAM roles and policies - Environment variables @@ -65,16 +70,20 @@ Full-featured Lambda functions with: - SnapStart support - Versioning and aliases -### [:globe_with_meridians: Static Site Construct](constructs/static-site.md) +### [Static Site Construct](constructs/static-site.md) + Complete static website hosting with: + - S3 website hosting - CloudFront CDN - SSL certificates - Route53 DNS - API proxy support -### [:bar_chart: DynamoDB Table Construct](constructs/dynamodb-table.md) +### [DynamoDB Table Construct](constructs/dynamodb-table.md) + Production-ready DynamoDB tables with: + - Global secondary indexes - DynamoDB streams - TTL configuration @@ -98,4 +107,4 @@ See the main [README](https://github.com/LayeredCraft/cdk-constructs#contributin ## License -This project is licensed under the [MIT License](https://github.com/LayeredCraft/cdk-constructs/blob/main/LICENSE). \ No newline at end of file +This project is licensed under the [MIT License](https://github.com/LayeredCraft/cdk-constructs/blob/main/LICENSE). diff --git a/mkdocs.yml b/mkdocs.yml index 165dec2..937f4ad 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,8 +15,8 @@ copyright: Copyright © 2024 LayeredCraft Team theme: name: material language: en - logo: docs/assets/icon.png - favicon: docs/assets/icon.png + logo: assets/icon.png + favicon: assets/icon.png features: - content.code.copy @@ -91,9 +91,6 @@ markdown_extensions: - pymdownx.keys - pymdownx.mark - pymdownx.smartsymbols - - pymdownx.snippets: - auto_append: - - includes/mkdocs.md - pymdownx.superfences: custom_fences: - name: mermaid From 30b15879c1ce192b23d63f2746baabd97a1475fc Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:15:11 -0400 Subject: [PATCH 09/17] Update docs.yml --- .github/workflows/docs.yml | 42 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f7caf2e..d2410f0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,52 +1,44 @@ -name: Documentation +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll with GitHub Pages dependencies preinstalled on: + # Runs on pushes targeting the default branch push: - branches: [main] - paths: - - 'docs/**' - - 'mkdocs.yml' - - 'requirements.txt' - - '.github/workflows/docs.yml' + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: + # Build job build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Setup Pages - uses: actions/configure-pages@v3 - - - name: Build documentation - run: mkdocs build --clean - + uses: actions/configure-pages@v5 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./ + destination: ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 - with: - path: ./site + # Deployment job deploy: environment: name: github-pages From f968cc0cc10f95451fc2ea4d87983db39baaba3e Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:17:12 -0400 Subject: [PATCH 10/17] Create jekyll-gh-pages.yml --- .github/workflows/jekyll-gh-pages.yml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/jekyll-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..e31d81c --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,51 @@ +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll with GitHub Pages dependencies preinstalled + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./ + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From b0565babbe9eb25b000c0bc4e6ca40edcf625e84 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:19:52 -0400 Subject: [PATCH 11/17] Update style.scss --- docs/assets/css/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index 399908a..c6166fd 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -1,7 +1,7 @@ --- --- -@import "minima"; +@import "{{ site.theme }}"; /* Custom styles for LayeredCraft CDK Constructs documentation */ From ea373d679287124d90729d6e0c6788e1d0363d2b Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:20:46 -0400 Subject: [PATCH 12/17] Delete docs.yml --- .github/workflows/docs.yml | 51 -------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index d2410f0..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Sample workflow for building and deploying a Jekyll site to GitHub Pages -name: Deploy Jekyll with GitHub Pages dependencies preinstalled - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Build with Jekyll - uses: actions/jekyll-build-pages@v1 - with: - source: ./ - destination: ./_site - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file From 94f49ae8fb08306def45383f82f947a88aa5f4f8 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:25:54 -0400 Subject: [PATCH 13/17] Update github actions --- .github/workflows/jekyll-gh-pages.yml | 51 ------------------- .../workflows/mkdocs-material-gh-pages.yml | 17 +++++++ 2 files changed, 17 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/jekyll-gh-pages.yml create mode 100644 .github/workflows/mkdocs-material-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml deleted file mode 100644 index e31d81c..0000000 --- a/.github/workflows/jekyll-gh-pages.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Sample workflow for building and deploying a Jekyll site to GitHub Pages -name: Deploy Jekyll with GitHub Pages dependencies preinstalled - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Build with Jekyll - uses: actions/jekyll-build-pages@v1 - with: - source: ./ - destination: ./_site - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/mkdocs-material-gh-pages.yml b/.github/workflows/mkdocs-material-gh-pages.yml new file mode 100644 index 0000000..90039e3 --- /dev/null +++ b/.github/workflows/mkdocs-material-gh-pages.yml @@ -0,0 +1,17 @@ +name: deploy-mkdocs +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: pip install -r requirements.txt + - run: mkdocs gh-deploy --force \ No newline at end of file From 8b9019bffa7a626eb1763a5a1c2deddddbc4e0bf Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:28:02 -0400 Subject: [PATCH 14/17] Delete _config.yml --- docs/_config.yml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 6b37a60..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,41 +0,0 @@ -title: LayeredCraft CDK Constructs -description: Reusable AWS CDK constructs for .NET serverless applications -baseurl: "/cdk-constructs" -url: "https://layeredcraft.github.io" - -# Theme settings -theme: minima -show_downloads: true -google_analytics: # Add your tracking ID if needed - -# Minima navigation -header_pages: - - constructs/lambda-function.md - - constructs/static-site.md - - constructs/dynamodb-table.md - - testing/index.md - - examples/index.md - -# Build settings -markdown: kramdown -plugins: - - jekyll-feed - - jekyll-sitemap - - jekyll-remote-theme - -# GitHub repository -github_username: LayeredCraft -repository: LayeredCraft/cdk-constructs - -# Exclude from processing -exclude: - - .sass-cache/ - - .jekyll-cache/ - - gemfiles/ - - Gemfile - - Gemfile.lock - - node_modules/ - - vendor/bundle/ - - vendor/cache/ - - vendor/gems/ - - vendor/ruby/ \ No newline at end of file From 4b3ae33a175f6fc0bb51bc1143706176c5775d26 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:30:33 -0400 Subject: [PATCH 15/17] Update mkdocs-material-gh-pages.yml --- .github/workflows/mkdocs-material-gh-pages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mkdocs-material-gh-pages.yml b/.github/workflows/mkdocs-material-gh-pages.yml index 90039e3..15ff314 100644 --- a/.github/workflows/mkdocs-material-gh-pages.yml +++ b/.github/workflows/mkdocs-material-gh-pages.yml @@ -1,5 +1,6 @@ name: deploy-mkdocs on: + workflow_dispatch: push: branches: - main @@ -14,4 +15,4 @@ jobs: with: python-version: 3.x - run: pip install -r requirements.txt - - run: mkdocs gh-deploy --force \ No newline at end of file + - run: mkdocs gh-deploy --force From 81a9f99ba86d00f386c371f77984563649ed3dbd Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 10:34:20 -0400 Subject: [PATCH 16/17] Update mkdocs-material-gh-pages.yml --- .../workflows/mkdocs-material-gh-pages.yml | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mkdocs-material-gh-pages.yml b/.github/workflows/mkdocs-material-gh-pages.yml index 15ff314..4d41272 100644 --- a/.github/workflows/mkdocs-material-gh-pages.yml +++ b/.github/workflows/mkdocs-material-gh-pages.yml @@ -1,18 +1,41 @@ name: deploy-mkdocs on: - workflow_dispatch: push: branches: - main permissions: - contents: write + contents: read + pages: write + id-token: write +concurrency: + group: "pages" + cancel-in-progress: false jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: 3.x - - run: pip install -r requirements.txt - - run: mkdocs gh-deploy --force + - name: Install dependencies + run: pip install -r requirements.txt + - name: Build MkDocs site + run: mkdocs build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './site' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file From a94076853a59dabd87a857c70cdfc46ada958080 Mon Sep 17 00:00:00 2001 From: Taylor Christian Date: Thu, 10 Jul 2025 11:09:06 -0400 Subject: [PATCH 17/17] Update LayeredCraft.Cdk.Constructs.csproj --- .../LayeredCraft.Cdk.Constructs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj b/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj index 0c03ee9..80cfa12 100644 --- a/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj +++ b/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj @@ -18,7 +18,7 @@ - +