docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
---
|
||||
id: wiki-2026-0508-e-commerce-platforms
|
||||
title: E-commerce Platforms
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [ecommerce, online-store-platform, headless-commerce]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [ecommerce, shopify, stripe, headless]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: typescript
|
||||
framework: shopify-hydrogen/medusa/stripe
|
||||
---
|
||||
|
||||
# E-commerce Platforms
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 e-commerce 의 매 catalog × cart × checkout × fulfillment × payments × tax + 매 every regional edge case"**. 2026 의 매 SaaS (Shopify, BigCommerce, commercetools), 매 headless (Hydrogen, Medusa.js, Saleor, Vendure), 매 PSP (Stripe, Adyen) 가 dominant — 매 buy-vs-build 의 매 default 의 buy.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 platform tiers
|
||||
1. **All-in-one SaaS** — Shopify, BigCommerce, Wix. 매 lowest TCO.
|
||||
2. **Headless / composable** — Shopify Hydrogen, commercetools, Saleor, Medusa.js, Vendure. 매 custom UX 필요.
|
||||
3. **Self-hosted / OSS** — Medusa, Vendure, Saleor (Apache 2 / MIT).
|
||||
4. **Marketplace SaaS** — Mirakl, Sharetribe.
|
||||
5. **B2B-specific** — Spryker, BigCommerce B2B, commercetools.
|
||||
|
||||
### 매 PSP / payments
|
||||
- **Stripe** — global default, broad APM coverage.
|
||||
- **Adyen** — enterprise / omnichannel.
|
||||
- **PayPal/Braintree, Klarna, Afterpay, Apple/Google Pay** — APMs.
|
||||
- **Crypto / stablecoin** — Coinbase Commerce (niche).
|
||||
|
||||
### 매 cross-cutting concerns
|
||||
- **Tax** — Stripe Tax, Avalara, TaxJar (US sales tax post-Wayfair, EU VAT IOSS, UK VAT).
|
||||
- **Shipping** — ShipStation, Shippo, EasyPost.
|
||||
- **Search** — Algolia, Typesense, Meilisearch.
|
||||
- **CMS** — Sanity, Contentful, Storyblok (PIM/CMS hybrid).
|
||||
- **Fraud** — Stripe Radar, Riskified, Signifyd.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Stripe Checkout (PCI-light)
|
||||
```ts
|
||||
import Stripe from 'stripe';
|
||||
const stripe = new Stripe(process.env.STRIPE_SECRET!);
|
||||
const session = await stripe.checkout.sessions.create({
|
||||
mode: 'payment',
|
||||
line_items: [{ price: 'price_123', quantity: 2 }],
|
||||
automatic_tax: { enabled: true },
|
||||
shipping_address_collection: { allowed_countries: ['US', 'GB', 'KR'] },
|
||||
success_url: 'https://shop.example.com/success?cs={CHECKOUT_SESSION_ID}',
|
||||
cancel_url: 'https://shop.example.com/cart',
|
||||
});
|
||||
return Response.redirect(session.url!, 303);
|
||||
```
|
||||
|
||||
### Stripe webhook (idempotent)
|
||||
```ts
|
||||
import { headers } from 'next/headers';
|
||||
export async function POST(req: Request) {
|
||||
const sig = (await headers()).get('stripe-signature')!;
|
||||
const body = await req.text();
|
||||
const event = stripe.webhooks.constructEvent(body, sig, process.env.STRIPE_WEBHOOK_SECRET!);
|
||||
// 매 idempotency: 매 event.id 의 record, 매 already-processed skip
|
||||
if (await db.processedEvents.has(event.id)) return new Response(null, { status: 200 });
|
||||
switch (event.type) {
|
||||
case 'checkout.session.completed':
|
||||
await fulfillOrder(event.data.object as Stripe.Checkout.Session);
|
||||
break;
|
||||
}
|
||||
await db.processedEvents.insert(event.id);
|
||||
return new Response(null, { status: 200 });
|
||||
}
|
||||
```
|
||||
|
||||
### Shopify Hydrogen (Storefront API)
|
||||
```ts
|
||||
import { storefrontClient } from '~/lib/shopify';
|
||||
const PRODUCT = `#graphql
|
||||
query Product($handle: String!) {
|
||||
product(handle: $handle) {
|
||||
id title descriptionHtml
|
||||
variants(first: 10) { nodes { id price { amount currencyCode } availableForSale } }
|
||||
images(first: 5) { nodes { url altText } }
|
||||
}
|
||||
}`;
|
||||
const { data } = await storefrontClient.request(PRODUCT, { variables: { handle } });
|
||||
```
|
||||
|
||||
### Medusa.js custom backend
|
||||
```ts
|
||||
// backend 의 custom plugin
|
||||
import { OrderService } from '@medusajs/medusa';
|
||||
class FraudGuardService {
|
||||
constructor(private orderService: OrderService) {}
|
||||
async beforeCapture(orderId: string) {
|
||||
const score = await fetch('https://radar/api', { /* … */ }).then(r => r.json());
|
||||
if (score.risk > 0.8) await this.orderService.cancel(orderId);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Cart state (Server Component + Cookie)
|
||||
```ts
|
||||
import { cookies } from 'next/headers';
|
||||
export async function getCart(): Promise<Cart> {
|
||||
const id = (await cookies()).get('cart_id')?.value;
|
||||
return id ? storefront.cart.get(id) : storefront.cart.create();
|
||||
}
|
||||
```
|
||||
|
||||
### Algolia product search index
|
||||
```ts
|
||||
import { algoliasearch } from 'algoliasearch';
|
||||
const client = algoliasearch(APP_ID, ADMIN_KEY);
|
||||
await client.saveObjects({
|
||||
indexName: 'products',
|
||||
objects: products.map(p => ({
|
||||
objectID: p.id, title: p.title, brand: p.brand, price: p.price.amount,
|
||||
inStock: p.inventory > 0, _tags: p.collections,
|
||||
})),
|
||||
});
|
||||
```
|
||||
|
||||
### Tax (Stripe Tax inline)
|
||||
```ts
|
||||
const tax = await stripe.tax.calculations.create({
|
||||
currency: 'usd',
|
||||
line_items: [{ amount: 5000, reference: 'sku_1', tax_behavior: 'exclusive' }],
|
||||
customer_details: {
|
||||
address: { line1: '...', city: 'Seattle', state: 'WA', postal_code: '98101', country: 'US' },
|
||||
address_source: 'shipping',
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### B2B quote → order
|
||||
```ts
|
||||
// commercetools / Vendure pattern
|
||||
const quote = await ct.quotes.create({ customer, lineItems, validUntil: addDays(new Date(), 14) });
|
||||
// 매 buyer accept → order 의 transition
|
||||
const order = await ct.orders.fromQuote(quote.id);
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Lean DTC start | Shopify (basic) + Stripe |
|
||||
| Custom UX, brand priority | Shopify Hydrogen or Saleor + headless CMS |
|
||||
| Self-host / OSS / cost control | Medusa.js or Vendure |
|
||||
| Enterprise composable | commercetools + Algolia + Contentful + Adyen |
|
||||
| Marketplace | Mirakl or Sharetribe |
|
||||
| B2B with quotes/contracts | commercetools / Spryker |
|
||||
|
||||
**기본값**: Shopify for SMB; Hydrogen for premium DTC; commercetools for enterprise composable; Stripe as PSP unless enterprise (then Adyen).
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Web-Architecture]]
|
||||
- 변형: [[Headless-Commerce]]
|
||||
- Adjacent: [[Algolia]] · [[Sanity]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 platform comparison, 매 webhook handler 의 scaffold, 매 GraphQL Storefront query 의 작성, 매 tax/shipping flow explanation, 매 catalog data model design.
|
||||
**언제 X**: 매 PCI-DSS / SCA / regional tax 의 final compliance review (legal + Stripe/Adyen docs). 매 fraud rules in production (data scientist + risk team).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Roll-your-own checkout**: 매 PCI scope explode + tax + APM hell — Stripe/Adyen Checkout 사용.
|
||||
- **No webhook idempotency**: 매 duplicate fulfillment / charge — event.id dedupe.
|
||||
- **Cart in localStorage only**: 매 multi-device 가 broken — server-side cart.
|
||||
- **No automatic_tax**: 매 EU VAT / US Wayfair 의 manual mess.
|
||||
- **Storefront API token in client**: 매 secret leak — 매 server-only token.
|
||||
- **Sync inventory in serverless cold path**: 매 oversell — event-driven inventory + reservation.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Shopify Hydrogen docs, Medusa.js docs, commercetools docs, Stripe docs, Adyen docs).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — e-commerce platform landscape, Shopify/Stripe/headless patterns |
|
||||
Reference in New Issue
Block a user