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

ecom-user-sdk

v1.1.2

Published

This library provides **all the core functionality needed to build a user-centric e-commerce website**, designed so anyone can create a fully functional platform in a day. It is **component-based, context-aware, and includes caching** for optimal perfor

Readme

🛍️ User-Focused E-Commerce Library

This library provides all the core functionality needed to build a user-centric e-commerce website, designed so anyone can create a fully functional platform in a day.
It is component-based, context-aware, and includes caching for optimal performance and seamless integration.


✨ Key Features

  • User Profiles
    Store user details including name, email, phone, and avatar. Fully integrated with authentication providers like Supabase or Firebase.

  • Addresses
    Manage multiple addresses per user, including shipping and billing, with default selection support.

  • Cart Management
    Add, remove, and update items in the cart. Automatically calculate subtotals, discounts, taxes (GST/VAT), and grand totals.
    Supports caching and context-based state for fast, reactive UI updates.

  • Orders
    Capture complete order details with snapshots of the cart and selected addresses to ensure consistent order history.

  • Component-Based Architecture
    Prebuilt React/Next.js components for cart, checkout, and variation selection.
    Makes integration into any frontend straightforward and consistent.

  • Extensibility & Compatibility
    Works with any authentication system (Supabase, Firebase, JWT, etc.).
    Can be easily integrated into Node.js or Next.js projects.
    Fully extendable for features like preferences, wishlists, saved payments, and multilingual support.

  • Caching & Context
    Optimized for performance with built-in caching.
    Context-based state management ensures seamless updates across components.


📂 Suggested Database Schema

  • users → Stores user profiles and links to your authentication provider.
  • user_addresses → Multiple addresses per user (shipping, billing, other).
  • orders → References users and snapshots of addresses/cart items.
  • order_items → Contains products associated with a specific order.

🌍 Why Use This Library?

  • Build a ready-to-go e-commerce website in a single day.
  • Focus on front-end, branding, and UX while the library handles user, cart, and order logic.
  • Component-based design ensures modular, maintainable, and scalable architecture.
  • Caching and context make your app fast, responsive, and reactive.

🛠️ Tech Notes

  • Designed for Postgres/Supabase, but database-agnostic.
  • Component-based with React/Next.js integration in mind.
  • Prioritizes user-centered workflows: profile → address → cart → order.
  • Extendable with additional features like loyalty programs, saved payments, and more.

📜 License

MIT © 2025 Your Name

// { // "name": "ecom-user-sdk", // "version": "1.1.1", // "main": "dist/index.js", // "scripts": { // "test": "echo "Error: no test specified" && exit 1", // "build": "tsup src --format esm,cjs --out-dir dist" // }, // "keywords": [], // "author": "", // "license": "ISC", // "description": "", // "exports": { // ".": "./dist/index.js", // "./product": "./dist/hooks/products/index.js", // "./server": "./dist/hooks/server/index.js", // "./cart": "./dist/hooks/cart/index.js", // "./user": "./dist/hooks/user/index.js", // "./order": "./dist/hooks/orders/index.js", // "./payment/razorpay": "./dist/hooks/payments/razorpay/index.js", // "./payment/cod": "./dist/hooks/payments/cashOnDelivery/index.js", // "./context": "./dist/context/index.js", // "./auth/supabase": "./dist/auth/supabase/index.js", // "./shiprocket": "./dist/hooks/shiprocket/index.js", // "./email": "./dist/hooks/email/index.js" // }, // "peerDependencies": { // "react": "^18.0.0 || ^19.0.0", // "react-dom": "^18.0.0 || ^19.0.0", // "react-hook-form": "^7.59.0", // "@supabase/supabase-js": "^2.44.2" // }, // "devDependencies": { // "tsup": "^8.5.0", // "typescript": "^5.9.2" // }, // "dependencies": { // "razorpay": "^2.9.6" // } // }