ECサイト開発 - 商品管理、カート、決済、注文フロー、在庫管理の設計・実装支援
| エンティティ | 責務 | |-------------|------| | Product | 商品マスタ(タイトル・説明・画像) | | Variant | バリエーション(SKU・価格・在庫) | | Cart | 買い物かご | | Order | 注文(ステータス・配送・支払) | | Customer | 顧客情報 | | Payment | 決済情報 |
注文: [作成] → [支払待ち] → [支払済] → [発送準備] → [発送済] → [完了]
在庫: [在庫あり] ←→ [残りわずか] → [在庫切れ] → [入荷待ち]
// 楽観的ロック
async function reserveStock(variantId: string, qty: number) {
const result = await db.variant.updateMany({
where: {
id: variantId,
inventory: { gte: qty },
version: currentVersion,
},
data: {
inventory: { decrement: qty },
version: { increment: 1 },
},
});
if (result.count === 0) {
throw new StockNotAvailableError();
}
}
1. カート確定 → 在庫仮押さえ
2. 決済開始 → 決済サービス呼び出し
3. 成功 → 注文確定・在庫確定
4. 失敗 → 在庫解放
5. タイムアウト(15分) → 在庫解放
GET /products # 商品一覧
GET /products/:id # 商品詳細
POST /cart/items # カート追加
DELETE /cart/items/:id # カート削除
POST /orders # 注文作成
GET /orders/:id # 注文詳細
| 指標 | 目標 | |------|------| | ページ読み込み | < 3秒 | | 検索応答 | < 500ms | | 決済処理 | < 5秒 |
/websites/shopify_dev📋 ドメインモデル
📦 エンティティ一覧
🔄 状態遷移図
✅ 要件チェックリスト
🔴 Critical: 問題点 - 修正案
🟡 Warning: 改善推奨 - 提案
📊 Summary: カバー率 X%
context7で最新ドキュメント確認:
/websites/shopify_dev - Shopify開発/shopify/hydrogen - ヘッドレスEC/woocommerce/woocommerce - WooCommerce/medusajs/medusa - Medusa(OSS)Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer