Ecommerce Template
Next.js·React 등으로 만든 최신 전자상거래 템플릿
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Your next favorite thing is already out there — a peer-to-peer barter marketplace (item-for-item, bundles, or item + negotiated cash).
Stack: one Next.js 15 app (App Router) — UI and API (src/app/api/v1) — on MongoDB (Mongoose). No separate backend.
src/app pages + the API (src/app/api/v1/[[...path]]/route.ts)
src/server API logic: models, offers, deals, chat, moderation …
src/shared Zod schemas + enums/state machines used by UI and API
src/components UI components src/lib client helpers (api, auth, toast)
scripts/ seed.ts, reset-demo.ts, demo-photos/ (credits)
public/demo demo listing photos
pnpm install
cp .env.example .env.local # fill MONGODB_URI + JWT_ACCESS_SECRET (the only env file)
pnpm seed # optional demo data (use a dev database such as …/swapd_dev, never your live one)
pnpm dev # http://localhost:3000
Demo logins (after seeding): [email protected], [email protected], [email protected], [email protected] (admin: [email protected]) — password swapd-demo-pass.
MONGODB_URI, JWT_ACCESS_SECRET (32+ random chars), and for photo uploads either CLOUDINARY_URL (Cloudinary → Settings → API Keys → copy the "API environment variable" and replace the placeholders) or BLOB_READ_WRITE_TOKEN (Vercel Storage → Blob). Cloudinary wins if both are set.0.0.0.0/0 (Vercel IPs change).pnpm test runs 42 API/flow tests (auth, offers & revisions, offer↔chat sync, deals & reviews, listings, security) against an in-memory MongoDB replica set — your real database is never touched. pnpm typecheck checks client and server. See docs/AUDIT.md for the offer/message/deal model and the verification checklist.
Email + password sign-up, sign-in with rotating refresh tokens, email verification (link emailed on sign-up; the profile gets a verified badge), forgot password (one-time link, 1 h expiry, only the newest link works, all sessions signed out after a reset), and change password. Reset requests are rate-limited (3 per hour per address) and answer identically for unknown addresses.
Emails go through, in order: RESEND_API_KEY → SMTP_* → console (dev only). Easiest free setup — Gmail:
SMTP_HOST=smtp.gmail.com, SMTP_PORT=465, [email protected], SMTP_PASS=<app password>, MAIL_FROM="SWAPD <[email protected]>".APP_URL to your site's public URL (links in emails use it, never request headers). On Vercel add all of these under Environment Variables and redeploy.Gmail limits you to ~500 emails/day, which is fine for a prototype. For a real launch use a domain + Resend/SES so mail doesn't land in spam.
/listing/[id], ISR 60 s, with share-preview metadata) and the first screen of /discover (ISR 30 s). The landing hero is server-rendered with CSS-only motion; animated sections load lazily.pnpm dev pages fetch their data from the browser, so every /api/v1/... call shows in DevTools → Network (Fetch/XHR). Server-rendered first loads only apply to production builds.?public=1, added automatically by the client when signed out) send s-maxage=30, stale-while-revalidate=300; everything personalised is private, no-store. Static demo photos are immutable./auth/* returns the user, saving a round trip; one 15 s /pulse request drives badges and toasts; open chat threads fetch only messages newer than the last one (?after=).INDEX_VERSION in src/server/db.ts) because Mongoose auto-indexing is off in production; small connection pool for serverless.pnpm typecheck (client + server projects) runs as part of pnpm build.ListingLock index makes it impossible for two active deals to hold one item.