Skip to main content
npm versionnpm downloadsTypeScriptMIT License

DJUST Front SDK

Universal TypeScript SDK for DJUST B2B API - SSR-safe, type-safe, production-ready

npm install @djust-b2b/djust-front-sdk
🔒

SSR-Safe by Design

Request-scoped client instances prevent state leakage between users. Perfect for Nuxt, Next.js, and any SSR framework.

📝

Type-Safe API

Full TypeScript support with auto-completion, type inference, and comprehensive interfaces for all API operations.

🚀

Production-Ready

Built-in retry logic, timeout handling, structured error types, and Sentry integration for enterprise deployments.

🌳

Tree-Shakeable

Import only what you need. Modular architecture keeps your bundle size minimal and performance optimal.

🏢

B2B E-commerce Ready

Complete API coverage for B2B workflows: accounts, quotes, orders, pricing, inventory, and more.

💡

Developer Experience

Comprehensive documentation, real-world examples, and consistent API design across all services.

Quick Start

Get up and running in minutes with our SSR-safe client. Full TypeScript support with auto-completion for all API methods.

  • ✅ SSR-safe request-scoped instances
  • ✅ Full TypeScript support
  • ✅ Auto-retry and timeout handling
  • ✅ Structured error types
  • ✅ Tree-shakeable imports
Installation Guide →
example.ts
import { createDjustClient } from '@djust-b2b/djust-front-sdk';

// Create SSR-safe client instance
const client = createDjustClient({
baseUrl: process.env.DJUST_API_URL,
clientId: process.env.DJUST_CLIENT_ID,
apiKey: process.env.DJUST_API_KEY,
});

// Use with full type safety
const products = await client.product.search({
input: 'laptop',
locale: 'en-US',
currency: 'EUR',
});

// SSR context support
const user = await client.auth.login(
{ username, password },
{ headers: req.headers } // Pass SSR context
);

Complete B2B API Coverage

18+ services covering all aspects of B2B e-commerce operations

🔐AuthenticationLogin, tokens, password reset
🏢Customer AccountB2B accounts, addresses
👤Customer UsersUser management, roles
📦ProductsCatalog, search, variants
🛒CartShopping cart operations
📋QuotesB2B quotes and RFQ
📝OrdersCommercial & logistic orders
💳PaymentPayment processing
💰PricingOffer prices, inventory
🏷️CategoriesNavigation, attributes
⚙️OperationsPromotions, incidents
🚚SuppliersSupplier management