11. Copy-Paste File Hierarchy
← Back to Table of Contents | Previous: Existing Code Integration | Next: Daily Rhythm →
11.1 Overview
Below is the complete file hierarchy ready to copy into your project. Each file's content is provided in the previous sections. This section serves as a quick reference for the directory structure.
11.2 Application Repository
app-repo/
│
├── .kiro/
│ ├── steering/
│ │ ├── global-rules.md → Section 5.2
│ │ ├── testing-rules.md → Section 5.3
│ │ ├── auth-rules.md → Section 5.4
│ │ ├── billing-rules.md → Section 5.4
│ │ ├── orders-rules.md → Section 5.4
│ │ └── infra-rules.md → Section 5.5
│ │
│ ├── hooks/
│ │ ├── test-on-save.hook.json → Section 6.2
│ │ ├── lint-on-save.hook.json → Section 6.2
│ │ ├── verify-tests.hook.json → Section 6.2
│ │ ├── module-boundary.hook.json → Section 6.2
│ │ └── test-after-task.hook.json → Section 6.2
│ │
│ └── specs/ → Created per feature
│
├── src/
│ ├── auth/
│ │ ├── controllers/
│ │ ├── services/
│ │ ├── repositories/
│ │ ├── models/
│ │ └── README.md
│ │
│ ├── billing/
│ │ ├── controllers/
│ │ ├── services/
│ │ ├── repositories/
│ │ ├── models/
│ │ └── README.md
│ │
│ ├── orders/
│ │ ├── controllers/
│ │ ├── services/
│ │ ├── repositories/
│ │ ├── models/
│ │ └── README.md
│ │
│ ├── gateway/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ └── README.md
│ │
│ └── shared/
│ ├── types/
│ ├── interfaces/
│ ├── utils/
│ └── README.md
│
├── tests/
│ ├── auth/
│ ├── billing/
│ ├── orders/
│ ├── gateway/
│ ├── integration/
│ └── shared/
│
├── docker/
│ ├── auth/Dockerfile
│ ├── billing/Dockerfile
│ ├── orders/Dockerfile
│ └── gateway/Dockerfile
│
├── ci/
│ ├── templates/
│ │ ├── lint.yml → Section 8.3
│ │ ├── test.yml → Section 8.4
│ │ ├── build.yml → Section 8.5
│ │ ├── security-scan.yml → Section 8.6
│ │ └── deploy.yml → Section 8.7
│ └── scripts/
│
├── .gitlab-ci.yml → Section 8.2
├── CODEOWNERS → Section 3.4
├── package.json
├── tsconfig.json
├── .eslintrc.json
├── .prettierrc
└── README.md
11.3 Infrastructure Repository
infra-repo/
│
├── modules/
│ ├── vpc/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── ecs-cluster/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── ecs-service/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── rds/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── alb/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── ecr/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ ├── iam/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── outputs.tf
│ │
│ └── cloudwatch/
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
│
├── environments/
│ ├── dev/
│ │ ├── main.tf → Section 7.2
│ │ ├── variables.tf
│ │ ├── outputs.tf
│ │ ├── terraform.tfvars
│ │ └── backend.tf
│ │
│ ├── staging/
│ │ └── (same structure)
│ │
│ └── prod/
│ └── (same structure)
│
├── .kiro/
│ └── steering/
│ └── infra-rules.md → Section 5.5
│
├── .gitlab-ci.yml → Section 8.8
└── README.md
11.4 Quick Setup Commands
# Clone and initialize the app repo
git clone <your-gitlab-app-repo-url>
cd app-repo
# Create the directory structure
mkdir -p .kiro/steering .kiro/hooks .kiro/specs
mkdir -p src/{auth,billing,orders,gateway,shared}/{controllers,services,repositories,models}
mkdir -p src/shared/{types,interfaces,utils}
mkdir -p tests/{auth,billing,orders,gateway,integration,shared}
mkdir -p docker/{auth,billing,orders,gateway}
mkdir -p ci/{templates,scripts}
# Initialize the infra repo
cd ../
git clone <your-gitlab-infra-repo-url>
cd infra-repo
mkdir -p modules/{vpc,ecs-cluster,ecs-service,rds,alb,ecr,iam,cloudwatch}
mkdir -p environments/{dev,staging,prod}
mkdir -p .kiro/steering
← Back to Table of Contents | Previous: Existing Code Integration | Next: Daily Rhythm →