Ecommerce Template
Next.js·React 등으로 만든 최신 전자상거래 템플릿
시공사의 문자 메시지를 즉시 발송 가능한 목재 주문서로 변환, AI가 카탈로그와 매칭하고 담당자가 불확실한 부분만 확인
Contractors' text messages, turned into ready-to-send lumber orders. AI matches each line to the catalog; the rep checks only what's uncertain.
커머스TypeScript · CSSGitHub @lustandfury온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Counterpart: outside-in sketch of AI-assisted lumber ordering (synthetic data)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
An outside-in sketch of AI-assisted lumber ordering. A contractor texts an order; Counterpart drafts it against a product catalog and flags only the lines the sales rep needs to check. The rep then sends it back to the contractor to approve before it goes to the ERP.
All data is synthetic. This is a prototype, not affiliated with any company.
The idea it tests: reading a messy order is the easy part. The hard part is deciding what the rep does not need to check, and doing that cheaply, quickly and measurably.README 전문 보기 ↗An outside-in sketch of AI-assisted lumber ordering. A contractor texts an order; Counterpart drafts it against a product catalog and flags only the lines the sales rep needs to check. The rep then sends it back to the contractor to approve before it goes to the ERP.
Live demo: https://counterpart-ordering-poc.vercel.app
All data is synthetic, except one photo of a handwritten order found online (no names on them; the senders are fictional). This is a prototype, not affiliated with any company.
The idea it tests: reading a messy order is the easy part. The hard part is deciding what the rep does not need to check, and doing that cheaply, quickly and measurably.
order text ─▶ Claude parses it into lines (shared by both pipelines)
─▶ Fuse.js shortlists 20 products per line
─▶ Jev: which product? → a choice with calibrated confidence
─▶ Jev: is the quantity sensible for that product? → yes/no probability
─▶ route: auto-approve if both clear their thresholds, else flag for the rep
Comparison pipeline: Claude alone matches every line against the whole catalog
and rates itself high / medium / low; only "high" lines auto-approve.
data/house-defaults.md) go to both pipelines, so the comparison is fair: what a counter person assumes without calling (framing lumber is SPF #2 kiln-dried, "stud" means a precut stud, a bare number means pieces) and what always needs review (a missing length, a missing box size, large quantities).A three-pane workspace:
The two thresholds (product confidence and quantity clarity), under Settings, re-route lines live; Settings also has Light / Dark / System (light by default).
A second page, Sample results (/results), is a dashboard for the 20 saved orders: headline comparisons, a by-order table linking back to each order, calibration, the misses and the caveats. Each line to check carries a short hint saying what to do. Keyboard shortcuts also work: j/k move, 1–3 pick, Enter accepts, x leaves a line off the order. Enter never accepts a "leave off" suggestion.
20 synthetic orders (88 lines) scored against a hand-reviewed answer key. The full report is in results/eval-summary.md, with one row per line in results/eval.csv.
Same accuracy and the same review decisions on all 88 lines, at 4.5× lower cost per order. These are the default thresholds (product 0.85, quantity 0.80); the dashboard follows the review sliders without new API calls.
| Claude only | Claude + Jev | |
|---|---|---|
| Right product | 87 of 88 (99%) | 87 of 88 (99%) |
| Lines auto-approved | 66 of 88 (75%) | 66 of 88 (75%) |
| Wrong product among auto-approved | 0 of 66 | 0 of 66 |
| Unneeded reviews | 1 of 88 | 1 of 88 |
| Whole pipeline, mean cost per order | $0.0456 | $0.0101 |
| Whole pipeline, cost per 10,000 orders | $456.38 | $101.40 |
Excluding the 15 lines where Jev selected no catalog product, the saving is 4.4× across 73 matched lines. Jev matching uses per-line recorded costs; shared reading and Claude batch matching are allocated equally across each order's lines. The per-10,000 figures scale the unrounded mean.
Read these as signals, not benchmarks: 20 synthetic orders, tuned in-sample, with no held-out set. Mike Costanzo reviewed the answer key on September 29, 2026. Costs use token counts at list prices in lib/pricing.ts. With zero wrong approvals among 66 lines, the approximate 95% upper bound is still ~4.5%. Re-scoring the saved results is deterministic; it does not measure variation across fresh API runs. The original API run date and resolved Jev model version were not recorded.
Requires Node 22 or later.
npm install
cp .env.example .env.local # then fill in the keys
npm run dev # http://localhost:3000
.env.local needs ANTHROPIC_API_KEY, ANTHROPIC_MODEL (for example claude-sonnet-5-5), TYPESAFE_API_KEY, and POSTGRES_URL for the live-order usage limit and email signups. Set NEXT_PUBLIC_SITE_URL to the public URL when deploying so canonical and social metadata point to the right host. The saved sample orders work without keys; only Generate order and the pipeline scripts call the APIs.
PostHog is optional. Set NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN to the project's public token in .env.local and your hosting environment. Set NEXT_PUBLIC_POSTHOG_HOST to the ingestion host for your project (https://us.i.posthog.com or https://eu.i.posthog.com). Rebuild/redeploy after changing these values because Next.js embeds public environment variables at build time. Leave the token empty to disable analytics, including for local development.
Page views include initial loads and client-side navigation. Custom events cover workspace unlock, order selection, live-run start/completion/failure, the signup gate and completion, comparison mode changes, line review decisions, and mock order sends. Event properties contain workflow counts and categories; order text, sender details, and emails are not included. Autocapture, session replay, and surveys are disabled. Visitors use anonymous browser IDs; signup does not identify them by email.
To verify a configured deployment, open PostHog's live events view, visit Review and Sample results, and review a line. Look for $pageview and order_line_reviewed; sending a completed order emits order_sent with demo: true.
| Command | What it does |
|---|---|
npm run check | Lint, typecheck and unit tests |
npm run pipeline | Run both pipelines over data/orders/ and save to results/ (about $1.40 for all 20; -- o01 o05 runs a subset, -- --jev-only re-runs only the Jev step) |
npm run eval | Score the saved results against data/labels.json; writes the report, the per-line CSV and results/eval.json for the dashboard |
npm run jev:test | One raw Jev call, to see the response shape |
npm run gen:catalog | Regenerate data/catalog.json |
npm run export:review | Build data/review-sheet.csv for reviewing labels |
With a production build running (npm run build && PORT=3100 npm start), npx tsx scripts/e2e-smoke.ts tests the keyboard flow and sliders in a real browser, and npx tsx scripts/screenshots.ts saves screenshots to shots/.
Live runs are capped:
The five-order signup limit is stored in Postgres and counts attempted runs, including failed AI calls. The hourly and daily counters are per server instance. The spend limit on the API key is the hard stop, and setting LIVE_RUNS=off switches live runs off.
Pasting your own order calls paid APIs, so live runs are limited: 5 free orders per visitor (an email unlocks more), 5 per hour per network and 40 per day overall. The per-network and daily limits are kept in Postgres, so they hold across servers and cannot be reset by clearing cookies; the visitor cookie is only an identity. Set spend limits with your Anthropic and TypeSafe accounts as the hard stop, and LIVE_RUNS=off switches live runs off. The opening screen is a welcome screen with no access code. Emails are stored only to unlock more runs; set NEXT_PUBLIC_PRIVACY_CONTACT to show a deletion contact on the sign-up form.
| Path | What's there |
|---|---|
lib/pipeline/ | parse, shortlist, decide (Jev), route, the Claude-only comparison |
lib/eval/ | Evaluation metrics (unit-tested) |
lib/view.ts | Turns saved scores into approved or flagged lines at any threshold |
app/, components/ | The Next.js app and the review screen |
data/ | Synthetic catalog (203 products), 20 text orders and 1 photo order with fictional senders, answer key, house rules |
results/ | Saved pipeline outputs and the evaluation |
docs/ | The case study and the technical build log |
Built with Claude Code, one milestone at a time, with independent checks at every layer:
.claude/agents/):
The full story, with numbers at each turn, is in docs/case-study.md. The terse technical log is docs/how-this-was-built.md.