Skip to content

moonshiftio/ecomm-storefront

Repository files navigation

Hearth & Pine - E-commerce Storefront Template

A small but complete storefront for a fictional Vermont home-goods workshop: hand-poured candles, woven throws, and small-batch ceramics. Built on the Moonshift starter (Next.js App Router, Drizzle + libsql, Tailwind, shadcn-style components, Better Auth).

What's inside

  • / editorial home: hero, featured products, category cards, brand story
  • /products catalog grid with category filter chips and loading skeletons
  • /products/[slug] product detail: gallery tiles, details, quantity add-to-basket
  • Basket drawer with quantity edit, remove, and a free-shipping meter (client state via React context, persisted to localStorage)
  • /checkout address form that writes an order + line items to the database and shows a confirmation with an order number (no payment integration)
  • /app signed-in order history matched by checkout email (Better Auth)

Getting started

bun install
bun dev

The database bootstraps itself on the first request: lib/db/ensure.ts creates every table and seeds 13 products across 3 categories into a local app.db. To reset, delete app.db and reload (or run bun run db:seed).

Where things live

  • lib/db/domain.ts - categories, products, orders, order_items tables
  • lib/db/seed-data.ts - the full Hearth & Pine catalog fiction
  • lib/store/ - catalog queries, price/shipping rules, product-art tones
  • components/store/ - header, footer, basket drawer, product cards, checkout
  • Product imagery is generated CSS (gradient + grain + serif monogram), so the template has zero external image dependencies. Swap ProductArt for real photos by replacing one component.

All products, people, and places are fictional.

About

Moonshift template: ecomm-storefront. Fork it or remix it at https://moonshift.io/templates/ecomm-storefront

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages