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

d2cpulse

v1.0.1

Published

MCP server for Shopify store analysis - competitive intelligence for D2C brands. Works as both a standalone MCP server and a Next.js web app.

Readme

D2CPulse

AI-Powered Competitive Intelligence for D2C Brands

D2CPulse is an intelligent web application that provides comprehensive competitive analysis of Shopify-based D2C (Direct-to-Consumer) stores. Powered by AI and built with Next.js, it delivers actionable insights on pricing strategies, product positioning, and market analysis.

Next.js React Neurolink


✨ Features

🤖 AI-Powered Analysis

  • Conversational Interface: Natural language chat interface for store analysis
  • Real-time Streaming: Instant AI responses with streaming support
  • Memory Retention: Maintains conversation context across multiple queries

📊 Comprehensive Store Insights

  • Pricing Strategy Analysis: Identifies luxury, premium, value, or penetration pricing
  • Product Distribution: Analyzes budget, mid-range, premium, and luxury segments
  • Promotional Strategy: Detects aggressive, selective, or premium no-discount approaches
  • Variant Analysis: Evaluates product customization and options strategy
  • Catalog Positioning: Determines niche specialist vs. broad generalist approach

🛍️ Shopify Store Intelligence

  • Automatic product catalog fetching with pagination
  • Collection and category analysis
  • Pricing distribution and statistics
  • Sale and discount detection
  • Vendor and tag analysis

🚀 Getting Started

Prerequisites

  • Node.js 18.x or higher
  • pnpm package manager
  • Access to LiteLLM API endpoint (or compatible AI service)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd d2cpulse
  2. Install dependencies

    pnpm install
  3. Configure environment variables

    Create a .env.local file in the root directory:

    LITELLM_BASE_URL=your_litellm_endpoint
    LITELLM_API_KEY=your_api_key
    LITELLM_MODEL=claude-sonnet-4-5
  4. Run the development server

    pnpm dev
  5. Open your browser

    Navigate to http://localhost:3000


💡 Usage

Analyzing a Store

Simply type natural language queries in the chat interface:

Analyze boat-lifestyle.com
Compare gonoise.com and nike.com
What's the pricing strategy for allbirds.com?

Example Prompts

  • Single Store Analysis: "Analyze shopify-store.com"
  • Pricing Insights: "What's the pricing strategy?"
  • Comparative Analysis: "Compare these two stores"
  • Product Strategy: "Tell me about their product range"

Understanding the Analysis

The AI provides detailed reports including:

  • Overview: Total products, collections, price range
  • Pricing Strategy: Average/median prices, distribution, positioning
  • Product Strategy: Variant options, catalog breadth
  • Strategic Insights: Promotional approach, market positioning

🏗️ Architecture

Tech Stack

  • Framework: Next.js 16 with App Router
  • Frontend: React 19 with Client Components
  • AI Integration: @juspay/neurolink
  • API: Next.js API Routes with streaming support
  • Styling: CSS Modules

Project Structure

d2cpulse/
├── src/
│   ├── app/
│   │   ├── api/
│   │   │   └── chat/
│   │   │       └── route.js      # AI chat endpoint with streaming
│   │   ├── layout.js              # Root layout
│   │   ├── page.js                # Main chat interface
│   │   └── globals.css            # Global styles
│   └── lib/
│       └── shopify-analyzer.js    # Shopify store analysis logic
├── public/                         # Static assets
├── .env.local                      # Environment configuration
└── package.json

Key Components

/api/chat Endpoint

  • Handles AI conversation with streaming responses
  • Integrates Neurolink for LLM communication
  • Automatically detects store URLs and triggers analysis
  • Maintains conversation memory across requests

Shopify Analyzer (/lib/shopify-analyzer.js)

  • Fetches products via Shopify's public API
  • Handles pagination and rate limiting
  • Calculates pricing statistics and distributions
  • Generates strategic insights

Chat Interface (/app/page.js)

  • Real-time message streaming
  • Example prompt suggestions
  • Responsive design with modern UI
  • HTML rendering for formatted AI responses

🔧 Configuration

Environment Variables

| Variable | Description | Required | | ------------------ | -------------------------------------------- | -------- | | LITELLM_BASE_URL | LiteLLM API endpoint URL | Yes | | LITELLM_API_KEY | Authentication key for LiteLLM | Yes | | LITELLM_MODEL | AI model to use (default: claude-sonnet-4-5) | Yes |

Model Configuration

The application supports any model compatible with LiteLLM, including:

  • Claude (Anthropic)
  • GPT-4 (OpenAI)
  • Custom models via LiteLLM proxy

📈 Features in Detail

Pricing Strategy Detection

The analyzer categorizes stores into:

  • Luxury: Average price > ₹16,000
  • Premium: Average price > ₹12,000
  • Value: Average price between ₹2,400-₹12,000
  • Penetration: Average price < ₹2,400

Price Distribution Analysis

Products are segmented into:

  • Budget: < ₹4,000
  • Mid-Range: ₹4,000 - ₹12,000
  • Premium: ₹12,000 - ₹40,000
  • Luxury: > ₹40,000

Strategic Insights

  • Catalog Strategy: Niche specialist vs. broad generalist
  • Pricing Consistency: Spread analysis across product range
  • Promotional Strategy: Discount frequency and intensity
  • Variant Strategy: Customization and option complexity

🛠️ Development

Build for Production

pnpm build

Start Production Server

pnpm start

Code Structure

  • API Routes: Node.js runtime with dynamic rendering
  • Client Components: Interactive UI with React hooks
  • Streaming: Incremental response delivery for better UX
  • Error Handling: Graceful degradation and user feedback

🤝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.


📄 License

This project is private and proprietary.


🙏 Acknowledgments

  • Built with Neurolink by Juspay
  • Powered by AI models via LiteLLM
  • Shopify public API for store data

📞 Support

For questions or support, please contact the development team.


Made with ❤️ for D2C competitive intelligence