Getting StartedSolveBuildIntelligenceLearnHelpWhat's New
RECIPES

Ecommerce

Recipe for building an ecommerce store in Rocket.new with a product catalog, shopping cart, Stripe checkout, order management, and admin dashboard.

A fully functional online store for handmade jewelry with a browsable product catalog, persistent shopping cart, Stripe-powered checkout, order management, and automated customer notifications. Customers can browse collections, filter by category, add items to their cart, pay securely, and receive order confirmation emails with tracking details.

By the end of this recipe you will have a production-ready store that you can customize, rebrand, and launch as your own product.

Tech stack

You do not need to understand these technologies. Rocket handles them automatically. This table is for reference.
TechnologyRole
Next.js + TypeScriptFrontend framework and server-side rendering
SupabaseDatabase (products, orders, users), authentication, and file storage for product images
StripeCheckout sessions and payment processing
SendGrid or ResendOrder confirmation and shipping notification emails
Google AnalyticsConversion tracking and traffic attribution
NetlifyProduction deployment and hosting

Architecture overview

The store follows a straightforward data flow:

  1. Browse: Customers explore products pulled from Supabase, with images served from Supabase Storage.
  2. Cart: Selected items are stored in a client-side cart that syncs to Supabase for logged-in users.
  3. Checkout: The cart is sent to Stripe Checkout for secure payment processing.
  4. Order saved: On successful payment, a Stripe webhook writes the order to Supabase and updates inventory.
  5. Notification: An order confirmation email is sent through SendGrid or Resend with order details and estimated delivery.
  6. Analytics: GA4 tracks product views, add-to-cart events, and completed purchases for conversion analysis.

How long does it take?

PhaseWhat you are buildingEstimated time
SetupProject, Supabase, catalog5-10 minutes
StorefrontProducts, cart, checkout10-15 minutes
PaymentsStripe integration5 minutes
Post-purchaseEmails, order history5-10 minutes
LaunchAnalytics, deploy5 minutes
TotalComplete store30-45 minutes

Step-by-step build

Open Rocket and describe the full scope of your store so it can scaffold the right structure from the beginning.

Build an e-commerce store for a handmade jewelry brand called "Luna & Stone." The store should have a homepage with featured products, a product catalog page with category filters (rings, necklaces, bracelets, earrings), individual product detail pages, a shopping cart, Stripe checkout, and an order confirmation page. Use Next.js with TypeScript and a clean, modern design with a warm neutral color palette.

Rocket generates the full project structure, page layouts, navigation, and placeholder product data.

Connect your Supabase project and ask Rocket to create the database schema for your store.

Connect Supabase. Create these tables:
- products: id, name, description, price (integer, in cents), category (enum: rings, necklaces, bracelets, earrings), images (text array of storage URLs), inventory_count, is_featured, created_at
- customers: id (linked to Supabase Auth user), email, name, shipping_address (jsonb), created_at
- orders: id, customer_id (FK to customers), stripe_session_id, status (enum: pending, paid, shipped, delivered), total_amount, shipping_address (jsonb), created_at
- order_items: id, order_id (FK to orders), product_id (FK to products), quantity, unit_price
Enable row-level security so customers can only read products and view their own orders. Add a Supabase Storage bucket called "product-images" with public read access.

Seed your products table with 8-12 sample items so you have real data to work with while building. You can ask Rocket to generate sample jewelry data with realistic names, descriptions, and prices.

Replace the placeholder data with live Supabase queries and build out the shopping experience.

Update the product catalog page to fetch products from Supabase. Add:
- A grid layout showing product image, name, and price
- Category filter buttons that update the query without a full page reload
- A "Featured" section on the homepage showing products where is_featured is true
- Individual product pages at /products/[id] with an image gallery, full description, price, and an "Add to Cart" button
- Loading skeletons while products are being fetched
Use Supabase Storage URLs for product images.

Add a persistent cart that works for both guests and logged-in users.

Add a shopping cart with the following behavior:
- Cart icon in the header showing item count
- Slide-out cart drawer that shows items, quantities, and subtotal
- Plus/minus buttons to update quantity, with a max of the product's inventory_count
- Remove item button
- Store the cart in localStorage for guest users
- When a user logs in, merge the localStorage cart with any existing cart in Supabase
- Cart page at /cart with a full summary and a "Proceed to Checkout" button

Test the cart with multiple products and edge cases: adding the same item twice, removing the last item, and refreshing the page to verify persistence.

Wire up Stripe Checkout so customers can pay securely.

Connect Stripe and implement checkout:
- When the user clicks "Proceed to Checkout," create a Stripe Checkout session with line items from the cart (product name, unit price, quantity, and product image)
- Include a success URL (/order-confirmation?session_id={CHECKOUT_SESSION_ID}) and a cancel URL (/cart)
- Add a Stripe webhook handler for checkout.session.completed that:
1. Creates an order in the orders table with status "paid"
2. Creates order_items for each product
3. Decrements inventory_count for each purchased product
- On the success page, fetch order details using the session_id and show a confirmation with order number, items purchased, and total

Make sure your Stripe webhook secret is stored as an environment variable, not hardcoded. Rocket handles this automatically when you connect Stripe through the integrations panel.

Give customers visibility into their past orders and current order status.

Add an order history page at /account/orders that:
- Requires authentication (redirect to login if not signed in)
- Shows a list of all orders for the logged-in customer, sorted by date
- Each order card shows: order number, date, status badge (paid, shipped, delivered), item count, and total amount
- Clicking an order opens a detail view with individual items, quantities, prices, and shipping address
- Add a Supabase real-time subscription so the status badge updates live when an order status changes

Send customers an email when their order is confirmed.

Connect Resend (or SendGrid). When the Stripe webhook confirms a successful payment, send an order confirmation email to the customer that includes:
- Order number and date
- List of items with name, quantity, and price
- Order total and shipping address
- A "View Order" button linking to /account/orders/[id]
- Brand header with the Luna & Stone logo
Use a clean, responsive HTML email template that looks good on mobile.

If you want to add shipping notification emails later, you can ask Rocket to send another email when the order status changes to "shipped."

Track the full purchase funnel so you can see where customers drop off.

Connect Google Analytics (GA4) and add e-commerce event tracking:
- view_item: when a customer opens a product detail page
- add_to_cart: when a customer adds a product to the cart
- begin_checkout: when the customer clicks "Proceed to Checkout"
- purchase: on the order confirmation page, with transaction_id, value, and items
Include UTM parameter tracking so I can measure which marketing channels drive sales.

Add final touches and ship your store.

Before deploying, make these improvements:
- Add SEO metadata (title, description, Open Graph image) to the homepage, catalog page, and each product page
- Add a favicon and branded loading state
- Make sure all pages are fully responsive on mobile
- Add an empty cart state with a "Continue Shopping" link
- Add a 404 page for products that do not exist

Use the Launch button in your Rocket project to deploy to the web. Rocket handles the Netlify build configuration automatically. Make sure all required environment variables are set in your project's integration settings before launching.

HTTPS is included automatically. Custom domains are connected on Rocket's Vercel account. See Custom domain.

Customization ideas

Troubleshooting

On this page