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

@symanticreative/vendure-admin-client

v1.1.3

Published

A TypeScript GraphQL client for Vendure Admin API to create custom dashboards

Readme

Vendure Admin Client

A TypeScript GraphQL client for the Vendure Admin API, implemented with a service-repository pattern and dependency injection.

Architecture

This client follows a clean architecture with clear separation of concerns:

  1. Service Layer: Business logic and high-level operations
  2. Repository Layer: Data access and GraphQL operations
  3. Client Layer: The main entry point that integrates everything
  4. Core: Shared infrastructure, interfaces, and utilities
  5. Models: Data structures and DTOs

Key Features

  • TypeScript-first with strong typing throughout
  • Service-Repository Pattern for clean separation of concerns
  • Dependency Injection for better testability and flexibility
  • GraphQL-powered using Apollo Client
  • Domain-driven Design with separate modules for different entities
  • Next.js Integration with examples for server-side usage

Usage

Installation

npm install @symanticreative/vendure-admin-client

Basic Usage

import { 
  VendureAdminClientFactory, 
  VendureAdminClient 
} from '@symanticreative/vendure-admin-client';

// Create a client instance
const client = VendureAdminClientFactory.createClient({
  apiUrl: 'https://your-vendure-instance.com/admin-api',
});

// Login using the auth service
await client.auth.login({
  email: '[email protected]',
  password: 'password',
});

// Get products using the product service
const products = await client.products.getPaginated({ take: 10 });

// Use the order service
const orders = await client.orders.getPaginated({ take: 5 });

// Use the customer service
const customers = await client.customers.getPaginated({ take: 10 });

// Use the settings service
const settings = await client.settings.getSettings();

Architecture Details

Service Layer

Services handle business logic and provide a high-level API for common operations:

  • AuthService: Authentication operations
  • ProductService: Product management
  • OrderService: Order processing
  • CustomerService: Customer management
  • SettingsService: Admin settings

Repository Layer

Repositories handle data access and GraphQL operations:

  • AuthRepository: Authentication operations
  • ProductRepository: Product data access
  • OrderRepository: Order data access
  • CustomerRepository: Customer data access
  • SettingsRepository: Settings data access

Dependency Injection

The client uses a simple dependency injection container for managing dependencies:

const container = Container.getInstance();
container.register('ProductService', new ProductService(productRepository));
const productService = container.get<ProductService>('ProductService');

GraphQL Client

A GraphQL client service handles all GraphQL operations:

const graphqlClient = new GraphQLClientService(config);
const result = await graphqlClient.query(GET_PRODUCTS, { options });

Next.js Integration

For Next.js applications, the client can be initialized in the app's entry point:

// app/layout.tsx
import { getVendureClient } from '@/lib/vendure-client';

// Initialize the client on the server side
if (typeof window === 'undefined') {
  getVendureClient();
}

export default function RootLayout({ children }) {
  return (
    <html>
      <body>{children}</body>
    </html>
  );
}

And then used in server actions:

// actions.ts
'use server'

import { getVendureClient } from '@/lib/vendure-client';

export async function getDashboardData() {
  const client = getVendureClient();
  return client.products.getPaginated({ take: 5 });
}

Examples

The package includes examples:

  • examples/basic-usage.ts: Simple usage example
  • examples/nextjs-example/: Complete Next.js application example

License

MIT License