An online store looks simple until you handle real carts, stock levels, payments that fail halfway and product pages that need to rank. In this course you build a complete store on the Next.js App Router, owning the catalogue and order data in your own database. The focus is on the parts that go wrong in production: payment confirmation through webhooks, cache invalidation when prices change, and pages that stay fast with hundreds of products.

What you'll learn

  • Modelling products, variants, prices, stock and orders in PostgreSQL with an ORM
  • Catalogue pages with Server Components, filters, sorting and pagination driven by the URL
  • Caching product pages and revalidating them when an admin changes a price or stock level
  • A cart that works for guests and signed-in customers, using cookies and Server Actions
  • Checkout with Stripe Checkout or Razorpay, and why the order is confirmed by webhook, not by the redirect
  • Handling taxes, shipping rules and discount codes in a way you can extend
  • Customer accounts, order history and transactional emails
  • A small admin area for products and orders, protected by role checks
  • Product SEO: metadata, Product structured data, image optimisation and sitemaps
  • Measuring Core Web Vitals and fixing slow product and category pages

Who it's for

  • React developers who know the basics of Next.js and want to build a real commercial project
  • Freelancers and agencies who build custom stores where Shopify or WooCommerce is not the right fit
  • Full-stack developers who need to understand payment flows end to end

Prerequisites

  • Comfortable with React and the Next.js App Router (see Next.js App Router in Practice)
  • Basic SQL and TypeScript
  • Free test accounts with Stripe or Razorpay; no real payments are taken

Outcomes

By the end of this course you will be able to:

  1. Build and deploy a working store with catalogue, cart, checkout and orders.
  2. Confirm payments reliably with signed webhooks and idempotent order creation.
  3. Keep product pages fast and fresh with a clear caching and revalidation plan.
  4. Decide when a custom Next.js store makes sense and when a hosted platform is the better choice.

Projects you'll build

  • A small-brand store: a full storefront with categories, variants, a cart and test-mode checkout. It practises Server Components, Server Actions and data modelling.
  • Payment and order pipeline: webhook handlers that create orders, reduce stock and send confirmation emails, with retries handled safely. It practises signature checks, idempotency and transactions.
  • Admin and reporting view: protected pages to edit products and see recent orders, which trigger revalidation of the affected product pages. It practises authorisation and cache invalidation.

Tools you'll use

Next.js 16 with the App Router, React 19, TypeScript, PostgreSQL with Prisma or Drizzle, Stripe or Razorpay in test mode, Tailwind CSS, an email API such as Resend, and Vercel or a Node.js server for deployment.

Course outline

ModuleTopic
1Store architecture and when to build custom
2Data model: products, variants, stock and orders
3Catalogue, category and product pages
4Search, filters and URL state
5Caching and on-demand revalidation
6Cart with cookies and Server Actions
7Checkout with Stripe or Razorpay
8Webhooks, idempotency and order creation
9Accounts, order history and emails
10Admin area and role-based access
11Product SEO and Core Web Vitals
12Deployment, monitoring and launch checklist

FAQ

Should I use Shopify instead?

For many shops, yes. A hosted platform handles payments, tax and apps for you. This course suits stores with unusual catalogues, B2B pricing or tight integration with other systems. Shopify Store Development covers the hosted route.

Does the course cover headless Shopify?

We briefly compare our own database with a headless backend such as the Shopify Storefront API, but the main build keeps data in your own PostgreSQL database.

How deep does it go on payments?

We cover the integration code. For gateway-specific details across providers, see Payment Gateway Integration. Tax and legal questions should go to a qualified professional.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.