
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@classytic/commerce-sdk
Advanced tools
Commerce SDK - Modular API client for Classytic commerce platform in Bangladesh
Modular API client and React hooks for the Classytic commerce platform.
npm install @classytic/commerce-sdk
import { initCommerceSDK } from '@classytic/commerce-sdk';
// Initialize once at app startup
initCommerceSDK({ baseUrl: process.env.NEXT_PUBLIC_API_URL! });
Import what you need from domain-specific modules:
// Catalog (products, categories, size guides)
import { productApi, useProducts, useProductDetail } from '@classytic/commerce-sdk/catalog';
// Sales (orders, customers, cart, POS, transactions)
import { orderApi, useOrders, useCart } from '@classytic/commerce-sdk/sales';
// Inventory (stock, purchases, transfers, suppliers)
import { stockApi, useInventory, useTransfers } from '@classytic/commerce-sdk/inventory';
// Platform (branches, users, coupons, config)
import { branchApi, useBranches, usePlatformConfig } from '@classytic/commerce-sdk/platform';
// Auth (login, register, password reset)
import { loginApi, UserRole, verifyManagerAuth } from '@classytic/commerce-sdk/auth';
// Finance, Logistics, Content, Payments, Analytics
import { useFinanceSummary } from '@classytic/commerce-sdk/finance';
import { useDeliveryCharge } from '@classytic/commerce-sdk/logistics';
import { mediaApi, useCMSPage } from '@classytic/commerce-sdk/content';
import { usePaymentActions } from '@classytic/commerce-sdk/payments';
import { useAnalyticsDashboard } from '@classytic/commerce-sdk/analytics';
import { productApi } from '@classytic/commerce-sdk/catalog';
// Fetch data server-side
const products = await productApi.getAll({ params: { page: 1 } });
const product = await productApi.getBySlug({ slug: 'my-product' });
import { useProducts, useProductActions } from '@classytic/commerce-sdk/catalog';
function ProductList({ token }) {
const { items, isLoading } = useProducts(token, { page: 1 });
const { create, update, remove } = useProductActions(token);
// ...
}
import { handleApiRequest, BaseApi } from '@classytic/commerce-sdk/core';
// Make custom API calls
const data = await handleApiRequest('POST', '/api/v1/custom', {
token,
body: { ... }
});
Place orders without authentication. The frontend stores cart items in localStorage and sends them directly in the request body along with guest identity.
import { useGuestCheckout } from '@classytic/commerce-sdk/sales';
import type { GuestCheckoutPayload } from '@classytic/commerce-sdk/sales';
function GuestCheckoutButton({ cartItems }) {
const { guestCheckout, isCheckingOut } = useGuestCheckout();
const handleCheckout = async () => {
const order = await guestCheckout({
items: cartItems.map(item => ({
productId: item.productId,
variantSku: item.variantSku,
quantity: item.quantity,
})),
guest: { name: 'John Doe', phone: '01712345678', email: 'john@example.com' },
deliveryAddress: { recipientName: 'John', recipientPhone: '01712345678', addressLine1: '...', areaId: 1 },
delivery: { method: 'standard', price: 80 },
paymentData: { type: 'bkash', reference: 'TRX123' },
idempotencyKey: `guest_01712345678_${Date.now()}`,
});
};
return <button onClick={handleCheckout} disabled={isCheckingOut}>Place Order</button>;
}
Or call the API directly without React:
import { orderApi } from '@classytic/commerce-sdk/sales';
const response = await orderApi.guestCheckout({
data: { items, guest, deliveryAddress, delivery, paymentData },
});
No auth token is required. Product prices are always resolved from the database server-side. Repeat guests are matched by phone number.
All types are co-located with their modules:
import type { Product, Category } from '@classytic/commerce-sdk/catalog';
import type { Order, Customer } from '@classytic/commerce-sdk/sales';
import type { StockEntry, Transfer } from '@classytic/commerce-sdk/inventory';
import type { User, UserRoleType } from '@classytic/commerce-sdk/auth';
Proprietary - see LICENSE
FAQs
Commerce SDK - Modular API client for Classytic commerce platform in Bangladesh
We found that @classytic/commerce-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.