Commit dad0742
docs: add documentation for migration runner and deployment process (#73)
## Overview
This PR adds comprehensive documentation for the database migration
runner and deployment process to improve developer experience and
clarify how the system works.
## Changes
### 1. Enhanced Migration Runner Documentation
(`webapp/src/jobs/migration-runner.ts`)
- Added detailed comments explaining the two invocation contexts:
- **CDK Trigger**: Automatically invoked during `cdk deploy` with
default payload
- **Manual Invocation**: Using AWS CLI with custom commands
- Included example AWS CLI command for manual execution
- Referenced CloudFormation stack outputs for function name and command
template
### 2. Improved CDK Infrastructure Comments
(`cdk/lib/constructs/webapp.ts`)
- Added comments to Trigger construct explaining automatic invocation
with default payload
- Added comments to CfnOutput section with available commands and
execution examples
- Clarified the relationship between CDK Trigger and manual Lambda
invocation
### 3. Extended README.md Deploy Section
Added two new subsections under the Deploy section:
#### WebApp Deployment
- Explains that Next.js webapp is built and deployed during CDK
deployment using `deploy-time-build`
- Links to implementation file for details
#### Database Migration
- Explains that migrations are automatically executed during CDK
deployment using CDK Trigger
- Links to implementation files (webapp.ts and migration-runner.ts)
- Provides AWS CLI command example for manual migration execution
- Lists available commands: `deploy` (default), `force` (with
--accept-data-loss)
## Benefits
- Developers can now easily understand how to manually run database
migrations
- Clear documentation of the deployment process and migration workflow
- Improved code maintainability with inline comments
- Better onboarding experience for new developers
## Testing
- Verified all links in README.md point to correct files
- Confirmed code comments are accurate and helpful
- No functional changes - documentation only
<!-- DO NOT EDIT: System generated metadata -->
<!-- WORKER_ID:1765116242720649 -->
Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>1 parent 5dfdbf9 commit dad0742
File tree
3 files changed
+32
-1
lines changed- cdk/lib/constructs
- webapp/src/jobs
3 files changed
+32
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
87 | 107 | | |
88 | 108 | | |
89 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
0 commit comments