This is a Next.js project bootstrapped with create-next-app.
Full shop/cart/checkout/order/account/returns flow lives under src/app/shop, src/app/cart, src/app/checkout, src/app/order/[id], src/app/account, and src/app/returns. Cart state is a Zustand store persisted to localStorage (src/lib/cart.ts). Bundle data is the single source of truth in src/lib/bundles.ts.
Set these in .env.local and on Vercel:
NEXT_PUBLIC_STRIPE_PK=pk_live_or_test_...
STRIPE_SECRET_KEY=sk_live_or_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
Until these are set, /checkout runs in "test mode" — the /api/checkout/create-intent route returns a mocked client_secret + fake order id so the flow is end-to-end testable without charging cards. Orders are persisted to localStorage (seaduced-orders + seaduced-order-<id>).
src/lib/stripe.ts— real publishable key lookupsrc/app/api/checkout/create-intent/route.ts— realstripe.paymentIntents.createsrc/app/api/stripe/webhook/route.ts— signature verify + event routingsrc/components/shop/CheckoutFlow.tsx— mount real Stripe Elements (@stripe/react-stripe-js) inPaymentStep
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.