npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@replybd/storefront-template

v1.0.1

Published

Reply.BD headless storefront template — Next.js 15 + Tailwind v4 + shadcn/ui. Consumes the Reply.BD storefront API (https://reply.bd) and ships every tenant page (home, products, PDP, categories, order tracking) as a single npm dep.

Downloads

184

Readme

@replybd/storefront-template

Headless storefront template for Reply.BD tenants. Next.js 15 · Tailwind v4 · shadcn/ui · TypeScript.

Each tenant's deployed Vercel project is a thin shell (~10 files) that imports from this package, so the visual storefront updates centrally when we ship a new version.

Architecture

┌─────────────────────────────────────┐
│  Tenant's Vercel project (~10 files)│  → Imports @replybd/storefront-template
│   • app/[[...slug]]/page.tsx        │
│   • app/api/revalidate/route.ts     │
│   • app/layout.tsx                  │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│  THIS PACKAGE                       │
│   • <Page />     catch-all router   │
│   • <Layout />   theme + pixel      │
│   • POST /revalidate                │
│   • All pages, components, types    │
└──────────────┬──────────────────────┘
               │ HTTPS
               ▼
┌─────────────────────────────────────┐
│  Reply.BD Laravel API               │
│   /api/v1/storefronts/{slug}/...    │
└─────────────────────────────────────┘

Pages shipped

| Route | What it renders | |---|---| | / | Hero · featured products · categories strip · trust bar | | /products | Paginated grid · search · category filter · mobile chips | | /products/[slug] | PDP — auto-switches between standard layout and funnel mode based on the API's funnel payload | | /categories | Category index | | /categories/[slug] | Category detail with paginated products | | /checkout | Single-page COD checkout (phone/name/address/zone + Turnstile-ready) | | /order/lookup | Customer-facing order tracker | | /order/[number] | Order status + items + totals | | /about | Brand story (pulls users.storefront_about) | | /api/revalidate | ISR webhook receiver — validates X-Revalidate-Secret, calls revalidatePath + revalidateTag |

BD-market UX baked in

  • BDT formatting everywhere (৳1,299 with en-IN comma grouping)
  • COD badge above the fold on PDPs
  • Free-shipping threshold progress bar in cart
  • Two shipping zones (inside/outside city)
  • Sticky Messenger CTA (mobile bottom-right floating)
  • Phone-first — no signup, order lookup by last-4 phone digits
  • No card payments — COD flow only
  • Mobile-first design budget

Meta Pixel events fired client-side

PageView (in Layout), ViewContent (PDP), AddToCart, InitiateCheckout, Purchase. Server-side CAPI continues from Laravel using fb_capi_token (which is never exposed to the browser).

Local dev

cp .env.local.example .env.local
# edit .env.local — point at your local Reply.BD instance
npm install
npm run dev

The package can be developed as a standalone Next.js app via app/ (which re-exports the same entries as the published package would).

Environment variables (set by the deploy flow on Vercel)

NEXT_PUBLIC_API_BASE          # e.g. https://reply.bd
NEXT_PUBLIC_STOREFRONT_SLUG   # tenant's storefront_slug
REVALIDATE_SECRET             # matches users.revalidate_secret in Laravel

Package layout

src/
  index.ts                  Public exports
  page.tsx                  Catch-all router (delegates to pages/)
  layout.tsx                Root layout — theme + pixel + fonts
  revalidate.ts             ISR webhook handler
  styles.css                Tailwind v4 @theme + base styles
  lib/
    api.ts                  fetch wrappers, ISR-tagged
    types.ts                TS types matching the Laravel API contract
    format.ts               BDT formatter, discount %, relative time
    cart.ts                 zustand cart store with localStorage persist
    pixel.ts                Meta Pixel client-side event helpers
    theme.ts                Brand-color → CSS variable injection
    utils.ts                cn() Tailwind class merger
  components/
    ui/                     shadcn-style primitives (button, badge, sheet, …)
    layout/                 header, footer, messenger-cta, cod-badge
    product/                product-card, product-grid, add-to-cart-block
    cart/                   cart-drawer
    checkout/               checkout-client (the form)
    order/                  order-lookup-form
  pages/                    page components composed by src/page.tsx
app/                        Dev-only shell — re-exports from src/ so
                            `npm run dev` boots the same UI a tenant would see.

Updating a deployed tenant

  1. Bump version in this package's package.json
  2. npm publish
  3. In the Reply.BD dashboard, each tenant clicks "Update template" → Vercel rebuilds against the latest npm install

License

UNLICENSED. Internal Reply.BD project.