Skip to content

Commit 38d073b

Browse files
포스트 내용 보강: OIDC Discovery 문서 탐색 및 Firebase Functions를 통한 OIDC 프록시 구현 시도에 대한 경험을 추가하고, Custom Token 전략에 대한 논의 및 결론을 포함하여 포스트의 전반적인 내용을 강화하였습니다.
1 parent 79238d5 commit 38d073b

4 files changed

Lines changed: 570 additions & 0 deletions

File tree

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
---
2+
layout: post
3+
title: "Can One Person Really Develop Entire Projects? 200% AI Utilization with CDK + Lambda + Cursor"
4+
date: 2025-07-04 00:02:00 +0900
5+
categories: [Development, AI]
6+
tags: [CDK, Lambda, Cursor, AI-Development, Monorepo, Fullstack, Development-Productivity]
7+
author: "Kevin Park"
8+
lang: en
9+
excerpt: "From the old days of creating separate repositories for each Lambda function to developing entire projects solo with CDK + Lambda + Cursor - a journey of AI-powered development"
10+
image: "/assets/images/posts/fullstack-ai-development/hero.png"
11+
---
12+
13+
# Can One Person Really Develop Entire Projects? 200% AI Utilization with CDK + Lambda + Cursor
14+
15+
![Hero Image](/assets/images/posts/fullstack-ai-development/hero.png)
16+
*Development environment managing everything from infrastructure to frontend with monorepo structure*
17+
18+
## 🤦‍♂️ How I Used to Develop in the Past
19+
20+
**Problem**: Creating one repository per Lambda function
21+
- 10 projects = 10 repositories
22+
- Copy-paste hell for common code
23+
- Jumping between 10 repositories every deployment
24+
25+
**Current**: Managing everything in one project with CDK + Lambda + Cursor
26+
- IaC code, server code, frontend code, demo pages all in one place
27+
- AI understands the entire context and assists development
28+
- One person can develop entire projects
29+
30+
```javascript
31+
// Now managing everything in one project like this
32+
project/
33+
├── infrastructure/ # CDK code
34+
├── lambda-functions/ # Server logic
35+
├── frontend/ # Frontend
36+
├── demo-pages/ # Demo pages
37+
└── docs/ # Rulebook and guides
38+
```
39+
40+
## 🚀 The Magic of Simultaneous Development Speed and Maintainability Improvement
41+
42+
### 200% Development Speed Improvement
43+
**The Power of AI Context Sharing**
44+
- Cursor understands the entire project structure
45+
- Auto-generates server code by looking at infrastructure code
46+
- Auto-generates frontend integration code by looking at server API
47+
- Quickly adds new features with consistent patterns
48+
49+
**Real Experience**: Adding one new API
50+
1. Define Lambda function in CDK (30 seconds)
51+
2. Cursor generates server code based on existing patterns (1 minute)
52+
3. Auto-generates frontend integration code (1 minute)
53+
4. Deployment script follows existing patterns (30 seconds)
54+
55+
**Total: 3 minutes**. Used to take at least 30 minutes before.
56+
57+
### Dramatically Improved Maintainability
58+
**Code Consistency Assurance**
59+
```typescript
60+
// All Lambda functions use the same pattern
61+
export const handler = async (event: APIGatewayProxyEvent) => {
62+
try {
63+
// Apply common middleware
64+
const result = await processRequest(event);
65+
return successResponse(result);
66+
} catch (error) {
67+
return errorResponse(error);
68+
}
69+
};
70+
```
71+
72+
**Simplified Version Control**
73+
- Track all changes in one repository
74+
- Component-based folder structure instead of feature-based branches
75+
- Deployment can be done all at once or selectively
76+
77+
## 💡 But There Were These Challenges Too
78+
79+
### Biggest Challenge: Rulebook Management
80+
**The Trap of Massive Source Code**
81+
- Too complex for AI to understand the entire project
82+
- AI repeating past trial-and-error mistakes
83+
- Inconsistent code patterns confusing AI
84+
85+
**Solution: Systematic Rulebook Creation**
86+
```markdown
87+
# Project Rulebook (docs/rulebook.md)
88+
89+
## 1. Lambda Function Writing Rules
90+
- All functions use common/middleware.ts
91+
- Error handling uses standardError class
92+
- Environment variables managed in config/environment.ts
93+
94+
## 2. CDK Infrastructure Patterns
95+
- Lambda functions use constructs/lambda-construct.ts
96+
- API Gateway paths unified in kebab-case
97+
- Project tags mandatory for all resources
98+
99+
## 3. Prohibited Actions
100+
- Direct AWS SDK calls prohibited (use wrapper functions)
101+
- Hardcoded ARNs prohibited (use CDK references)
102+
- Use structured logging instead of console.log
103+
```
104+
105+
When this rulebook is properly recognized by Cursor, AI develops with consistent patterns.
106+
107+
## 🎯 Now One Person Can Handle Entire Projects
108+
109+
### Benefits of MSA Design + Monorepo Management
110+
**Separated Design, Integrated Management**
111+
112+
| Category | Old Method | Current Method |
113+
|----------|------------|----------------|
114+
| Repository | Function-based separation | Project integration |
115+
| Deployment | Individual deployment | Selective batch deployment |
116+
| Code Reuse | Copy-paste | Common modules |
117+
| AI Utilization | Limited | Full context |
118+
| Development Speed | Slow | Fast |
119+
120+
### Actual Project Structure
121+
```
122+
my-fullstack-project/
123+
├── cdk/
124+
│ ├── lib/
125+
│ │ ├── api-stack.ts # API Gateway + Lambda
126+
│ │ ├── frontend-stack.ts # S3 + CloudFront
127+
│ │ └── database-stack.ts # DynamoDB
128+
│ └── bin/app.ts
129+
├── lambdas/
130+
│ ├── user-service/
131+
│ ├── auth-service/
132+
│ └── common/ # Common utilities
133+
├── frontend/
134+
│ ├── src/
135+
│ └── dist/
136+
├── demo/
137+
│ └── landing-page/
138+
└── docs/
139+
├── rulebook.md # Rulebook for AI
140+
└── architecture.md
141+
```
142+
143+
## 🔧 Development Workflow with Cursor
144+
145+
### Process of Adding New Features
146+
1. **Requirements Definition** (1 minute)
147+
- "Create user profile lookup API"
148+
149+
2. **Cursor Auto-generates** (2 minutes)
150+
- Add Lambda function to CDK stack
151+
- Implement Lambda function (based on rulebook)
152+
- Generate frontend integration code
153+
154+
3. **Deploy and Test** (2 minutes)
155+
- `npm run deploy`
156+
- Test immediately on demo page
157+
158+
**Total: 5 minutes**. This is the power of 200% AI utilization.
159+
160+
### Token Consumption Optimization Tips
161+
**What I Learned Using Ultra Version**
162+
- Well-made rulebook prevents AI from wandering
163+
- Include only relevant files in context window
164+
- Register frequently used patterns as snippets
165+
166+
```typescript
167+
// Register frequently used Lambda function template as snippet
168+
const lambdaTemplate = `
169+
export const handler = async (event: APIGatewayProxyEvent) => {
170+
// Standard pattern based on rulebook
171+
};
172+
`;
173+
```
174+
175+
## 💡 Conclusion: Solo Fullstack Development Became Reality
176+
177+
**Summary of Benefits**
178+
- 200% development speed improvement
179+
- Dramatically improved maintainability
180+
- Consistent code quality through AI context sharing
181+
- One person can develop entire projects
182+
183+
**Precautions**
184+
- Rulebook management is key
185+
- Initial structure design requires time investment
186+
- Consider token consumption (Ultra version recommended)
187+
188+
Developing this way really makes a difference in productivity. I'm curious about how others with similar experiences manage their projects!
189+
190+
If you have better tips, please share them in the comments 🙏
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
---
2+
layout: post
3+
title: "一人でプロジェクト全体の開発が可能?CDK + Lambda + Cursorで200% AI活用術"
4+
date: 2025-07-04 00:02:00 +0900
5+
categories: [Development, AI]
6+
tags: [CDK, Lambda, Cursor, AI開発, モノレポ, フルスタック, 開発生産性]
7+
author: "Kevin Park"
8+
lang: ja
9+
excerpt: "Lambda関数ごとにリポジトリを作成していた過去から脱却し、CDK + Lambda + Cursorで一人でもプロジェクト全体の開発が可能になった体験談"
10+
image: "/assets/images/posts/fullstack-ai-development/hero.png"
11+
---
12+
13+
# 一人でプロジェクト全体の開発が可能?CDK + Lambda + Cursorで200% AI活用術
14+
15+
![Hero Image](/assets/images/posts/fullstack-ai-development/hero.png)
16+
*モノレポ構造でインフラからフロントエンドまで一元管理する開発環境*
17+
18+
## 🤦‍♂️ 以前はこのような開発方法だった
19+
20+
**問題**: Lambda関数一つにつきリポジトリを一つずつ作成して管理
21+
- プロジェクト10個あればリポジトリ10個
22+
- 共通コードのコピペ地獄
23+
- デプロイのたびにリポジトリ10個を巡回
24+
25+
**現在**: CDK + Lambda + Cursorで全てを一つのプロジェクトで管理
26+
- IaCコード、サーバーコード、フロントコード、デモページまで一箇所に
27+
- AIが全体のコンテキストを理解して開発をサポート
28+
- 一人でもプロジェクト全体の開発が可能
29+
30+
```javascript
31+
// 現在はこのように一つのプロジェクトで全てを管理
32+
project/
33+
├── infrastructure/ # CDKコード
34+
├── lambda-functions/ # サーバーロジック
35+
├── frontend/ # フロントエンド
36+
├── demo-pages/ # デモページ
37+
└── docs/ # ルールブックとガイド
38+
```
39+
40+
## 🚀 開発速度とメンテナンス性が同時に向上する魔法
41+
42+
### 開発速度200%向上
43+
**AIコンテキスト共有の力**
44+
- Cursorがプロジェクト全体の構造を理解
45+
- インフラコードを見てサーバーコードを自動生成
46+
- サーバーAPIを見てフロント連携コードを自動生成
47+
- 一貫したパターンで新機能を迅速に追加
48+
49+
**実際の体験**: 新しいAPIを一つ追加する場合
50+
1. CDKでLambda関数を定義(30秒)
51+
2. Cursorが既存パターンを見てサーバーコードを生成(1分)
52+
3. フロントエンド連携コードも自動生成(1分)
53+
4. デプロイスクリプトも既存パターンそのまま(30秒)
54+
55+
**合計3分**で完了。以前は最低30分はかかっていたのに。
56+
57+
### メンテナンス性大幅改善
58+
**コードの一貫性確保**
59+
```typescript
60+
// 全てのLambda関数が同じパターンを使用
61+
export const handler = async (event: APIGatewayProxyEvent) => {
62+
try {
63+
// 共通ミドルウェアを適用
64+
const result = await processRequest(event);
65+
return successResponse(result);
66+
} catch (error) {
67+
return errorResponse(error);
68+
}
69+
};
70+
```
71+
72+
**バージョン管理の簡素化**
73+
- 一つのリポジトリで全ての変更履歴を追跡
74+
- 機能別ブランチの代わりにコンポーネント別フォルダ構造
75+
- デプロイも一括または選択的に可能
76+
77+
## 💡 しかし、このような困難もあった
78+
79+
### 最大の課題:ルールブック管理
80+
**膨大なソースコードの罠**
81+
- AIがプロジェクト全体を理解するには複雑すぎる
82+
- 過去の試行錯誤をAIが繰り返す問題
83+
- 一貫性のないコードパターンがAIを混乱させる
84+
85+
**解決策:体系的なルールブック作成**
86+
```markdown
87+
# プロジェクトルールブック (docs/rulebook.md)
88+
89+
## 1. Lambda関数作成ルール
90+
- 全ての関数はcommon/middleware.tsを使用
91+
- エラー処理はstandardErrorクラスを活用
92+
- 環境変数はconfig/environment.tsで管理
93+
94+
## 2. CDKインフラパターン
95+
- Lambda関数はconstructs/lambda-construct.tsを使用
96+
- API Gatewayパスはkebab-caseで統一
97+
- 全てのリソースにプロジェクトタグ必須
98+
99+
## 3. 禁止事項
100+
- AWS SDK直接呼び出し禁止(ラッパー関数使用)
101+
- ハードコーディングされたARN禁止(CDK参照使用)
102+
- console.logの代わりにstructured loggingを使用
103+
```
104+
105+
このルールブックをCursorに適切に認識させると、AIが一貫したパターンで開発してくれる。
106+
107+
## 🎯 今や一人でもプロジェクト全体が可能に
108+
109+
### MSA設計 + モノレポ管理の利点
110+
**設計は分離、管理は統合**
111+
112+
| 区分 | 従来の方法 | 現在の方法 |
113+
|------|-----------|-----------|
114+
| リポジトリ | 関数別分離 | プロジェクト統合 |
115+
| デプロイ | 個別デプロイ | 選択的一括デプロイ |
116+
| コード再利用 | コピペ | 共通モジュール |
117+
| AI活用度 | 限定的 | 全体コンテキスト |
118+
| 開発速度 | 遅い | 速い |
119+
120+
### 実際のプロジェクト構造
121+
```
122+
my-fullstack-project/
123+
├── cdk/
124+
│ ├── lib/
125+
│ │ ├── api-stack.ts # API Gateway + Lambda
126+
│ │ ├── frontend-stack.ts # S3 + CloudFront
127+
│ │ └── database-stack.ts # DynamoDB
128+
│ └── bin/app.ts
129+
├── lambdas/
130+
│ ├── user-service/
131+
│ ├── auth-service/
132+
│ └── common/ # 共通ユーティリティ
133+
├── frontend/
134+
│ ├── src/
135+
│ └── dist/
136+
├── demo/
137+
│ └── landing-page/
138+
└── docs/
139+
├── rulebook.md # AI用ルールブック
140+
└── architecture.md
141+
```
142+
143+
## 🔧 Cursorと共に進める開発ワークフロー
144+
145+
### 新機能追加プロセス
146+
1. **要件定義**(1分)
147+
- 「ユーザープロファイル参照APIを作って」
148+
149+
2. **Cursorが自動生成**(2分)
150+
- CDKスタックにLambda関数を追加
151+
- Lambda関数実装(ルールブック基準)
152+
- フロントエンド連携コード生成
153+
154+
3. **デプロイとテスト**(2分)
155+
- `npm run deploy`
156+
- デモページで即座にテスト
157+
158+
**合計5分**で完了。これがまさにAI 200%活用の力である。
159+
160+
### トークン消費最適化のコツ
161+
**Ultra版を使いながら学んだこと**
162+
- ルールブックを適切に作成すればAIが迷わない
163+
- コンテキストウィンドウには関連ファイルのみ含める
164+
- 頻繁に使うパターンはスニペットとして登録
165+
166+
```typescript
167+
// 頻繁に使うLambda関数テンプレートをスニペットとして登録
168+
const lambdaTemplate = `
169+
export const handler = async (event: APIGatewayProxyEvent) => {
170+
// ルールブック基準の標準パターン
171+
};
172+
`;
173+
```
174+
175+
## 💡 結論:一人でもフルスタック開発が現実になった
176+
177+
**利点のまとめ**
178+
- 開発速度200%向上
179+
- メンテナンス性大幅改善
180+
- AIコンテキスト共有による一貫したコード品質
181+
- 一人でもプロジェクト全体の開発が可能
182+
183+
**注意事項**
184+
- ルールブック管理が核心
185+
- 初期構造設計に時間投資が必要
186+
- トークン消費を考慮(Ultra版推奨)
187+
188+
このような方法で開発すると、本当に生産性が違います。もし似たような経験をお持ちの方がいらっしゃれば、どのような方法で管理されているのか気になりますね!
189+
190+
より良いコツがあれば、コメントで共有してください 🙏

0 commit comments

Comments
 (0)