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

@liiift-studio/sales-portal

v3.1.6

Published

Centralized sales portal package for Liiift Studio projects

Readme

@liiift-studio/sales-portal

Centralized sales portal dashboard for Liiift Studio foundry projects.

Features

  • Designer authentication via Sanity CMS
  • Admin multi-designer view with sequential loading
  • Monthly sales data from Stripe (invoices + payment intents)
  • Interactive charts and data visualization (MUI X-Charts)
  • DataGrid tables with sorting, filtering, and CSV export
  • Date range selection for custom export reports
  • Stripe balance reconciliation checks
  • Top performers analysis (typefaces and designers)
  • Typeface and license type breakdowns
  • Summary cards with key metrics
  • Login modal with two-column layout

Installation

npm install @liiift-studio/sales-portal

Prerequisites

Peer dependencies required in your project:

{
  "@mui/material": "^5.10.0",
  "@mui/x-data-grid": "^8.0.0",
  "@mui/x-date-pickers": "^7.0.0",
  "@mui/x-charts": "^7.0.0",
  "react": "^18.0.0",
  "react-dom": "^18.0.0",
  "next": "^14.0.0",
  "dayjs": "^1.11.0",
  "slugify": "^1.6.0"
}

Note: Compatible with MUI v5 through v7 (uses Box/flexbox instead of Grid).

Quick Start

1. Create API route wrappers

pages/api/sales-portal/
  getDesignerInfo.js
  getDesigners.js
  getSales.js
  getBalanceTransactions.js

Each file is a one-line re-export:

// pages/api/sales-portal/getSales.js
export { default, config } from '@liiift-studio/sales-portal/api/getSales';

2. Create the page

// pages/sales-portal.js
import { SalesPortalPage } from '@liiift-studio/sales-portal';

export default function SalesPortal() {
  return (
    <SalesPortalPage
      texts={{
        title: 'Sales Portal',
        dashboardTitle: ' Sales',
        dashboardSubtitle: 'by designer'
      }}
    />
  );
}

3. Configure Next.js

// next.config.js
const nextConfig = {
  transpilePackages: ['@mui/x-charts', '@liiift-studio/sales-portal'],
};

4. Set environment variables

# .env.local
SANITY_STUDIO_PROJECT_ID=your_project_id
SANITY_STUDIO_DATASET=production
SANITY_STUDIO_TOKEN=your_sanity_token
STRIPE_SECRET_KEY=your_stripe_secret_key
SALES_PORTAL_ENABLED=true

API Endpoints

| Endpoint | Method | Purpose | |----------|--------|---------| | getDesignerInfo | POST | Authenticate designer, return account data | | getDesigners | GET | List all designers (admin) | | getSales | POST | Fetch sales data for a month or date range | | getBalanceTransactions | POST | Fetch Stripe balance transactions for reconciliation |

Component Exports

import {
  SalesPortalPage,  // Full page with login modal + dashboard
  LoginForm,        // Login modal component
  Sales,            // Individual designer sales dashboard
  SalesTable,       // Sales data table with CSV export
  DateRangeSalesTable, // Custom date range export table
  SalesChart,       // Revenue trend charts
  SummaryCards,     // Key metrics cards
  TopPerformers,    // Top typefaces/designers
  TypefaceList,     // Typeface breakdown
  LicenseTypeList,  // License type analysis
  PeriodComparison, // Period comparison charts
  salesTheme,       // MUI theme
} from '@liiift-studio/sales-portal';

Architecture

@liiift-studio/sales-portal
  api/
    utils/
      clients.js           # Shared Sanity + Stripe clients
      apiResponse.js       # Standardized error/success responses
      authMiddleware.js     # Request authentication
      dateUtils.js          # UTC date range utilities
      salesDataProcessor.js # Core sales data pipeline
      stripeFetcher.js      # Stripe API pagination
      feeCalculator.js      # Fee distribution + rounding
      processors/
        invoiceProcessor.js     # Stripe invoice processing
        paymentProcessor.js     # Stripe payment intent processing
  components/               # React components (Box/flexbox, no MUI Grid)
  styles/                   # SCSS + MUI theme
  hooks/                    # Custom React hooks
  utils/                    # Client-side utilities

Currently deployed on

Development

  1. Make changes in the sales-portal repo
  2. Bump version in package.json
  3. Commit and push to master
  4. Publish: npm publish --access public
  5. Foundry sites pick up new version on next deploy (uses ^ semver)

License

UNLICENSED