Skip to content

A CDK factory package for AI coding agents to safely and effectively craft CDK for projects.

Notifications You must be signed in to change notification settings

SourceCode/aitools-cdk-factory

Repository files navigation

Aitool CDK Factory

Security-First AWS CDK Infrastructure Factory for AI Agents

Logo

Project Overview

aitool-cdk-factory is a type-safe, deterministic factory that generates production-grade AWS Infrastructure as Code (IaC). It is designed specifically for AI Coding Agents and Senior Engineers who need to convert abstract requirements (Docker Compose, JSON Specs) into secure, policy-compliant AWS CDK stacks.

Unlike raw CDK code which can be prone to "drift" and security anti-patterns, this factory enforces NIST 800-53 compliance checks before synthesis, ensuring that no insecure infrastructure is ever generated.

Key Capabilities

  • Docker-to-CDK: Turn docker-compose.yml into ECS Fargate clusters in seconds.
  • Policy Engine: Block public S3 buckets, unencrypted databases, and open security groups.
  • Intermediate Representation (IR): A strict, Zod-validated schema for infrastructure definition.
  • Monorepo: Managed with pnpm workspaces for modularity.

Architecture Summary

The system follows a standard compiler pipeline:

graph LR
    A[Input Sources] -->|Parse| B(Intermediate Representation)
    B -->|Validate| C{Policy Engine}
    C -->|Pass| D[Factory Synthesis]
    C -->|Fail| E[Error Report]
    D -->|Gen| F[AWS CDK Stacks]
Loading
  • Parsers: src/generators (Docker, Spec)
  • Schema: src/schemas (Zod IR)
  • Validators: src/validators (Security, Cost)
  • Templates: src/templates (L3 Constructs)

View Implementation Details

Tech Stack

  • Runtime: Node.js v20+
  • Language: TypeScript 5.x (Strict Mode)
  • Package Manager: pnpm
  • IaC Framework: AWS CDK v2
  • Testing: Vitest
  • Validation: Zod
  • CLI: Commander

Quick Start

Prerequisites

  • Node.js v20+
  • pnpm
  • AWS Credentials configured

Installation

git clone https://github.com/ryanrentfro/aitool-cdk-factory.git
cd aitool-cdk-factory
pnpm install
pnpm build

See Install Guide

Documentation Index

License

MIT License. See LICENSE file.

About

A CDK factory package for AI coding agents to safely and effectively craft CDK for projects.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages