Unchained Admin UI

June 26, 2026 ยท View on GitHub

Unchained Admin UI

npm version Next.js React

The open-source admin dashboard for Unchained Commerce โ€” manage your headless e-commerce with AI superpowers


๐Ÿ“ธ Screenshots

ProductsDashboardProduct

โœจ Features

FeatureDescription
๐Ÿค– AI CopilotBuilt-in AI assistant with Model Context Protocol (MCP) for intelligent automation
๐Ÿ“ฆ Product ManagementSimple, Bundle, Configurable, Subscription Plans & NFT-tokenized products
๐Ÿ›’ Order & FulfillmentComplete order lifecycle with configurable workflows
๐Ÿ’ผ B2B QuotationsProfessional quotation management with approval workflows
๐Ÿ“Š Inventory ControlMulti-warehouse tracking with low-stock alerts
๐Ÿ’ณ Payment & ShippingIntegrate any payment gateway or delivery provider
๐ŸŒ Multi-language & CurrencyFull i18n support with country-specific locales
๐Ÿ” Role-Based AccessGranular permissions with build-time security
๐ŸŽจ Customizable BrandingWhite-label ready with custom logos
๐Ÿ“ฑ Responsive DesignWorks on desktop, tablet, and mobile

๐Ÿ› ๏ธ Tech Stack

Next.js 15React 19Apollo GraphQLTailwind CSS 4TypeScript

Plus: Formik โ€ข React Intl โ€ข Headless UI โ€ข Recharts โ€ข Cypress โ€ข AI SDK


๐Ÿš€ Quick Start

Prerequisites

Installation

# Clone the repository
git clone git@github.com:unchainedshop/unchained.git
cd admin-ui

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3000 in your browser.


โš™๏ธ Configuration

Environment Variables

VariableDefaultDescription
NEXT_PUBLIC_GRAPHQL_ENDPOINThttp://localhost:4010/graphqlUnchained Engine GraphQL endpoint
NEXT_PUBLIC_LOGOโ€”URL to your custom logo

Create a .env.local file for local development:

NEXT_PUBLIC_GRAPHQL_ENDPOINT=https://your-engine.example.com/graphql
NEXT_PUBLIC_LOGO=https://your-cdn.com/logo.svg

๐Ÿณ Deployment

npm run build
# Output in ./out/ - deploy to any CDN (Vercel, Netlify, S3, etc.)

Express / Fastify Integration

// Express
import { expressRouter } from '@unchainedshop/admin-ui/express';
app.use('/admin', expressRouter);

// Fastify
import { fastifyRouter } from '@unchainedshop/admin-ui/fastify';
fastify.register(fastifyRouter, { prefix: '/admin' });

๐ŸŽจ Custom Theming

The admin UI uses semantic CSS custom property tokens for all surface, text, and border colors. Engine consumers can override these at runtime โ€” no rebuild required.

Pass a theme object with light and/or dark overrides when connecting the admin UI:

await connect(fastify, platform, {
  adminUI: {
    prefix: '/',
    theme: {
      light: {
        accent: '#8b5cf6',
        'accent-hover': '#7c3aed',
        'focus-ring': '#8b5cf6',
        'text-on-accent': '#ffffff',
      },
      dark: {
        accent: '#a78bfa',
        'accent-hover': '#8b5cf6',
        'focus-ring': '#a78bfa',
        'text-on-accent': '#ffffff',
      },
    },
  },
});

You only need to include the tokens you want to override โ€” unset tokens use the built-in defaults. Each key maps to a --token-{key} CSS variable. The engine serves these as /admin-ui-theme.css which loads before first paint (no flicker).

Available tokens:

TokenLight defaultDark defaultDescription
surface#ffffff#1e293bMain backgrounds (cards, modals)
surface-subtle#f8fafc#0f172aPage backgrounds
surface-raised#f1f5f9#334155Hover states, raised elements
surface-input#ffffff#0f172aForm input backgrounds
border#cbd5e1#475569Default borders
border-subtle#e2e8f0#334155Subtle/secondary borders
text-primary#0f172a#f1f5f9Headings, primary text
text-secondary#475569#94a3b8Labels, secondary text
text-muted#64748b#64748bCaptions, placeholders
accent#1e293b#475569Primary buttons, active elements
accent-hover#020617#64748bHover state for accent
focus-ring#1e293b#94a3b8Focus ring color for interactive elements
text-on-accent#ffffff#ffffffText on accent-colored backgrounds
danger#f43f5e#fb7185Error states, destructive actions
danger-surface#fff1f2oklch(...)Danger background
success#10b981#34d399Success states
warning#f59e0b#fbbf24Warning states

๐Ÿงฉ SDK โ€” Using UI Primitives in Custom Apps

The admin UI exports its component library, form system, hooks, and providers as separate entry points. This allows custom admin pages, plugins, or white-label apps to reuse the design system without forking.

npm install @unchainedshop/admin-ui

Available imports:

// UI primitives โ€” Button, Badge, Combobox, Card, Tab, etc.
import { Button, Badge, Loading, Tab, Accordion } from '@unchainedshop/admin-ui/ui';

// Form components โ€” TextField, SelectField, Combobox, CheckboxField, etc.
import { TextField, SelectField, Combobox, SubmitButton } from '@unchainedshop/admin-ui/form';

// Hooks โ€” useTheme, useModal, useField, useForm, etc.
import { useTheme, useModal, useField, useForm } from '@unchainedshop/admin-ui/hooks';

// Providers โ€” ThemeWrapper, ModalWrapper for app composition
import { ThemeWrapper, ModalWrapper } from '@unchainedshop/admin-ui/providers';

// Modal system โ€” Modal, AlertMessage, DangerMessage
import { Modal, AlertMessage, DangerMessage, useModal } from '@unchainedshop/admin-ui/modal';

// Styles โ€” import the full design token stylesheet
import '@unchainedshop/admin-ui/styles';

Building a custom admin page:

import { ThemeWrapper, ModalWrapper } from '@unchainedshop/admin-ui/providers';
import { Button, Card, CardContent } from '@unchainedshop/admin-ui/ui';
import { TextField, SubmitButton } from '@unchainedshop/admin-ui/form';
import '@unchainedshop/admin-ui/styles';

export default function CustomPage() {
  return (
    <ThemeWrapper>
      <ModalWrapper>
        <Card>
          <CardContent>
            <h1>My Custom Admin Page</h1>
            <Button variant="primary" text="Click me" />
          </CardContent>
        </Card>
      </ModalWrapper>
    </ThemeWrapper>
  );
}

Peer dependencies: React 19+, Next.js 15+ (for components that use next/link and next/router).

Build the SDK: npm run build:sdk generates the dist/ directory with ESM bundles and TypeScript declarations.


๐Ÿ“ Development

CommandDescription
npm run devStart dev server with debugging
npm run buildProduction build
npm run lintRun ESLint
npm run formatFormat with Prettier
npm run codegenGenerate GraphQL types
npm run test:e2eRun Cypress E2E tests
npm run test:componentRun Cypress component tests
npm run extract-translationExtract i18n strings
npm run compile-translationCompile translations

๐Ÿ—๏ธ Architecture

Modular architecture with 27+ domain modules:

src/modules/
โ”œโ”€โ”€ product/           # Catalog & variants
โ”œโ”€โ”€ order/             # Order management
โ”œโ”€โ”€ quotation/         # B2B quotations
โ”œโ”€โ”€ copilot/           # AI assistant
โ”œโ”€โ”€ token/             # NFT tokenization
โ”œโ”€โ”€ enrollment/        # Subscriptions
โ”œโ”€โ”€ assortment/        # Categories
โ”œโ”€โ”€ user/              # Customer management
โ”œโ”€โ”€ payment-providers/ # Payment gateways
โ”œโ”€โ”€ delivery-provider/ # Shipping
โ”œโ”€โ”€ country/           # Multi-country
โ”œโ”€โ”€ currency/          # Multi-currency
โ””โ”€โ”€ ...                # And more

Each module follows the pattern:

  • components/ โ€” React components
  • hooks/ โ€” Data fetching hooks (use{Action}{Entity})
  • fragments/ โ€” GraphQL fragments
  • utils/ โ€” Domain utilities

Documentation โ€ข Website