Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Rename `@spree/admin` to `@spree/dashboard` (#14102)

Damian Legawiec50dd0578c898
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index aac08ccb10..81f02449ad 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -85,8 +85,8 @@ jobs:
working-directory: packages/sdk
run: pnpm test:integration
- admin-e2e:
- name: "Admin SPA - E2E"
+ dashboard-e2e:
+ name: "Dashboard - E2E"
runs-on: ubuntu-latest
env:
RAILS_ENV: test
@@ -123,7 +123,7 @@ jobs:
- name: Read Playwright version
id: playwright
run: |
- VERSION=$(node -p "require('./packages/admin/node_modules/@playwright/test/package.json').version")
+ VERSION=$(node -p "require('./packages/dashboard/node_modules/@playwright/test/package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
@@ -135,18 +135,18 @@ jobs:
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
- working-directory: packages/admin
+ working-directory: packages/dashboard
run: pnpm exec playwright install --with-deps chromium
# Even on a cache hit Playwright still wants the OS-level deps installed
# (libnss, libxkbcommon, …). `install-deps` is the cheap part.
- name: Install Playwright OS deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- working-directory: packages/admin
+ working-directory: packages/dashboard
run: pnpm exec playwright install-deps chromium
- - name: Run admin E2E tests
- working-directory: packages/admin
+ - name: Run dashboard E2E tests
+ working-directory: packages/dashboard
run: pnpm test:e2e
- name: Upload Playwright report
@@ -155,8 +155,8 @@ jobs:
with:
name: playwright-report
path: |
- packages/admin/playwright-report/
- packages/admin/test-results/
+ packages/dashboard/playwright-report/
+ packages/dashboard/test-results/
retention-days: 14
release-sdk:
diff --git a/CLAUDE.md b/CLAUDE.md
index a3e9ef1ec0..2fde30587e 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -62,7 +62,9 @@ Shipped plans:
| `spree/core` | Ruby gem — models, services, business logic (`spree_core`) |
| `spree/api` | Ruby gem — Store & Admin REST APIs (`spree_api`) |
| `spree/emails` | Ruby gem — transactional emails (optional). Deprecated in 6.0 — Next.js storefront handles consumer emails via webhooks. |
-| `packages/admin` | `@spree/admin` — React SPA admin dashboard (Spree 6.0, replaces `spree/admin`) |
+| `packages/dashboard` | `@spree/dashboard` — React SPA admin dashboard (Spree 6.0, replaces `spree/admin`). The deployable app shell, routes, schemas, resource hooks, locales. |
+| `packages/dashboard-ui` | `@spree/dashboard-ui` — design system. Shadcn primitives + headless composed components + tokens. Source-only; consumer compiles via Vite/Tailwind. **Components are headless: data comes via props, no provider/hook imports.** |
+| `packages/dashboard-core` | `@spree/dashboard-core` — framework. Registries (table, nav, slot, settings-nav), providers (auth, permission, store, theme), generic infra hooks, admin SDK client singleton, `defineDashboardPlugin` facade. The extension API for plugin authors. |
| `packages/sdk` | `@spree/sdk` — TypeScript Store API client |
| `packages/admin-sdk` | `@spree/admin-sdk` — TypeScript Admin API client (Developer Preview) |
| `packages/sdk-core` | `@spree/sdk-core` — shared HTTP/retry/error layer (private internal) |
@@ -428,9 +430,16 @@ pnpm typecheck
Same patterns as `@spree/sdk` but for the Admin API. Supports both secret key (server-to-server) and JWT (admin SPA) authentication. Published under the `next` dist-tag during the Spree 6.0 Developer Preview.
-### @spree/admin — Admin UI (React SPA)
+### @spree/dashboard — Admin UI (React SPA)
-The Spree 6.0 admin dashboard — a Vite-built React SPA that replaces the legacy Rails `spree/admin` engine entirely. Tech stack: Vite, TanStack Router (file-based, type-safe), TanStack Query, React Hook Form + Zod, shadcn/ui + Base UI + Tailwind, Biome, Vitest. All API calls go through `@spree/admin-sdk`. See [`packages/admin/README.md`](packages/admin/README.md) and `docs/plans/6.0-admin-spa.md` for the full architecture (auth, permissions, multi-store, extension points).
+The Spree 6.0 admin dashboard — a Vite-built React SPA that replaces the legacy Rails `spree/admin` engine entirely. Tech stack: Vite, TanStack Router (file-based, type-safe), TanStack Query, React Hook Form + Zod, shadcn/ui + Base UI + Tailwind, Biome, Vitest. All API calls go through `@spree/admin-sdk`. See [`packages/dashboard/README.md`](packages/dashboard/README.md) and `docs/plans/6.0-admin-spa.md` for the full architecture (auth, permissions, multi-store, extension points, the three-package split).
+
+**Package boundary rules** (see `docs/plans/6.0-admin-spa.md` → "Package Split"):
+- `@spree/dashboard-ui` — primitives + headless compounds. Components accept data via props, never import providers or hooks.
+- `@spree/dashboard-core` — registries, providers, generic infra hooks, admin SDK client singleton, `defineDashboardPlugin`.
+- `@spree/dashboard` — routes, resource hooks (`use-orders`, `use-products`, …), Zod schemas, locales, app shell.
+
+The split lets plugin authors register UI via `defineDashboardPlugin` from `@spree/dashboard-core/plugin`, build new pages with `@spree/dashboard-ui` primitives, and reuse the same providers/hooks. It also lets app developers compose custom dashboards (e.g. vendor panels) from the same packages.
**Running the admin UI locally:**
@@ -440,7 +449,7 @@ pnpm server:setup # one-time: clones spree-starter into ./server
pnpm server:dev # Rails on http://localhost:3000
# 2. Boot the admin (separate terminal)
-cd packages/admin
+cd packages/dashboard
pnpm dev # http://localhost:5173 (proxies /api/* to :3000)
```
@@ -465,11 +474,11 @@ async function handleSubmit(values: FormValues) {
}
```
-- **Labels/placeholders/help** come from `packages/admin/src/locales/en.json` under `admin.fields.<resource>.<attribute>.{label,placeholder,help}` with cross-resource fallback `admin.fields.<attribute>.<facet>`. Dev mode logs missing keys to the console.
+- **Labels/placeholders/help** come from `packages/dashboard/src/locales/en.json` under `admin.fields.<resource>.<attribute>.{label,placeholder,help}` with cross-resource fallback `admin.fields.<attribute>.<facet>`. Dev mode logs missing keys to the console.
- **Client validation** lives in the Zod schema (`zodResolver`).
- **Mutation hooks built on `useResourceMutation` suppress their own toast for 422 responses** — the form already shows the inline message. Non-validation errors (network, 5xx, gateway) still toast. For a plain `useMutation` you want a fallback toast on, layer the catch: try `mapSpreeErrorsToForm` first, re-throw `SpreeError`, otherwise `toast.error(...)`.
-**Form schemas** live in `packages/admin/src/schemas/<resource>.ts` when shared across 2+ files or non-trivial (~30+ lines, nested sub-schemas, companion constants); inline is fine for short single-file forms. The schema file owns the Zod schema, its inferred `FormValues` type, defaults, dropdown option arrays, and regex constants. **Don't add form↔API mappers to paper over field renames** — if you find yourself translating `ot.label → form.presentation`, fix the API instead (read/write symmetry, see "API Controllers" above). Mappers are only for pure frontend state (upload progress, transient UI bookkeeping).
+**Form schemas** live in `packages/dashboard/src/schemas/<resource>.ts` when shared across 2+ files or non-trivial (~30+ lines, nested sub-schemas, companion constants); inline is fine for short single-file forms. The schema file owns the Zod schema, its inferred `FormValues` type, defaults, dropdown option arrays, and regex constants. **Don't add form↔API mappers to paper over field renames** — if you find yourself translating `ot.label → form.presentation`, fix the API instead (read/write symmetry, see "API Controllers" above). Mappers are only for pure frontend state (upload progress, transient UI bookkeeping).
**Base UI `<Select>` does not auto-render labels.** Unlike Radix, Base UI's `<Select.Value />` renders the raw selected `value` (the slug, the ISO code, the prefixed ID) instead of the matching `<SelectItem>`'s children. Two fixes:
@@ -585,11 +594,11 @@ cd packages/sdk && pnpm test # SDK tests (uses MSW for HTTP mocking)
### Admin SPA E2E (Playwright)
-End-to-end tests for `packages/admin` live in `packages/admin/e2e/`. The global setup boots a real Rails test server (port 3010) + Vite dev (port 5174) once and seeds the DB; specs then exercise the SPA through a browser against that stack.
+End-to-end tests for `packages/dashboard` live in `packages/dashboard/e2e/`. The global setup boots a real Rails test server (port 3010) + Vite dev (port 5174) once and seeds the DB; specs then exercise the SPA through a browser against that stack.
```bash
-cd packages/admin && pnpm test:e2e # full suite
-cd packages/admin && pnpm test:e2e:ui # Playwright UI mode (debug)
+cd packages/dashboard && pnpm test:e2e # full suite
+cd packages/dashboard && pnpm test:e2e:ui # Playwright UI mode (debug)
```
**Write UI-only assertions, like Capybara.** Drive the test through user-visible actions (fill labels, click buttons, find by role) and assert on visible UI. **Do not** reach for `page.waitForResponse(/api/...)` to wait for backend completion — it leaks API shape into tests and makes refactors painful. Playwright's `await expect(...).toBeVisible()` auto-polls until the condition is met (same as Capybara's `default_max_wait_time`), which covers virtually all cases.
diff --git a/docs/plans/5.5-admin-auth-cookie-refresh.md b/docs/plans/5.5-admin-auth-cookie-refresh.md
index 9751690d07..95e17e2146 100644
--- a/docs/plans/5.5-admin-auth-cookie-refresh.md
+++ b/docs/plans/5.5-admin-auth-cookie-refresh.md
@@ -144,7 +144,7 @@ The constructor's `secretKey || jwtToken` guard is relaxed so a cookie-auth SPA
Storage:
- **Removed:** `TOKEN_KEY`, `REFRESH_TOKEN_KEY`, `USER_KEY` localStorage entries.
-- **Removed:** `localStorage.getItem(TOKEN_KEY)` from `packages/admin/src/client.ts` (initial token now empty).
+- **Removed:** `localStorage.getItem(TOKEN_KEY)` from `packages/dashboard/src/client.ts` (initial token now empty).
- **Kept:** `useState` for token, user, isLoading.
- **New:** `isInitializing` state — true until cold-load `/auth/refresh` settles.
@@ -167,9 +167,9 @@ Logout flow: calls `adminClient.auth.logout()`, then clears React state + refres
### Local dev — Vite proxy
-`packages/admin/vite.config.ts` proxies `/api/*` to `http://localhost:3000` so the SPA is same-origin with the Rails API. Same-origin keeps `SameSite=Lax` cookies working without HTTPS. Production builds (with `VITE_SPREE_API_URL` set to the absolute API origin) hit cross-origin and use `SameSite=None; Secure`.
+`packages/dashboard/vite.config.ts` proxies `/api/*` to `http://localhost:3000` so the SPA is same-origin with the Rails API. Same-origin keeps `SameSite=Lax` cookies working without HTTPS. Production builds (with `VITE_SPREE_API_URL` set to the absolute API origin) hit cross-origin and use `SameSite=None; Secure`.
-`packages/admin/src/client.ts`:
+`packages/dashboard/src/client.ts`:
```ts
const baseUrl = import.meta.env.VITE_SPREE_API_URL || ''
@@ -193,7 +193,7 @@ The work landed in two commits on the PR branch:
- Routes: add `POST /api/v3/admin/auth/logout`.
- `sdk-core`: add `credentials` to `RequestConfig`, thread to fetch. Resolve relative URLs against `window.location.origin` when `baseUrl` is empty.
- `admin-sdk`: default `credentials: 'include'`, drop `refresh_token` from `AuthTokens`, `auth.refresh()` no body, `auth.logout()` new action, relax constructor guard.
-- Vite proxy on `packages/admin/vite.config.ts` so the SPA is same-origin with the API in dev.
+- Vite proxy on `packages/dashboard/vite.config.ts` so the SPA is same-origin with the API in dev.
- `auth-provider.tsx` rewrite — in-memory token + bootstrap via `/auth/refresh`, no `localStorage`.
- `isInitializing` plumbed through router context; guards in `_authenticated.tsx`, `_authenticated/index.tsx`, `login.tsx`.
- `main.tsx`: `router.invalidate()` on auth state change.
@@ -211,7 +211,7 @@ No model or migration changes — reuses existing `RefreshToken` infrastructure.
### Follow-up — OpenAPI + docs
1. Regenerate admin OpenAPI spec.
-2. Update `packages/admin/README.md` auth section.
+2. Update `packages/dashboard/README.md` auth section.
3. Update developer docs in `docs/developer/` if they describe the old shape.
## Constraints on Current Work
@@ -238,7 +238,7 @@ Until this lands:
- `docs/plans/6.0-admin-spa.md` — admin SPA architecture
- `spree/api/app/controllers/spree/api/v3/admin/auth_controller.rb` — current implementation
- `spree/api/app/controllers/concerns/spree/api/v3/jwt_authentication.rb` — JWT layer
-- `packages/admin/src/providers/auth-provider.tsx` — SPA auth provider
+- `packages/dashboard/src/providers/auth-provider.tsx` — SPA auth provider
- `packages/sdk-core/src/request.ts` — shared HTTP layer
- [Saleor Auth SDK](https://saleor.io/blog/saleor-auth-sdk) — reference design (refresh in cookie, access in memory)
- [OWASP — JWT for Java Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_for_Java_Cheat_Sheet.html#token-storage-on-client-side) — storage guidance
diff --git a/docs/plans/5.5-admin-spa-csv-export.md b/docs/plans/5.5-admin-spa-csv-export.md
index 69c60e895c..032546ae76 100644
--- a/docs/plans/5.5-admin-spa-csv-export.md
+++ b/docs/plans/5.5-admin-spa-csv-export.md
@@ -8,7 +8,7 @@
## Summary
-The legacy Rails admin (`spree/admin`) supports CSV export for products, orders, customers, gift cards, coupon codes, and newsletter subscribers via a modal that captures the current Ransack filters and queues a background job. The new Vite/React admin SPA (`packages/admin`) does not yet expose this. All backend infrastructure (`Spree::Export` polymorphic model, subclasses, `GenerateJob`, ActiveStorage attachment, email notification) already exists and is in production. This plan brings the feature back to the SPA by adding an Admin API CRUD surface for `Spree::Export`, an `exports` resource on the Admin SDK, and a toolbar button + modal + polling flow on the products, orders, and customers index pages.
+The legacy Rails admin (`spree/admin`) supports CSV export for products, orders, customers, gift cards, coupon codes, and newsletter subscribers via a modal that captures the current Ransack filters and queues a background job. The new Vite/React admin SPA (`packages/dashboard`) does not yet expose this. All backend infrastructure (`Spree::Export` polymorphic model, subclasses, `GenerateJob`, ActiveStorage attachment, email notification) already exists and is in production. This plan brings the feature back to the SPA by adding an Admin API CRUD surface for `Spree::Export`, an `exports` resource on the Admin SDK, and a toolbar button + modal + polling flow on the products, orders, and customers index pages.
## Key Decisions (do not deviate without discussion)
@@ -174,7 +174,7 @@ A changeset goes in `packages/admin-sdk/.changeset/`. Per the [admin-sdk-unrelea
### SPA: shared `useExport` hook
-`packages/admin/src/hooks/use-export.ts` — wraps SDK `create` + polling:
+`packages/dashboard/src/hooks/use-export.ts` — wraps SDK `create` + polling:
```ts
export function useExport() {
@@ -209,7 +209,7 @@ If polling times out the toast falls back to "still processing — check your em
### SPA: shared filter conversion util
-Extract the existing logic in `resource-table.tsx:152–157` into `packages/admin/src/lib/filters-to-ransack.ts`:
+Extract the existing logic in `resource-table.tsx:152–157` into `packages/dashboard/src/lib/filters-to-ransack.ts`:
```ts
export function filtersToRansack(filters: FilterRule[], columns: ColumnDef[]) {
@@ -227,7 +227,7 @@ Update `resource-table.tsx` to call this util (the inner flattening + `q[]` wrap
### SPA: `<ExportButton>` and `<ExportModal>`
-`packages/admin/src/components/spree/export-button.tsx` — renders inside the `<TableToolbar actions={…}>` slot:
+`packages/dashboard/src/components/spree/export-button.tsx` — renders inside the `<TableToolbar actions={…}>` slot:
```tsx
<ExportButton
diff --git a/docs/plans/6.0-admin-spa.md b/docs/plans/6.0-admin-spa.md
index 4a60238f57..8e38753c42 100644
--- a/docs/plans/6.0-admin-spa.md
+++ b/docs/plans/6.0-admin-spa.md
@@ -25,17 +25,116 @@ A new single-page React admin dashboard that replaces the Rails `spree/admin` en
- **No breadcrumbs.** Legacy admin used breadcrumbs because deep flows (Product → Variants → Variant edit) were full-page navigations. The SPA collapses those into drawers and inline UIs, so the chains shrink to one or two segments — covered by `<BackButton>` (in `<PageHeader>`), the page title itself, and the highlighted sidebar section. Do not reintroduce a breadcrumb component.
- **shipping_category_id is not part of product forms** — dropped in 6.0 per `6.0-fulfillment-and-delivery.md`.
- **Forms stay as explicit React Hook Form blocks** (`<Field>` / `<Input>` / `<Controller>` / `<FieldError>`) — no field/form wrapper. A `<SpreeForm>` + `<SpreeField>` abstraction was tried and rolled back (rationale in "Forms & i18n"). The compensating utilities — `mapSpreeErrorsToForm` for 422 → RHF translation, and i18n keys under `admin.fields.<resource>.<attribute>` — remain as small primitives that compose with raw RHF.
-- **i18next + react-i18next for admin UI strings.** All form labels, placeholders, help text, button copy, and toast text resolve through `useTranslation()`. Translation keys mirror Rails I18n: `admin.fields.<resource>.<attribute>.<facet>` with fallback to `admin.fields.<attribute>.<facet>`. English-only at launch (`packages/admin/src/locales/en.json`); the infrastructure supports more locales but actually translating the admin UI is a separate, opt-in project. Bundle cost: ~14 KB gzipped.
+- **i18next + react-i18next for admin UI strings.** All form labels, placeholders, help text, button copy, and toast text resolve through `useTranslation()`. Translation keys mirror Rails I18n: `admin.fields.<resource>.<attribute>.<facet>` with fallback to `admin.fields.<attribute>.<facet>`. English-only at launch (`packages/dashboard/src/locales/en.json`); the infrastructure supports more locales but actually translating the admin UI is a separate, opt-in project. Bundle cost: ~14 KB gzipped.
## Design Details
### Monorepo location
-- Package: `packages/admin/`
+- Packages: `packages/dashboard/` (the app), `packages/dashboard-core/` (framework), `packages/dashboard-ui/` (design system). See "Package Split" below.
- Depends on: `@spree/admin-sdk` (workspace), `@spree/sdk-core` (workspace)
- Output: `dist/` (static SPA). Optionally bundled into `spree_admin` gem at build time for zero-config local dev.
- Dev server: `pnpm dev` → `vite` → `http://localhost:5173`, proxying `/api/*` to `http://localhost:3000`
+### Package Split
+
+The dashboard is split into three workspace packages with a strict one-way dependency direction. The split lets plugin authors compose new pages from the same primitives core uses, and lets app developers build bespoke admin variants (vendor panels, white-labels) without forking the SPA.
+
+```
+@spree/dashboard (the deployable SPA — routes, resource hooks, Zod schemas, locales, app shell)
+ ↓ depends on
+@spree/dashboard-core (the framework — registries, providers, infra hooks, client, defineDashboardPlugin)
+ ↓ depends on (peer)
+@spree/dashboard-ui (the design system — primitives + headless compounds + tokens)
+```
+
+#### Why three packages, not one or many
+
+We looked at how Medusa, Vendure, and Saleor structure their admin packages:
+
+- **Medusa** (`@medusajs/dashboard` + `@medusajs/admin-sdk` + `@medusajs/ui` + `@medusajs/admin-vite-plugin`): three small packages plus a Vite plugin. Discovery via file convention + AST scanning. Plugin authors only ever depend on the thin SDK + UI primitives. Feature pages are private.
+- **Vendure** (`@vendure/dashboard`): one big package with three subpath exports (`.`, `./plugin`, `./vite`). Discovery introspects `vendure-config.ts` at build time. Plugin authors call `defineDashboardExtension({...})`. Feature pages are private; only the `framework/` building blocks are exported.
+- **Saleor** (`saleor-dashboard` + `@saleor/macaw-ui`): the dashboard is not even published; it's a Vite app you fork. Extensions are external services iframed in via App Manifest mount points. There is no in-process plugin model.
+
+**Industry pattern (3/3): UI primitives package + extension SDK package + dashboard app. Feature pages are never exported.** Reasons:
+
+1. Public feature pages = public API surface → every refactor of `orders/` becomes a semver event.
+2. Feature pages cross-reference each other (orders ↔ customers ↔ products); a clean split is a major refactor before you ship anything.
+3. Bundle bloat and leaked internals: feature packages always end up re-exporting private utilities.
+
+Our split matches the industry pattern but goes one step further on UI reuse: instead of bundling primitives into the dashboard app (Vendure) or shipping primitives without compounds (Medusa), `@spree/dashboard-ui` carries both — the primitives **and** the composed components (PageHeader, ResourceTable, AppSidebar, …) — as headless components that accept data via props. This is the gap none of them got right: plugin authors and custom-admin builders can use the same composed components core uses.
+
+We are not extracting per-feature packages (`@spree/dashboard-orders`, …). The competitor evidence is unanimous that this is the wrong cut, and the vendor-panel use case is better solved by forking the app shell with reuse of `dashboard-ui`/`dashboard-core` than by feature imports. Revisit only if a real consumer hits the boundary.
+
+#### Package boundaries (the rules)
+
+The three rules below decide which package each file belongs to. Apply mechanically.
+
+**`@spree/dashboard-ui` — design system. Source-only (no build).**
+- **Headless rule**: components accept *all* their data via props. They never import providers, never call hooks, never touch the admin SDK. This is the rule that makes them reusable from outside `@spree/dashboard`.
+- Contents: `src/ui/` (shadcn primitives — Button, Input, Dialog, Sheet, Table, Calendar, …), `src/spree/` (Spree composed components — PageHeader, ResourceTable, AppSidebar, BulkActionBar, TopBar, …), `src/styles.css` (design tokens + Tailwind theme), `src/lib/` (`cn`, formatters, `form-errors`, `validation-messages`).
+- Source-only because Tailwind v4 scans source files in the consuming app for utility classes; a pre-compiled CSS bundle would miss classes only used here. The consuming app's Vite/Tailwind setup compiles dashboard-ui transparently.
+- Peer deps: `react`, `react-dom`.
+
+**`@spree/dashboard-core` — framework. The extension API surface.**
+- Contents: registries (`table-registry`, `nav-registry`, `slot-registry`, `settings-nav-registry`), providers (`AuthProvider`, `PermissionProvider`, `StoreProvider`, `ThemeProvider`), generic infra hooks (`use-auth`, `use-permissions`, `use-store`, `use-theme`, `use-resource-mutation`, `use-direct-upload`, `use-global-search`, `use-command-palette`, `use-copy-to-clipboard`, `use-scrolled`, plus the cross-cutting infra hooks like `use-countries`, `use-export`, `use-custom-fields`), the admin SDK client singleton (`client.ts`), generic lib (`filters-to-ransack`, `permissions`, `formatters`), and the `defineDashboardPlugin` facade (`/plugin` subpath).
+- Peer deps: `react`, `react-dom`, `@spree/dashboard-ui`. **Critical**: registries are module singletons. If a plugin bundles its own copy of `@spree/dashboard-core`, `registerSlot` writes to a different Map than `<Slot>` reads. Keep `@spree/dashboard-core` (and `react`, `react-dom`, `@spree/dashboard-ui`) as peer deps in every plugin package; pnpm dedupes to a single instance.
+
+**`@spree/dashboard` — the deployable app.**
+- Contents: routes (`src/routes/**`), resource hooks (`use-orders`, `use-products`, `use-customers`, `use-promotions`, `use-payment-methods`, …), Zod schemas (`src/schemas/`), table definitions (`src/tables/`), navigation config (`src/nav/`), locale strings (`src/locales/en.json`), `i18n.ts` bootstrap (it owns the locales), `App.tsx`, `main.tsx`, `index.html`, `vite.config.ts`.
+- Resource-specific compound components that depend on resource hooks (`bulk-price-editor/`, `promotion-editors/`, `price-list-editors/`, `products/`, `payment-method-editors/`, `custom-fields/`, `command-palette/`, `nav-main`) stay here until they're refactored to headless and moved to `dashboard-ui` (see Phase 3 of "Migration Path" below).
+- Depends on all three: `@spree/admin-sdk`, `@spree/dashboard-core`, `@spree/dashboard-ui`.
+
+#### Client injection: `import.meta.env` in dashboard-core
+
+The admin SDK client (`client.ts`) lives in `@spree/dashboard-core` and reads `import.meta.env.VITE_SPREE_API_URL`. This makes `@spree/dashboard-core` Vite-specific — acceptable because the dashboard SPA is Vite and plugin authors building dashboard plugins also use Vite. We considered provider-injecting the client via `useAdminClient()` for non-Vite consumers but rejected it: every hook would need refactoring, no real consumer exists for the abstraction, and we can switch to provider injection later without breaking plugin authors (the hook surface stays the same).
+
+#### Plugin authoring (target API, lands with Phase 2)
+
+```tsx
+import { defineDashboardPlugin } from '@spree/dashboard-core/plugin'
+import { Card, CardContent, CardHeader, CardTitle, Button } from '@spree/dashboard-ui'
+
+defineDashboardPlugin({
+ nav: [{ key: 'reports', label: 'Reports', url: '/reports', position: 50 }],
+ slots: {
+ 'product.form_sidebar': [{ id: 'my-widget', component: MyWidget, position: 50 }],
+ },
+ tables: [
+ { table: 'products', addColumn: { id: 'wishlist_count', header: 'Wishlists', accessorFn: (p) => p.wishlist_count } },
+ ],
+})
+```
+
+Custom admin apps (vendor panels, etc.) compose the packages directly: import `@spree/dashboard-ui` for the components, mount `@spree/dashboard-core`'s providers in their own app shell, and ship only the routes they want. No SDK abstraction to fight.
+
+#### Component coupling — the headless rule in detail
+
+The headless rule (`dashboard-ui` components accept everything via props) is the operationally-hardest part of the split. The inventory of `packages/dashboard/src/components/spree/` (54 files) breaks into three classes:
+
+| Class | Description | Examples | Target package |
+|---|---|---|---|
+| **A** — generic, zero coupling | Components that already only import `cn`, primitives, and pure helpers | `relative-time`, `back-button`, `drag-handle`, `country-flag`, `secret-input`, `data-grid/`, `metadata/`, `resource-combobox`, `resource-name-cell`, `resource-multi-autocomplete`, `route-error-boundary`, `tag-list`, `row-actions`, `row-click-bridge`, `bulk-dialog`, `calculator-summary`, `form-actions`, `storefront-visible-switch`, `color-picker`, `resource-layout` | `dashboard-ui` (move as-is) |
+| **B** — provider-coupled but data-agnostic | Components that import `usePermissions`, `useStore`, `useTheme`, `useAuth`, `useCopyToClipboard`, `useScrolled`, `useIsMobile`, or i18n hooks. Pure infra deps, no resource data. | `page-header`, `resource-table`, `app-sidebar`, `settings-sidebar`, `top-bar`, `bulk-action-bar`, `can`, `currency-select`, `locale-select`, `store-date-picker`, `store-switcher`, `theme-toggle`, `table-toolbar`, `json-preview-drawer`, `confirm-dialog`, `preferences-form`, `page-tabs`, `address-form-dialog`, `ui/sidebar`, `ui/sonner` | `dashboard-ui` (refactor to take provider data via props/render-props) |
+| **C** — resource-data-coupled | Components that import resource-specific hooks or schemas | `country-combobox` (uses `useCountries`), `country-state-fields`, `tag-combobox`, `export-button` (uses `useExport`), `nav-main`, `command-palette/`, `custom-fields/`, `bulk-price-editor/`, `payment-method-editors/`, `price-list-editors/`, `products/`, `promotion-editors/` | Component → `dashboard-ui` (refactor to take data via props). Hook → `dashboard-core` if it's infra (countries, export, custom fields, search, command palette) or `dashboard` if it's resource-specific (prices, products, promotions). |
+
+The headless refactor is per-component: change the component to accept data via props, update every callsite in `packages/dashboard/src/routes/**` to pass those props, then move the file to `dashboard-ui`. Each refactor is a small PR; see Phase 3 in "Migration Path" below.
+
+#### Phasing
+
+The split lands in four phases, each independently mergeable and each leaving the repo in a buildable state:
+
+- **Phase 0 (this PR)**: rename `packages/admin` → `packages/dashboard` and `@spree/admin` → `@spree/dashboard`. Create empty `@spree/dashboard-ui` and `@spree/dashboard-core` skeleton packages (package.json, tsconfig, biome.json, README, placeholder `src/index.ts`). Update CLAUDE.md, docs, and this plan. No semantic change to the app; just the foundation.
+- **Phase 1**: extract `@spree/dashboard-ui` with Class A compounds + primitives + tokens. Rewrite `@/components/ui/*` and Class A `@/components/spree/*` imports in `@spree/dashboard` to point at `@spree/dashboard-ui`. Plugin authors can now `import { Button, Card, ... } from '@spree/dashboard-ui'`.
+- **Phase 2**: extract `@spree/dashboard-core` with registries + providers + generic infra hooks + admin SDK client + `defineDashboardPlugin`. Move Class B compounds to `@spree/dashboard` (still importing providers, but now from `@spree/dashboard-core`); refactor + move to `dashboard-ui` happens in Phase 3. Plugin authors can now `import { registerSlot, defineDashboardPlugin, useAuth, ... } from '@spree/dashboard-core'`.
+- **Phase 3 (ongoing)**: headless-refactor each Class B and Class C compound, one PR at a time. For each component: refactor to accept data via props, update every callsite in routes, then move the file to `dashboard-ui`. Start with the most-reused: `<PageHeader>`, `<ResourceTable>`, `<AppSidebar>`.
+
+#### Open architectural follow-ups (deferred from Phase 0)
+
+- **Cross-cutting infra hooks**: `useCountries`, `useExport`, `useCustomFields`, `useGlobalSearch`, `useCommandPalette` are domain-flavored but cross-cutting — every plugin will need them. They move to `dashboard-core` in Phase 2. Strictly resource-specific hooks (`useOrders`, `useProducts`, `useCustomers`, `usePromotions`, `usePaymentMethods`, etc.) stay in `@spree/dashboard`.
+- **Slot ambient context**: today `<Slot>`'s ambient context (permissions, store, user) is a TODO. Wire it up via providers from `dashboard-core` during Phase 2.
+- **Locale resource injection**: `i18n.ts` initializes i18next with `en.json`. It stays in `@spree/dashboard` (which owns the locales). Components in `dashboard-ui`/`dashboard-core` that need translations call `useTranslation()` from `react-i18next` directly — the consuming app's `i18n.ts` side-effect import has already registered the resources.
+
### Tech stack
| Layer | Choice | Why |
@@ -269,7 +368,7 @@ The legacy Rails admin exposes ~80 named partial slots via `Spree.admin.partials
```tsx
// Plugin code (registered at app start)
-import { registerSlot } from '@spree/admin/slots'
+import { registerSlot } from '@spree/dashboard-core'
registerSlot('product_form_sidebar', {
id: 'vendor-info',
@@ -345,7 +444,7 @@ Mirror the `promotion.rule_form.<type>` / `promotion.action_form.<type>` pattern
- `payment_method.form.<type>` — replaces the generic `<PreferencesForm>` for that provider. Use when a gateway needs more than a key/value form (Stripe OAuth Connect, PayPal Onboarding, Adyen API-key wizard).
- `payment_method.actions.<type>` — footer actions (Test webhook, View webhook URL, Disconnect).
-All three receive `PaymentMethodEditorContext` from `packages/admin/src/components/spree/payment-method-editors/types.ts`: `{ mode: 'create' | 'edit', type, paymentMethod, preferenceSchema, preferences, onPreferencesChange, form }`. Spree core registers nothing by default — `<PreferencesForm>` is the generic fallback for `payment_method.form`.
+All three receive `PaymentMethodEditorContext` from `packages/dashboard/src/components/spree/payment-method-editors/types.ts`: `{ mode: 'create' | 'edit', type, paymentMethod, preferenceSchema, preferences, onPreferencesChange, form }`. Spree core registers nothing by default — `<PreferencesForm>` is the generic fallback for `payment_method.form`.
**Sub-nav (was `content_for(:page_tabs)` plus `_*_nav.html.erb`):**
- `nav.tax`, `nav.shipping`, `nav.stock`, `nav.returns_and_refunds`, `nav.team` — consumed by `<PageTabs>` on settings pages where these existed in Rails.
@@ -381,7 +480,7 @@ Render props give plugins more power but worse UX: they must understand the host
Admin SPA forms are **raw React Hook Form blocks** — `<Field>` / `<Input>` / `<Controller>` / `<FieldError>` written out per attribute — combined with two small utilities:
1. **`mapSpreeErrorsToForm(error, setError)`** translates 422 SpreeError responses into `form.setError(...)` calls (flat attribute keys onto fields, `:base` and nested keys onto `formState.errors.root`).
-2. **`useTranslation()` + `admin.fields.<resource>.<attribute>.{label,placeholder,help}` keys** in `packages/admin/src/locales/en.json` keep labels translatable.
+2. **`useTranslation()` + `admin.fields.<resource>.<attribute>.{label,placeholder,help}` keys** in `packages/dashboard/src/locales/en.json` keep labels translatable.
#### Why not a `<SpreeField>` / `<SpreeForm>` wrapper?
@@ -394,7 +493,7 @@ What survives the rollback: the i18n keys, `mapSpreeErrorsToForm`, and `useResou
#### Translation keys
```jsonc
-// packages/admin/src/locales/en.json
+// packages/dashboard/src/locales/en.json
{
"admin": {
"fields": {
@@ -462,7 +561,7 @@ Custom widgets (CurrencySelect, CountryCombobox, ResourceCombobox, TagCombobox,
#### Server error mapping
```ts
-// packages/admin/src/lib/form-errors.ts
+// packages/dashboard/src/lib/form-errors.ts
export function mapSpreeErrorsToForm<T>(error: unknown, setError: UseFormSetError<T>): boolean
```
@@ -525,8 +624,8 @@ The lightweight built-in mechanism (`Spree::Metafields` → `<CustomFieldsCard>`
```tsx
// src/index.tsx — imported once from the app's main.tsx
-import { registerSlot } from '@spree/admin/lib/slot-registry'
-import type { ProductFormSlotContext } from '@spree/admin/components/spree/products/slots'
+import { registerSlot } from '@spree/dashboard-core'
+import type { ProductFormSlotContext } from '@spree/dashboard/components/spree/products/slots'
import { WarehouseCard } from './warehouse-card'
registerSlot<ProductFormSlotContext>('product.form_sidebar', {
@@ -541,8 +640,8 @@ registerSlot<ProductFormSlotContext>('product.form_sidebar', {
import { Controller, type UseFormReturn } from 'react-hook-form'
import type { Product } from '@spree/admin-sdk'
import { useTranslation } from 'react-i18next'
-import { Card, CardContent, CardHeader, CardTitle } from '@spree/admin/components/ui/card'
-import { Field, FieldError, FieldLabel } from '@spree/admin/components/ui/field'
+import { Card, CardContent, CardHeader, CardTitle } from '@spree/dashboard-ui'
+import { Field, FieldError, FieldLabel } from '@spree/dashboard-ui'
interface Props {
form: UseFormReturn<{ preferred_warehouse_id?: string; [k: string]: unknown }>
@@ -582,7 +681,7 @@ The field's value flows through RHF, gets submitted alongside the host form's va
**What we ship in this plan (Phase 4):**
- `slots.ts` files for Product / Order / Customer / Promotion / Store / New Order
- `<Slot>` placements in each host page at the documented positions
-- Reference plugin example in `packages/admin/examples/` (a no-op "extra field" plugin so plugin authors have something to copy)
+- Reference plugin example in `packages/dashboard/examples/` (a no-op "extra field" plugin so plugin authors have something to copy)
**What we explicitly defer:**
- Schema augmentation helper (`useResolverWith`) — wait for a concrete plugin asking for it
@@ -663,7 +762,7 @@ Layered onto the existing `<ResourceTable>`.
### File structure
```
-packages/admin/
+packages/dashboard/
├── index.html
├── package.json
├── vite.config.ts
@@ -786,7 +885,7 @@ Build remaining resource pages on top of the chrome and Tier 3 form primitives (
### Phase 6 — drop Rails admin
- Remove `spree/admin` engine entirely
-- Update `create-spree-app` scaffolding to install `@spree/admin` by default
+- Update `create-spree-app` scaffolding to install `@spree/dashboard` by default
- Update docs
## Constraints on Current Work
diff --git a/docs/plans/6.0-inventory-operations.md b/docs/plans/6.0-inventory-operations.md
index ff3f89bae7..6841abbfe6 100644
--- a/docs/plans/6.0-inventory-operations.md
+++ b/docs/plans/6.0-inventory-operations.md
@@ -557,7 +557,7 @@ All other existing transfers (with a real source location) become `status: 'rece
- Current StockTransfer model: `spree/core/app/models/spree/stock_transfer.rb`
- Current StockTransfer admin controller: `spree/api/app/controllers/spree/api/v3/admin/stock_transfers_controller.rb`
-- Cheap-win route promotion: `packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx` (already top-level after the prep PR)
+- Cheap-win route promotion: `packages/dashboard/src/routes/_authenticated/$storeId/products/transfers.tsx` (already top-level after the prep PR)
- Depends on: `docs/plans/6.0-typed-stock-movements.md` (movement primitives)
- Depends on: `docs/plans/6.0-fulfillment-and-delivery.md` (Fulfillment writes `shipped`/`allocated`/`released` movements that show up alongside transfer/PO movements in the variant history)
- Related: `docs/plans/6.0-stock-reservations.md` (reservations are checkout-time holds, orthogonal to operational receives)
diff --git a/packages/README.md b/packages/README.md
index 8932f71748..b6cbb780c7 100644
--- a/packages/README.md
+++ b/packages/README.md
@@ -19,7 +19,9 @@ For monorepo-wide conventions (type generation pipeline, code style, testing) se
|---|---|---|---|
| [`sdk`](./sdk) | [`@spree/sdk`](https://www.npmjs.com/package/@spree/sdk) | **Stable** (1.x) | TypeScript client for the customer-facing **Store API v3**. |
| [`admin-sdk`](./admin-sdk) | [`@spree/admin-sdk`](https://www.npmjs.com/package/@spree/admin-sdk) | **Developer Preview** (0.x) | TypeScript client for the **Admin API**. Tracks Spree 6.0 development. |
-| [`admin`](./admin) | `@spree/admin` (not yet published) | **In Development** | React SPA admin dashboard for Spree 6.0. Will replace the legacy Rails `spree/admin` engine. Currently private in the workspace; will be published as `@spree/admin` once ready. |
+| [`dashboard`](./dashboard) | `@spree/dashboard` (not yet published) | **In Development** | React SPA admin dashboard for Spree 6.0. Will replace the legacy Rails `spree/admin` engine. Currently private in the workspace; will be published as `@spree/dashboard` once ready. |
+| [`dashboard-ui`](./dashboard-ui) | `@spree/dashboard-ui` (not yet published) | **In Development** | Design system for the dashboard — shadcn primitives, headless composed components, design tokens. Source-only; consumed by `@spree/dashboard` and downstream plugin authors. |
+| [`dashboard-core`](./dashboard-core) | `@spree/dashboard-core` (not yet published) | **In Development** | Dashboard framework — registries (table, nav, slot, settings-nav), providers, generic infra hooks, `defineDashboardPlugin`. The extension API surface. |
| [`sdk-core`](./sdk-core) | — | **Internal** | Shared HTTP/retry/error layer used by `@spree/sdk` and `@spree/admin-sdk`. Not published. |
| [`cli`](./cli) | [`@spree/cli`](https://www.npmjs.com/package/@spree/cli) | **Stable** (2.x) | Docker-based CLI for managing Spree projects scaffolded with `create-spree-app`. |
| [`create-spree-app`](./create-spree-app) | [`create-spree-app`](https://www.npmjs.com/package/create-spree-app) | **Stable** (1.x) | One-shot scaffolder: `npx create-spree-app my-store`. Sets up backend (Docker) + optional Next.js storefront. |
@@ -33,17 +35,23 @@ Includes auto-generated TypeScript types and Zod schemas derived from the Rails
### `@spree/admin-sdk` — Admin API client
-The back-office counterpart to `@spree/sdk`. Same patterns, but targets the Admin API and supports both **secret API key** (server-to-server, scope-based authorization) and **JWT** (admin user, CanCanCan-based authorization) auth modes. Used internally by the `@spree/admin` SPA and externally by integrations and admin tooling.
+The back-office counterpart to `@spree/sdk`. Same patterns, but targets the Admin API and supports both **secret API key** (server-to-server, scope-based authorization) and **JWT** (admin user, CanCanCan-based authorization) auth modes. Used internally by the `@spree/dashboard` SPA and externally by integrations and admin tooling.
This package is in **Developer Preview** alongside the Spree 6.0 Admin API. Expect breaking changes between minor versions until 1.0.
-### `@spree/admin` — React admin SPA
+### `@spree/dashboard`, `@spree/dashboard-core`, `@spree/dashboard-ui` — the admin dashboard stack
-The Spree 6.0 admin dashboard. Vite + TanStack Router (file-based) + TanStack Query + React Hook Form + shadcn/ui + Base UI + Tailwind. All data flows through `@spree/admin-sdk`; there are no direct backend calls.
+The Spree 6.0 admin is a three-package stack:
-Architecture, extension points (table registry, navigation registry, component injection), and migration plan are documented in [`docs/plans/6.0-admin-spa.md`](../docs/plans/6.0-admin-spa.md). Local setup instructions live in [`packages/admin/README.md`](./admin/README.md).
+- **`@spree/dashboard-ui`** — the design system. Shadcn primitives + headless composed components (PageHeader, ResourceTable, AppSidebar, …) + design tokens. **Headless rule:** components accept their data via props, never import providers or hooks. Source-only; the consuming Vite/Tailwind app compiles it. Pluggable into any React app, not just `@spree/dashboard`.
+- **`@spree/dashboard-core`** — the framework. The four registries (table, nav, slot, settings-nav), the four providers (auth, permission, store, theme), generic infra hooks (`use-auth`, `use-permissions`, `use-resource-mutation`, `use-direct-upload`, `use-global-search`, …), the admin SDK client singleton, and the `defineDashboardPlugin` extension facade. **This is what plugin authors import** to register navigation, slots, table columns, and routes.
+- **`@spree/dashboard`** — the deployable SPA. Routes, resource hooks (`use-orders`, `use-products`, `use-customers`, …), Zod schemas, locale strings, the app shell. Composes the other two. Built with Vite + TanStack Router (file-based) + TanStack Query + React Hook Form + Tailwind.
-The package is currently private in the workspace; it will be published to npm as `@spree/admin` alongside the Spree 6.0 release.
+Plugin authors install `@spree/dashboard-ui` + `@spree/dashboard-core` as peer dependencies. Vendor panels, white-label admins, and other custom variants compose the same packages with their own routes/shell.
+
+Architecture, extension points (table registry, navigation registry, component injection), the package boundary rules, and the phased migration are documented in [`docs/plans/6.0-admin-spa.md`](../docs/plans/6.0-admin-spa.md). Local setup for the SPA is in [`packages/dashboard/README.md`](./dashboard/README.md).
+
+All three packages are currently private in the workspace and ship together with the Spree 6.0 release.
### `@spree/sdk-core` — Shared internals
diff --git a/packages/admin-sdk/tsconfig.json b/packages/admin-sdk/tsconfig.json
index f5526adaef..7e1e5236f0 100644
--- a/packages/admin-sdk/tsconfig.json
+++ b/packages/admin-sdk/tsconfig.json
@@ -14,7 +14,6 @@
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
- "baseUrl": ".",
"paths": {
"@/types": ["./src/types/generated/index.ts"]
},
diff --git a/packages/dashboard-core/README.md b/packages/dashboard-core/README.md
new file mode 100644
index 0000000000..3b777a72d0
--- /dev/null
+++ b/packages/dashboard-core/README.md
@@ -0,0 +1,35 @@
+# @spree/dashboard-core
+
+Spree Dashboard framework. The extension API surface for plugin authors.
+
+> **Phase 0 placeholder.** The package is scaffolded with its target structure; the registries, providers, and hooks haven't been extracted yet. See `docs/plans/6.0-admin-spa.md` → "Package Split".
+
+## What goes here
+
+- **Registries** (`src/lib/*-registry.ts`): `table`, `nav`, `slot`, `settings-nav`. Module-singleton stores driven by `useSyncExternalStore`. The plugin extension surface.
+- **Providers** (`src/providers/`): `AuthProvider`, `PermissionProvider`, `StoreProvider`, `ThemeProvider`. Must be mounted by the consuming app shell.
+- **Generic infra hooks** (`src/hooks/`): `use-auth`, `use-permissions`, `use-store`, `use-theme`, `use-resource-mutation`, `use-direct-upload`, `use-global-search`, `use-command-palette`, `use-copy-to-clipboard`, `use-scrolled`, `use-mobile`. Plus the cross-cutting infrastructure-flavored hooks (`use-countries`, `use-export`, `use-custom-fields`).
+- **Admin SDK client** (`src/client.ts`): the Vite-aware `adminClient` singleton.
+- **`defineDashboardPlugin`** (`src/plugin.ts`): the facade plugin authors call.
+
+## Peer dependencies
+
+`react`, `react-dom`, and `@spree/dashboard-ui` are peer deps. **Critical**: the four registries are module singletons. If a plugin bundles its own copy of `@spree/dashboard-core`, `registerSlot` writes to a different Map than `<Slot>` reads — silent no-op. Always keep `@spree/dashboard-core` as a peer dep in every plugin package; pnpm dedupes to a single instance.
+
+## What's NOT here
+
+Resource-specific hooks (`use-orders`, `use-products`, `use-customers`, `use-promotions`, …), Zod schemas, feature pages, route definitions, and locale strings live in `@spree/dashboard` (the app). We do not publish feature internals — that's the same call Medusa, Vendure, and Saleor make.
+
+## Plugin authoring (post-Phase 2)
+
+```tsx
+import { defineDashboardPlugin } from '@spree/dashboard-core/plugin'
+import { PageHeader, Button } from '@spree/dashboard-ui'
+
+defineDashboardPlugin({
+ nav: [{ key: 'reports', label: 'Reports', url: '/reports', position: 50 }],
+ slots: {
+ 'product.form_sidebar': [{ id: 'my-widget', component: MyWidget }],
+ },
+})
+```
diff --git a/packages/dashboard-core/biome.json b/packages/dashboard-core/biome.json
new file mode 100644
index 0000000000..ccae8ce9b7
--- /dev/null
+++ b/packages/dashboard-core/biome.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "https://biomejs.dev/schemas/2.4.13/schema.json",
+ "root": false,
+ "extends": ["../../biome.json"],
+ "files": {
+ "includes": ["src/**", "!src/**/*.css"]
+ }
+}
diff --git a/packages/dashboard-core/package.json b/packages/dashboard-core/package.json
new file mode 100644
index 0000000000..e0ae3c7dc6
--- /dev/null
+++ b/packages/dashboard-core/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "@spree/dashboard-core",
+ "private": true,
+ "license": "MIT",
+ "version": "0.0.0",
+ "description": "Spree Dashboard framework — registries (table, nav, slot, settings-nav), providers (auth, permission, store, theme), generic infra hooks, and the defineDashboardPlugin extension API.",
+ "type": "module",
+ "main": "./src/index.ts",
+ "module": "./src/index.ts",
+ "types": "./src/index.ts",
+ "exports": {
+ ".": "./src/index.ts",
+ "./plugin": "./src/plugin.ts"
+ },
+ "files": [
+ "src",
+ "README.md"
+ ],
+ "scripts": {
+ "lint": "biome check src",
+ "lint:fix": "biome check --fix src",
+ "format": "biome format --write src",
+ "typecheck": "tsc --noEmit"
+ },
+ "peerDependencies": {
+ "@spree/dashboard-ui": "workspace:^",
+ "react": "^19.2.6",
+ "react-dom": "^19.2.6"
+ },
+ "devDependencies": {
+ "@types/react": "^19.2.14",
+ "@types/react-dom": "^19.2.3",
+ "typescript": "~6.0.3"
+ }
+}
diff --git a/packages/dashboard-core/src/index.ts b/packages/dashboard-core/src/index.ts
new file mode 100644
index 0000000000..ba409d7e30
--- /dev/null
+++ b/packages/dashboard-core/src/index.ts
@@ -0,0 +1,6 @@
+// @spree/dashboard-core — Spree Dashboard framework.
+//
+// Phase 0 placeholder. The registries, providers, generic hooks, and
+// defineDashboardPlugin facade land in Phase 2 (see
+// docs/plans/6.0-admin-spa.md "Package Split").
+export {}
diff --git a/packages/dashboard-core/src/plugin.ts b/packages/dashboard-core/src/plugin.ts
new file mode 100644
index 0000000000..b4910e9dcb
--- /dev/null
+++ b/packages/dashboard-core/src/plugin.ts
@@ -0,0 +1,6 @@
+// `@spree/dashboard-core/plugin` — the single import plugin authors use.
+//
+// Phase 0 placeholder; defineDashboardPlugin lands in Phase 2 (see
+// docs/plans/6.0-admin-spa.md "Package Split"). Until then plugin authors
+// register via the underlying registries directly (also kept stable).
+export {}
diff --git a/packages/dashboard-core/tsconfig.json b/packages/dashboard-core/tsconfig.json
new file mode 100644
index 0000000000..84dfa24a44
--- /dev/null
+++ b/packages/dashboard-core/tsconfig.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "ignoreDeprecations": "6.0",
+ "useDefineForClassFields": true,
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "module": "ESNext",
+ "skipLibCheck": true,
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "moduleDetection": "force",
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "erasableSyntaxOnly": true,
+ "noFallthroughCasesInSwitch": true,
+ "noUncheckedSideEffectImports": true,
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "include": ["src"]
+}
diff --git a/packages/dashboard-ui/README.md b/packages/dashboard-ui/README.md
new file mode 100644
index 0000000000..0dea1c459e
--- /dev/null
+++ b/packages/dashboard-ui/README.md
@@ -0,0 +1,26 @@
+# @spree/dashboard-ui
+
+Spree Dashboard design system. Shadcn primitives + headless composed components + design tokens.
+
+> **Phase 0 placeholder.** The package is scaffolded with its target structure, but the components haven't been extracted yet. See `docs/plans/6.0-admin-spa.md` → "Package Split" for the phased plan.
+
+## What goes here
+
+- `src/ui/` — shadcn primitives (Button, Input, Dialog, Sheet, Table, …). Copy-paste owned: fork into your own project as needed.
+- `src/spree/` — composed components built on the primitives (PageHeader, ResourceTable, AppSidebar, …). **All headless: data and callbacks come in via props.** No provider imports, no hook calls, no SDK access.
+- `src/styles.css` — design tokens + Tailwind theme. Import once from your Vite app.
+- `src/lib/` — generic helpers (`cn`, formatters, …).
+
+The headless rule is what makes the components composable from outside `@spree/dashboard` — a plugin author, an app developer building a vendor panel, or a third-party using just `@spree/dashboard-ui` can all instantiate the same components with their own data sources.
+
+## Source-only package
+
+This package ships **TypeScript source**, not a compiled bundle. Consumers compile it through their own Vite + Tailwind setup. This is required because Tailwind v4 scans source files in the consuming app for utility classes; a pre-compiled CSS bundle would miss classes only used by source-imported components.
+
+## Peer dependencies
+
+`react` and `react-dom` are peer deps. The consumer provides them.
+
+## What's NOT here
+
+Anything that needs a provider (auth, store, theme), a TanStack Query hook, or the Admin SDK lives in `@spree/dashboard-core`. The split is: **dashboard-ui is the design system, dashboard-core is the framework**.
diff --git a/packages/dashboard-ui/biome.json b/packages/dashboard-ui/biome.json
new file mode 100644
index 0000000000..dc0b587744
--- /dev/null
+++ b/packages/dashboard-ui/biome.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://biomejs.dev/schemas/2.4.13/schema.json",
+ "root": false,
+ "extends": ["../../biome.json"],
+ "files": {
+ "includes": ["src/**", "!src/**/*.css"]
+ },
+ "overrides": [
+ {
+ "includes": ["src/ui/**"],
+ "linter": { "enabled": false }
+ }
+ ]
+}
diff --git a/packages/dashboard-ui/package.json b/packages/dashboard-ui/package.json
new file mode 100644
index 0000000000..f79f9ec217
--- /dev/null
+++ b/packages/dashboard-ui/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "@spree/dashboard-ui",
+ "private": true,
+ "license": "MIT",
+ "version": "0.0.0",
+ "description": "Spree Dashboard design system — shadcn primitives, composed components, and design tokens. Source-only package; consumers compile via their own Vite/Tailwind setup.",
+ "type": "module",
+ "main": "./src/index.ts",
+ "module": "./src/index.ts",
+ "types": "./src/index.ts",
+ "exports": {
+ ".": "./src/index.ts",
+ "./styles.css": "./src/styles.css"
+ },
+ "files": [
+ "src",
+ "README.md"
+ ],
+ "scripts": {
+ "lint": "biome check src",
+ "lint:fix": "biome check --fix src",
+ "format": "biome format --write src",
+ "typecheck": "tsc --noEmit"
+ },
+ "peerDependencies": {
+ "react": "^19.2.6",
+ "react-dom": "^19.2.6"
+ },
+ "devDependencies": {
+ "@types/react": "^19.2.14",
+ "@types/react-dom": "^19.2.3",
+ "typescript": "~6.0.3"
+ }
+}
diff --git a/packages/dashboard-ui/src/index.ts b/packages/dashboard-ui/src/index.ts
new file mode 100644
index 0000000000..829c782345
--- /dev/null
+++ b/packages/dashboard-ui/src/index.ts
@@ -0,0 +1,5 @@
+// @spree/dashboard-ui — Spree Dashboard design system.
+//
+// Phase 0 placeholder. The actual primitives + headless composed components
+// land in Phase 1 (see docs/plans/6.0-admin-spa.md "Package Split").
+export {}
diff --git a/packages/dashboard-ui/tsconfig.json b/packages/dashboard-ui/tsconfig.json
new file mode 100644
index 0000000000..84dfa24a44
--- /dev/null
+++ b/packages/dashboard-ui/tsconfig.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "ignoreDeprecations": "6.0",
+ "useDefineForClassFields": true,
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "module": "ESNext",
+ "skipLibCheck": true,
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "moduleDetection": "force",
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "erasableSyntaxOnly": true,
+ "noFallthroughCasesInSwitch": true,
+ "noUncheckedSideEffectImports": true,
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "include": ["src"]
+}
diff --git a/packages/admin/.gitignore b/packages/dashboard/.gitignore
similarity index 100%
rename from packages/admin/.gitignore
rename to packages/dashboard/.gitignore
diff --git a/packages/admin/LICENSE b/packages/dashboard/LICENSE
similarity index 100%
rename from packages/admin/LICENSE
rename to packages/dashboard/LICENSE
diff --git a/packages/admin/README.md b/packages/dashboard/README.md
similarity index 97%
rename from packages/admin/README.md
rename to packages/dashboard/README.md
index 4296f25ac7..7701d7c38f 100644
--- a/packages/admin/README.md
+++ b/packages/dashboard/README.md
@@ -1,7 +1,9 @@
-# @spree/admin
+# @spree/dashboard
The Spree Commerce admin dashboard — a React single-page application that replaces the legacy Rails `spree/admin` engine entirely. Built on the [Admin API](https://spreecommerce.org/docs/api-reference/admin-api/introduction) via `@spree/admin-sdk`, with a modern extension model (table registry, navigation registry, component injection) for plugin authors.
+Part of the three-package dashboard stack — see [`packages/README.md`](../README.md) for how `@spree/dashboard`, `@spree/dashboard-ui`, and `@spree/dashboard-core` fit together.
+
> **Developer Preview.** The Admin SPA is in active development for Spree 6.0. Some routes still fall back to the Rails admin while feature parity is being reached. See [`docs/plans/6.0-admin-spa.md`](../../docs/plans/6.0-admin-spa.md) for the current scope.
## Tech stack
@@ -29,7 +31,7 @@ pnpm server:setup # one-time: clones spree-starter into ./server
pnpm server:dev # runs Rails on http://localhost:3000
# 2. In a separate terminal, run the admin dev server
-cd packages/admin
+cd packages/dashboard
pnpm dev # http://localhost:5173
```
@@ -190,7 +192,7 @@ bundle install
bundle exec rake test_app
# From this package, install Playwright's Chromium once per machine.
-cd ../../packages/admin
+cd ../../packages/dashboard
pnpm test:e2e:install
```
diff --git a/packages/admin/biome.json b/packages/dashboard/biome.json
similarity index 100%
rename from packages/admin/biome.json
rename to packages/dashboard/biome.json
diff --git a/packages/admin/components.json b/packages/dashboard/components.json
similarity index 100%
rename from packages/admin/components.json
rename to packages/dashboard/components.json
diff --git a/packages/admin/e2e/allowed-origins.spec.ts b/packages/dashboard/e2e/allowed-origins.spec.ts
similarity index 100%
rename from packages/admin/e2e/allowed-origins.spec.ts
rename to packages/dashboard/e2e/allowed-origins.spec.ts
diff --git a/packages/admin/e2e/auth.spec.ts b/packages/dashboard/e2e/auth.spec.ts
similarity index 100%
rename from packages/admin/e2e/auth.spec.ts
rename to packages/dashboard/e2e/auth.spec.ts
diff --git a/packages/admin/e2e/custom-field-definitions.spec.ts b/packages/dashboard/e2e/custom-field-definitions.spec.ts
similarity index 100%
rename from packages/admin/e2e/custom-field-definitions.spec.ts
rename to packages/dashboard/e2e/custom-field-definitions.spec.ts
diff --git a/packages/admin/e2e/customer-groups.spec.ts b/packages/dashboard/e2e/customer-groups.spec.ts
similarity index 100%
rename from packages/admin/e2e/customer-groups.spec.ts
rename to packages/dashboard/e2e/customer-groups.spec.ts
diff --git a/packages/admin/e2e/customers.spec.ts b/packages/dashboard/e2e/customers.spec.ts
similarity index 100%
rename from packages/admin/e2e/customers.spec.ts
rename to packages/dashboard/e2e/customers.spec.ts
diff --git a/packages/admin/e2e/gift-cards.spec.ts b/packages/dashboard/e2e/gift-cards.spec.ts
similarity index 100%
rename from packages/admin/e2e/gift-cards.spec.ts
rename to packages/dashboard/e2e/gift-cards.spec.ts
diff --git a/packages/admin/e2e/global-setup.ts b/packages/dashboard/e2e/global-setup.ts
similarity index 100%
rename from packages/admin/e2e/global-setup.ts
rename to packages/dashboard/e2e/global-setup.ts
diff --git a/packages/admin/e2e/global-teardown.ts b/packages/dashboard/e2e/global-teardown.ts
similarity index 100%
rename from packages/admin/e2e/global-teardown.ts
rename to packages/dashboard/e2e/global-teardown.ts
diff --git a/packages/admin/e2e/helpers.ts b/packages/dashboard/e2e/helpers.ts
similarity index 100%
rename from packages/admin/e2e/helpers.ts
rename to packages/dashboard/e2e/helpers.ts
diff --git a/packages/admin/e2e/invitation-acceptance.spec.ts b/packages/dashboard/e2e/invitation-acceptance.spec.ts
similarity index 100%
rename from packages/admin/e2e/invitation-acceptance.spec.ts
rename to packages/dashboard/e2e/invitation-acceptance.spec.ts
diff --git a/packages/admin/e2e/markets.spec.ts b/packages/dashboard/e2e/markets.spec.ts
similarity index 100%
rename from packages/admin/e2e/markets.spec.ts
rename to packages/dashboard/e2e/markets.spec.ts
diff --git a/packages/admin/e2e/option-types.spec.ts b/packages/dashboard/e2e/option-types.spec.ts
similarity index 100%
rename from packages/admin/e2e/option-types.spec.ts
rename to packages/dashboard/e2e/option-types.spec.ts
diff --git a/packages/admin/e2e/paths.ts b/packages/dashboard/e2e/paths.ts
similarity index 100%
rename from packages/admin/e2e/paths.ts
rename to packages/dashboard/e2e/paths.ts
diff --git a/packages/admin/e2e/payment-methods.spec.ts b/packages/dashboard/e2e/payment-methods.spec.ts
similarity index 100%
rename from packages/admin/e2e/payment-methods.spec.ts
rename to packages/dashboard/e2e/payment-methods.spec.ts
diff --git a/packages/admin/e2e/price-lists.spec.ts b/packages/dashboard/e2e/price-lists.spec.ts
similarity index 100%
rename from packages/admin/e2e/price-lists.spec.ts
rename to packages/dashboard/e2e/price-lists.spec.ts
diff --git a/packages/admin/e2e/products-bulk.spec.ts b/packages/dashboard/e2e/products-bulk.spec.ts
similarity index 100%
rename from packages/admin/e2e/products-bulk.spec.ts
rename to packages/dashboard/e2e/products-bulk.spec.ts
diff --git a/packages/admin/e2e/promotions.spec.ts b/packages/dashboard/e2e/promotions.spec.ts
similarity index 100%
rename from packages/admin/e2e/promotions.spec.ts
rename to packages/dashboard/e2e/promotions.spec.ts
diff --git a/packages/admin/e2e/stock-locations.spec.ts b/packages/dashboard/e2e/stock-locations.spec.ts
similarity index 100%
rename from packages/admin/e2e/stock-locations.spec.ts
rename to packages/dashboard/e2e/stock-locations.spec.ts
diff --git a/packages/admin/e2e/stock-transfers.spec.ts b/packages/dashboard/e2e/stock-transfers.spec.ts
similarity index 100%
rename from packages/admin/e2e/stock-transfers.spec.ts
rename to packages/dashboard/e2e/stock-transfers.spec.ts
diff --git a/packages/admin/e2e/tax-categories.spec.ts b/packages/dashboard/e2e/tax-categories.spec.ts
similarity index 100%
rename from packages/admin/e2e/tax-categories.spec.ts
rename to packages/dashboard/e2e/tax-categories.spec.ts
diff --git a/packages/admin/index.html b/packages/dashboard/index.html
similarity index 100%
rename from packages/admin/index.html
rename to packages/dashboard/index.html
diff --git a/packages/admin/package.json b/packages/dashboard/package.json
similarity index 98%
rename from packages/admin/package.json
rename to packages/dashboard/package.json
index 126443f2d9..7c206c83a1 100644
--- a/packages/admin/package.json
+++ b/packages/dashboard/package.json
@@ -1,5 +1,5 @@
{
- "name": "@spree/admin",
+ "name": "@spree/dashboard",
"private": true,
"license": "MIT",
"version": "0.0.0",
diff --git a/packages/admin/playwright.config.ts b/packages/dashboard/playwright.config.ts
similarity index 100%
rename from packages/admin/playwright.config.ts
rename to packages/dashboard/playwright.config.ts
diff --git a/packages/admin/src/client.ts b/packages/dashboard/src/client.ts
similarity index 100%
rename from packages/admin/src/client.ts
rename to packages/dashboard/src/client.ts
diff --git a/packages/admin/src/components/spree/address-block.tsx b/packages/dashboard/src/components/spree/address-block.tsx
similarity index 100%
rename from packages/admin/src/components/spree/address-block.tsx
rename to packages/dashboard/src/components/spree/address-block.tsx
diff --git a/packages/admin/src/components/spree/address-form-dialog.tsx b/packages/dashboard/src/components/spree/address-form-dialog.tsx
similarity index 100%
rename from packages/admin/src/components/spree/address-form-dialog.tsx
rename to packages/dashboard/src/components/spree/address-form-dialog.tsx
diff --git a/packages/admin/src/components/spree/app-sidebar.tsx b/packages/dashboard/src/components/spree/app-sidebar.tsx
similarity index 100%
rename from packages/admin/src/components/spree/app-sidebar.tsx
rename to packages/dashboard/src/components/spree/app-sidebar.tsx
diff --git a/packages/admin/src/components/spree/back-button.tsx b/packages/dashboard/src/components/spree/back-button.tsx
similarity index 100%
rename from packages/admin/src/components/spree/back-button.tsx
rename to packages/dashboard/src/components/spree/back-button.tsx
diff --git a/packages/admin/src/components/spree/bulk-action-bar.tsx b/packages/dashboard/src/components/spree/bulk-action-bar.tsx
similarity index 100%
rename from packages/admin/src/components/spree/bulk-action-bar.tsx
rename to packages/dashboard/src/components/spree/bulk-action-bar.tsx
diff --git a/packages/admin/src/components/spree/bulk-dialog.tsx b/packages/dashboard/src/components/spree/bulk-dialog.tsx
similarity index 100%
rename from packages/admin/src/components/spree/bulk-dialog.tsx
rename to packages/dashboard/src/components/spree/bulk-dialog.tsx
diff --git a/packages/admin/src/components/spree/bulk-price-editor/bulk-price-editor-dialog.tsx b/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor-dialog.tsx
similarity index 100%
rename from packages/admin/src/components/spree/bulk-price-editor/bulk-price-editor-dialog.tsx
rename to packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor-dialog.tsx
diff --git a/packages/admin/src/components/spree/bulk-price-editor/bulk-price-editor.tsx b/packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsx
similarity index 100%
rename from packages/admin/src/components/spree/bulk-price-editor/bulk-price-editor.tsx
rename to packages/dashboard/src/components/spree/bulk-price-editor/bulk-price-editor.tsx
diff --git a/packages/admin/src/components/spree/calculator-summary.tsx b/packages/dashboard/src/components/spree/calculator-summary.tsx
similarity index 100%
rename from packages/admin/src/components/spree/calculator-summary.tsx
rename to packages/dashboard/src/components/spree/calculator-summary.tsx
diff --git a/packages/admin/src/components/spree/can.tsx b/packages/dashboard/src/components/spree/can.tsx
similarity index 100%
rename from packages/admin/src/components/spree/can.tsx
rename to packages/dashboard/src/components/spree/can.tsx
diff --git a/packages/admin/src/components/spree/color-picker.tsx b/packages/dashboard/src/components/spree/color-picker.tsx
similarity index 100%
rename from packages/admin/src/components/spree/color-picker.tsx
rename to packages/dashboard/src/components/spree/color-picker.tsx
diff --git a/packages/admin/src/components/spree/command-palette/command-palette.tsx b/packages/dashboard/src/components/spree/command-palette/command-palette.tsx
similarity index 100%
rename from packages/admin/src/components/spree/command-palette/command-palette.tsx
rename to packages/dashboard/src/components/spree/command-palette/command-palette.tsx
diff --git a/packages/admin/src/components/spree/confirm-dialog.tsx b/packages/dashboard/src/components/spree/confirm-dialog.tsx
similarity index 100%
rename from packages/admin/src/components/spree/confirm-dialog.tsx
rename to packages/dashboard/src/components/spree/confirm-dialog.tsx
diff --git a/packages/admin/src/components/spree/country-combobox.tsx b/packages/dashboard/src/components/spree/country-combobox.tsx
similarity index 100%
rename from packages/admin/src/components/spree/country-combobox.tsx
rename to packages/dashboard/src/components/spree/country-combobox.tsx
diff --git a/packages/admin/src/components/spree/country-flag.tsx b/packages/dashboard/src/components/spree/country-flag.tsx
similarity index 100%
rename from packages/admin/src/components/spree/country-flag.tsx
rename to packages/dashboard/src/components/spree/country-flag.tsx
diff --git a/packages/admin/src/components/spree/country-state-fields.tsx b/packages/dashboard/src/components/spree/country-state-fields.tsx
similarity index 100%
rename from packages/admin/src/components/spree/country-state-fields.tsx
rename to packages/dashboard/src/components/spree/country-state-fields.tsx
diff --git a/packages/admin/src/components/spree/currency-select.tsx b/packages/dashboard/src/components/spree/currency-select.tsx
similarity index 100%
rename from packages/admin/src/components/spree/currency-select.tsx
rename to packages/dashboard/src/components/spree/currency-select.tsx
diff --git a/packages/admin/src/components/spree/custom-fields/custom-fields-card.tsx b/packages/dashboard/src/components/spree/custom-fields/custom-fields-card.tsx
similarity index 100%
rename from packages/admin/src/components/spree/custom-fields/custom-fields-card.tsx
rename to packages/dashboard/src/components/spree/custom-fields/custom-fields-card.tsx
diff --git a/packages/admin/src/components/spree/custom-fields/custom-fields-drawer.tsx b/packages/dashboard/src/components/spree/custom-fields/custom-fields-drawer.tsx
similarity index 100%
rename from packages/admin/src/components/spree/custom-fields/custom-fields-drawer.tsx
rename to packages/dashboard/src/components/spree/custom-fields/custom-fields-drawer.tsx
diff --git a/packages/admin/src/components/spree/custom-fields/definition-form.tsx b/packages/dashboard/src/components/spree/custom-fields/definition-form.tsx
similarity index 100%
rename from packages/admin/src/components/spree/custom-fields/definition-form.tsx
rename to packages/dashboard/src/components/spree/custom-fields/definition-form.tsx
diff --git a/packages/admin/src/components/spree/custom-fields/value-input.tsx b/packages/dashboard/src/components/spree/custom-fields/value-input.tsx
similarity index 100%
rename from packages/admin/src/components/spree/custom-fields/value-input.tsx
rename to packages/dashboard/src/components/spree/custom-fields/value-input.tsx
diff --git a/packages/admin/src/components/spree/data-grid/cells.tsx b/packages/dashboard/src/components/spree/data-grid/cells.tsx
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/cells.tsx
rename to packages/dashboard/src/components/spree/data-grid/cells.tsx
diff --git a/packages/admin/src/components/spree/data-grid/context.ts b/packages/dashboard/src/components/spree/data-grid/context.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/context.ts
rename to packages/dashboard/src/components/spree/data-grid/context.ts
diff --git a/packages/admin/src/components/spree/data-grid/data-grid.tsx b/packages/dashboard/src/components/spree/data-grid/data-grid.tsx
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/data-grid.tsx
rename to packages/dashboard/src/components/spree/data-grid/data-grid.tsx
diff --git a/packages/admin/src/components/spree/data-grid/fill-handle.tsx b/packages/dashboard/src/components/spree/data-grid/fill-handle.tsx
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/fill-handle.tsx
rename to packages/dashboard/src/components/spree/data-grid/fill-handle.tsx
diff --git a/packages/admin/src/components/spree/data-grid/helpers.ts b/packages/dashboard/src/components/spree/data-grid/helpers.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/helpers.ts
rename to packages/dashboard/src/components/spree/data-grid/helpers.ts
diff --git a/packages/admin/src/components/spree/data-grid/index.ts b/packages/dashboard/src/components/spree/data-grid/index.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/index.ts
rename to packages/dashboard/src/components/spree/data-grid/index.ts
diff --git a/packages/admin/src/components/spree/data-grid/types.ts b/packages/dashboard/src/components/spree/data-grid/types.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/types.ts
rename to packages/dashboard/src/components/spree/data-grid/types.ts
diff --git a/packages/admin/src/components/spree/data-grid/use-data-grid-keyboard.ts b/packages/dashboard/src/components/spree/data-grid/use-data-grid-keyboard.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/use-data-grid-keyboard.ts
rename to packages/dashboard/src/components/spree/data-grid/use-data-grid-keyboard.ts
diff --git a/packages/admin/src/components/spree/data-grid/use-stable-cell-registration.ts b/packages/dashboard/src/components/spree/data-grid/use-stable-cell-registration.ts
similarity index 100%
rename from packages/admin/src/components/spree/data-grid/use-stable-cell-registration.ts
rename to packages/dashboard/src/components/spree/data-grid/use-stable-cell-registration.ts
diff --git a/packages/admin/src/components/spree/drag-handle.tsx b/packages/dashboard/src/components/spree/drag-handle.tsx
similarity index 100%
rename from packages/admin/src/components/spree/drag-handle.tsx
rename to packages/dashboard/src/components/spree/drag-handle.tsx
diff --git a/packages/admin/src/components/spree/export-button.tsx b/packages/dashboard/src/components/spree/export-button.tsx
similarity index 100%
rename from packages/admin/src/components/spree/export-button.tsx
rename to packages/dashboard/src/components/spree/export-button.tsx
diff --git a/packages/admin/src/components/spree/form-actions.tsx b/packages/dashboard/src/components/spree/form-actions.tsx
similarity index 100%
rename from packages/admin/src/components/spree/form-actions.tsx
rename to packages/dashboard/src/components/spree/form-actions.tsx
diff --git a/packages/admin/src/components/spree/json-preview-drawer.tsx b/packages/dashboard/src/components/spree/json-preview-drawer.tsx
similarity index 100%
rename from packages/admin/src/components/spree/json-preview-drawer.tsx
rename to packages/dashboard/src/components/spree/json-preview-drawer.tsx
diff --git a/packages/admin/src/components/spree/locale-select.tsx b/packages/dashboard/src/components/spree/locale-select.tsx
similarity index 100%
rename from packages/admin/src/components/spree/locale-select.tsx
rename to packages/dashboard/src/components/spree/locale-select.tsx
diff --git a/packages/admin/src/components/spree/metadata/metadata-card.tsx b/packages/dashboard/src/components/spree/metadata/metadata-card.tsx
similarity index 100%
rename from packages/admin/src/components/spree/metadata/metadata-card.tsx
rename to packages/dashboard/src/components/spree/metadata/metadata-card.tsx
diff --git a/packages/admin/src/components/spree/nav-main.tsx b/packages/dashboard/src/components/spree/nav-main.tsx
similarity index 100%
rename from packages/admin/src/components/spree/nav-main.tsx
rename to packages/dashboard/src/components/spree/nav-main.tsx
diff --git a/packages/admin/src/components/spree/page-header.tsx b/packages/dashboard/src/components/spree/page-header.tsx
similarity index 100%
rename from packages/admin/src/components/spree/page-header.tsx
rename to packages/dashboard/src/components/spree/page-header.tsx
diff --git a/packages/admin/src/components/spree/page-tabs.tsx b/packages/dashboard/src/components/spree/page-tabs.tsx
similarity index 100%
rename from packages/admin/src/components/spree/page-tabs.tsx
rename to packages/dashboard/src/components/spree/page-tabs.tsx
diff --git a/packages/admin/src/components/spree/payment-method-editors/payment-method-form.tsx b/packages/dashboard/src/components/spree/payment-method-editors/payment-method-form.tsx
similarity index 100%
rename from packages/admin/src/components/spree/payment-method-editors/payment-method-form.tsx
rename to packages/dashboard/src/components/spree/payment-method-editors/payment-method-form.tsx
diff --git a/packages/admin/src/components/spree/payment-method-editors/types.ts b/packages/dashboard/src/components/spree/payment-method-editors/types.ts
similarity index 100%
rename from packages/admin/src/components/spree/payment-method-editors/types.ts
rename to packages/dashboard/src/components/spree/payment-method-editors/types.ts
diff --git a/packages/admin/src/components/spree/preferences-form.tsx b/packages/dashboard/src/components/spree/preferences-form.tsx
similarity index 100%
rename from packages/admin/src/components/spree/preferences-form.tsx
rename to packages/dashboard/src/components/spree/preferences-form.tsx
diff --git a/packages/admin/src/components/spree/price-list-editors/price-list-form.tsx b/packages/dashboard/src/components/spree/price-list-editors/price-list-form.tsx
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/price-list-form.tsx
rename to packages/dashboard/src/components/spree/price-list-editors/price-list-form.tsx
diff --git a/packages/admin/src/components/spree/price-list-editors/register.ts b/packages/dashboard/src/components/spree/price-list-editors/register.ts
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/register.ts
rename to packages/dashboard/src/components/spree/price-list-editors/register.ts
diff --git a/packages/admin/src/components/spree/price-list-editors/rule-customer-group.tsx b/packages/dashboard/src/components/spree/price-list-editors/rule-customer-group.tsx
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/rule-customer-group.tsx
rename to packages/dashboard/src/components/spree/price-list-editors/rule-customer-group.tsx
diff --git a/packages/admin/src/components/spree/price-list-editors/rule-customer.tsx b/packages/dashboard/src/components/spree/price-list-editors/rule-customer.tsx
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/rule-customer.tsx
rename to packages/dashboard/src/components/spree/price-list-editors/rule-customer.tsx
diff --git a/packages/admin/src/components/spree/price-list-editors/status-badge.tsx b/packages/dashboard/src/components/spree/price-list-editors/status-badge.tsx
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/status-badge.tsx
rename to packages/dashboard/src/components/spree/price-list-editors/status-badge.tsx
diff --git a/packages/admin/src/components/spree/price-list-editors/types.ts b/packages/dashboard/src/components/spree/price-list-editors/types.ts
similarity index 100%
rename from packages/admin/src/components/spree/price-list-editors/types.ts
rename to packages/dashboard/src/components/spree/price-list-editors/types.ts
diff --git a/packages/admin/src/components/spree/products/inventory-section.tsx b/packages/dashboard/src/components/spree/products/inventory-section.tsx
similarity index 100%
rename from packages/admin/src/components/spree/products/inventory-section.tsx
rename to packages/dashboard/src/components/spree/products/inventory-section.tsx
diff --git a/packages/admin/src/components/spree/products/media-edit-sheet.tsx b/packages/dashboard/src/components/spree/products/media-edit-sheet.tsx
similarity index 100%
rename from packages/admin/src/components/spree/products/media-edit-sheet.tsx
rename to packages/dashboard/src/components/spree/products/media-edit-sheet.tsx
diff --git a/packages/admin/src/components/spree/products/variant-media-picker.tsx b/packages/dashboard/src/components/spree/products/variant-media-picker.tsx
similarity index 100%
rename from packages/admin/src/components/spree/products/variant-media-picker.tsx
rename to packages/dashboard/src/components/spree/products/variant-media-picker.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/action-adjustment.tsx b/packages/dashboard/src/components/spree/promotion-editors/action-adjustment.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/action-adjustment.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/action-adjustment.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/editor-shell.tsx b/packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/editor-shell.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/editor-shell.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/match-policy-picker.tsx b/packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/match-policy-picker.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/match-policy-picker.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/promotion-form.tsx b/packages/dashboard/src/components/spree/promotion-editors/promotion-form.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/promotion-form.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/promotion-form.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/register.ts b/packages/dashboard/src/components/spree/promotion-editors/register.ts
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/register.ts
rename to packages/dashboard/src/components/spree/promotion-editors/register.ts
diff --git a/packages/admin/src/components/spree/promotion-editors/rule-category.tsx b/packages/dashboard/src/components/spree/promotion-editors/rule-category.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/rule-category.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/rule-category.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/rule-country.tsx b/packages/dashboard/src/components/spree/promotion-editors/rule-country.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/rule-country.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/rule-country.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/rule-customer-group.tsx b/packages/dashboard/src/components/spree/promotion-editors/rule-customer-group.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/rule-customer-group.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/rule-customer-group.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/rule-product.tsx b/packages/dashboard/src/components/spree/promotion-editors/rule-product.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/rule-product.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/rule-product.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/rule-user.tsx b/packages/dashboard/src/components/spree/promotion-editors/rule-user.tsx
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/rule-user.tsx
rename to packages/dashboard/src/components/spree/promotion-editors/rule-user.tsx
diff --git a/packages/admin/src/components/spree/promotion-editors/types.ts b/packages/dashboard/src/components/spree/promotion-editors/types.ts
similarity index 100%
rename from packages/admin/src/components/spree/promotion-editors/types.ts
rename to packages/dashboard/src/components/spree/promotion-editors/types.ts
diff --git a/packages/admin/src/components/spree/relative-time.tsx b/packages/dashboard/src/components/spree/relative-time.tsx
similarity index 100%
rename from packages/admin/src/components/spree/relative-time.tsx
rename to packages/dashboard/src/components/spree/relative-time.tsx
diff --git a/packages/admin/src/components/spree/resource-combobox.tsx b/packages/dashboard/src/components/spree/resource-combobox.tsx
similarity index 100%
rename from packages/admin/src/components/spree/resource-combobox.tsx
rename to packages/dashboard/src/components/spree/resource-combobox.tsx
diff --git a/packages/admin/src/components/spree/resource-layout.tsx b/packages/dashboard/src/components/spree/resource-layout.tsx
similarity index 100%
rename from packages/admin/src/components/spree/resource-layout.tsx
rename to packages/dashboard/src/components/spree/resource-layout.tsx
diff --git a/packages/admin/src/components/spree/resource-multi-autocomplete.tsx b/packages/dashboard/src/components/spree/resource-multi-autocomplete.tsx
similarity index 100%
rename from packages/admin/src/components/spree/resource-multi-autocomplete.tsx
rename to packages/dashboard/src/components/spree/resource-multi-autocomplete.tsx
diff --git a/packages/admin/src/components/spree/resource-name-cell.tsx b/packages/dashboard/src/components/spree/resource-name-cell.tsx
similarity index 100%
rename from packages/admin/src/components/spree/resource-name-cell.tsx
rename to packages/dashboard/src/components/spree/resource-name-cell.tsx
diff --git a/packages/admin/src/components/spree/resource-table.tsx b/packages/dashboard/src/components/spree/resource-table.tsx
similarity index 100%
rename from packages/admin/src/components/spree/resource-table.tsx
rename to packages/dashboard/src/components/spree/resource-table.tsx
diff --git a/packages/admin/src/components/spree/route-error-boundary.tsx b/packages/dashboard/src/components/spree/route-error-boundary.tsx
similarity index 100%
rename from packages/admin/src/components/spree/route-error-boundary.tsx
rename to packages/dashboard/src/components/spree/route-error-boundary.tsx
diff --git a/packages/admin/src/components/spree/row-actions.tsx b/packages/dashboard/src/components/spree/row-actions.tsx
similarity index 100%
rename from packages/admin/src/components/spree/row-actions.tsx
rename to packages/dashboard/src/components/spree/row-actions.tsx
diff --git a/packages/admin/src/components/spree/row-click-bridge.tsx b/packages/dashboard/src/components/spree/row-click-bridge.tsx
similarity index 100%
rename from packages/admin/src/components/spree/row-click-bridge.tsx
rename to packages/dashboard/src/components/spree/row-click-bridge.tsx
diff --git a/packages/admin/src/components/spree/secret-input.tsx b/packages/dashboard/src/components/spree/secret-input.tsx
similarity index 100%
rename from packages/admin/src/components/spree/secret-input.tsx
rename to packages/dashboard/src/components/spree/secret-input.tsx
diff --git a/packages/admin/src/components/spree/settings-sidebar.tsx b/packages/dashboard/src/components/spree/settings-sidebar.tsx
similarity index 100%
rename from packages/admin/src/components/spree/settings-sidebar.tsx
rename to packages/dashboard/src/components/spree/settings-sidebar.tsx
diff --git a/packages/admin/src/components/spree/slot.tsx b/packages/dashboard/src/components/spree/slot.tsx
similarity index 100%
rename from packages/admin/src/components/spree/slot.tsx
rename to packages/dashboard/src/components/spree/slot.tsx
diff --git a/packages/admin/src/components/spree/store-date-picker.tsx b/packages/dashboard/src/components/spree/store-date-picker.tsx
similarity index 100%
rename from packages/admin/src/components/spree/store-date-picker.tsx
rename to packages/dashboard/src/components/spree/store-date-picker.tsx
diff --git a/packages/admin/src/components/spree/store-switcher.tsx b/packages/dashboard/src/components/spree/store-switcher.tsx
similarity index 100%
rename from packages/admin/src/components/spree/store-switcher.tsx
rename to packages/dashboard/src/components/spree/store-switcher.tsx
diff --git a/packages/admin/src/components/spree/storefront-visible-switch.tsx b/packages/dashboard/src/components/spree/storefront-visible-switch.tsx
similarity index 100%
rename from packages/admin/src/components/spree/storefront-visible-switch.tsx
rename to packages/dashboard/src/components/spree/storefront-visible-switch.tsx
diff --git a/packages/admin/src/components/spree/table-toolbar.tsx b/packages/dashboard/src/components/spree/table-toolbar.tsx
similarity index 100%
rename from packages/admin/src/components/spree/table-toolbar.tsx
rename to packages/dashboard/src/components/spree/table-toolbar.tsx
diff --git a/packages/admin/src/components/spree/tag-combobox.tsx b/packages/dashboard/src/components/spree/tag-combobox.tsx
similarity index 100%
rename from packages/admin/src/components/spree/tag-combobox.tsx
rename to packages/dashboard/src/components/spree/tag-combobox.tsx
diff --git a/packages/admin/src/components/spree/tag-list.tsx b/packages/dashboard/src/components/spree/tag-list.tsx
similarity index 100%
rename from packages/admin/src/components/spree/tag-list.tsx
rename to packages/dashboard/src/components/spree/tag-list.tsx
diff --git a/packages/admin/src/components/spree/theme-toggle.tsx b/packages/dashboard/src/components/spree/theme-toggle.tsx
similarity index 100%
rename from packages/admin/src/components/spree/theme-toggle.tsx
rename to packages/dashboard/src/components/spree/theme-toggle.tsx
diff --git a/packages/admin/src/components/spree/top-bar.tsx b/packages/dashboard/src/components/spree/top-bar.tsx
similarity index 100%
rename from packages/admin/src/components/spree/top-bar.tsx
rename to packages/dashboard/src/components/spree/top-bar.tsx
diff --git a/packages/admin/src/components/ui/avatar.tsx b/packages/dashboard/src/components/ui/avatar.tsx
similarity index 100%
rename from packages/admin/src/components/ui/avatar.tsx
rename to packages/dashboard/src/components/ui/avatar.tsx
diff --git a/packages/admin/src/components/ui/badge.tsx b/packages/dashboard/src/components/ui/badge.tsx
similarity index 100%
rename from packages/admin/src/components/ui/badge.tsx
rename to packages/dashboard/src/components/ui/badge.tsx
diff --git a/packages/admin/src/components/ui/breadcrumb.tsx b/packages/dashboard/src/components/ui/breadcrumb.tsx
similarity index 100%
rename from packages/admin/src/components/ui/breadcrumb.tsx
rename to packages/dashboard/src/components/ui/breadcrumb.tsx
diff --git a/packages/admin/src/components/ui/button.tsx b/packages/dashboard/src/components/ui/button.tsx
similarity index 100%
rename from packages/admin/src/components/ui/button.tsx
rename to packages/dashboard/src/components/ui/button.tsx
diff --git a/packages/admin/src/components/ui/calendar.tsx b/packages/dashboard/src/components/ui/calendar.tsx
similarity index 100%
rename from packages/admin/src/components/ui/calendar.tsx
rename to packages/dashboard/src/components/ui/calendar.tsx
diff --git a/packages/admin/src/components/ui/card.tsx b/packages/dashboard/src/components/ui/card.tsx
similarity index 100%
rename from packages/admin/src/components/ui/card.tsx
rename to packages/dashboard/src/components/ui/card.tsx
diff --git a/packages/admin/src/components/ui/chart.tsx b/packages/dashboard/src/components/ui/chart.tsx
similarity index 100%
rename from packages/admin/src/components/ui/chart.tsx
rename to packages/dashboard/src/components/ui/chart.tsx
diff --git a/packages/admin/src/components/ui/checkbox.tsx b/packages/dashboard/src/components/ui/checkbox.tsx
similarity index 100%
rename from packages/admin/src/components/ui/checkbox.tsx
rename to packages/dashboard/src/components/ui/checkbox.tsx
diff --git a/packages/admin/src/components/ui/collapsible.tsx b/packages/dashboard/src/components/ui/collapsible.tsx
similarity index 100%
rename from packages/admin/src/components/ui/collapsible.tsx
rename to packages/dashboard/src/components/ui/collapsible.tsx
diff --git a/packages/admin/src/components/ui/combobox.tsx b/packages/dashboard/src/components/ui/combobox.tsx
similarity index 100%
rename from packages/admin/src/components/ui/combobox.tsx
rename to packages/dashboard/src/components/ui/combobox.tsx
diff --git a/packages/admin/src/components/ui/command.tsx b/packages/dashboard/src/components/ui/command.tsx
similarity index 100%
rename from packages/admin/src/components/ui/command.tsx
rename to packages/dashboard/src/components/ui/command.tsx
diff --git a/packages/admin/src/components/ui/data-table.tsx b/packages/dashboard/src/components/ui/data-table.tsx
similarity index 100%
rename from packages/admin/src/components/ui/data-table.tsx
rename to packages/dashboard/src/components/ui/data-table.tsx
diff --git a/packages/admin/src/components/ui/date-picker.tsx b/packages/dashboard/src/components/ui/date-picker.tsx
similarity index 100%
rename from packages/admin/src/components/ui/date-picker.tsx
rename to packages/dashboard/src/components/ui/date-picker.tsx
diff --git a/packages/admin/src/components/ui/date-range-picker.tsx b/packages/dashboard/src/components/ui/date-range-picker.tsx
similarity index 100%
rename from packages/admin/src/components/ui/date-range-picker.tsx
rename to packages/dashboard/src/components/ui/date-range-picker.tsx
diff --git a/packages/admin/src/components/ui/dialog.tsx b/packages/dashboard/src/components/ui/dialog.tsx
similarity index 100%
rename from packages/admin/src/components/ui/dialog.tsx
rename to packages/dashboard/src/components/ui/dialog.tsx
diff --git a/packages/admin/src/components/ui/dropdown-menu.tsx b/packages/dashboard/src/components/ui/dropdown-menu.tsx
similarity index 100%
rename from packages/admin/src/components/ui/dropdown-menu.tsx
rename to packages/dashboard/src/components/ui/dropdown-menu.tsx
diff --git a/packages/admin/src/components/ui/empty.tsx b/packages/dashboard/src/components/ui/empty.tsx
similarity index 100%
rename from packages/admin/src/components/ui/empty.tsx
rename to packages/dashboard/src/components/ui/empty.tsx
diff --git a/packages/admin/src/components/ui/field.tsx b/packages/dashboard/src/components/ui/field.tsx
similarity index 100%
rename from packages/admin/src/components/ui/field.tsx
rename to packages/dashboard/src/components/ui/field.tsx
diff --git a/packages/admin/src/components/ui/input-group.tsx b/packages/dashboard/src/components/ui/input-group.tsx
similarity index 100%
rename from packages/admin/src/components/ui/input-group.tsx
rename to packages/dashboard/src/components/ui/input-group.tsx
diff --git a/packages/admin/src/components/ui/input.tsx b/packages/dashboard/src/components/ui/input.tsx
similarity index 100%
rename from packages/admin/src/components/ui/input.tsx
rename to packages/dashboard/src/components/ui/input.tsx
diff --git a/packages/admin/src/components/ui/label.tsx b/packages/dashboard/src/components/ui/label.tsx
similarity index 100%
rename from packages/admin/src/components/ui/label.tsx
rename to packages/dashboard/src/components/ui/label.tsx
diff --git a/packages/admin/src/components/ui/pagination.tsx b/packages/dashboard/src/components/ui/pagination.tsx
similarity index 100%
rename from packages/admin/src/components/ui/pagination.tsx
rename to packages/dashboard/src/components/ui/pagination.tsx
diff --git a/packages/admin/src/components/ui/popover.tsx b/packages/dashboard/src/components/ui/popover.tsx
similarity index 100%
rename from packages/admin/src/components/ui/popover.tsx
rename to packages/dashboard/src/components/ui/popover.tsx
diff --git a/packages/admin/src/components/ui/radio-group.tsx b/packages/dashboard/src/components/ui/radio-group.tsx
similarity index 100%
rename from packages/admin/src/components/ui/radio-group.tsx
rename to packages/dashboard/src/components/ui/radio-group.tsx
diff --git a/packages/admin/src/components/ui/rich-text-editor.tsx b/packages/dashboard/src/components/ui/rich-text-editor.tsx
similarity index 100%
rename from packages/admin/src/components/ui/rich-text-editor.tsx
rename to packages/dashboard/src/components/ui/rich-text-editor.tsx
diff --git a/packages/admin/src/components/ui/select.tsx b/packages/dashboard/src/components/ui/select.tsx
similarity index 100%
rename from packages/admin/src/components/ui/select.tsx
rename to packages/dashboard/src/components/ui/select.tsx
diff --git a/packages/admin/src/components/ui/separator.tsx b/packages/dashboard/src/components/ui/separator.tsx
similarity index 100%
rename from packages/admin/src/components/ui/separator.tsx
rename to packages/dashboard/src/components/ui/separator.tsx
diff --git a/packages/admin/src/components/ui/sheet.tsx b/packages/dashboard/src/components/ui/sheet.tsx
similarity index 100%
rename from packages/admin/src/components/ui/sheet.tsx
rename to packages/dashboard/src/components/ui/sheet.tsx
diff --git a/packages/admin/src/components/ui/sidebar.tsx b/packages/dashboard/src/components/ui/sidebar.tsx
similarity index 100%
rename from packages/admin/src/components/ui/sidebar.tsx
rename to packages/dashboard/src/components/ui/sidebar.tsx
diff --git a/packages/admin/src/components/ui/skeleton.tsx b/packages/dashboard/src/components/ui/skeleton.tsx
similarity index 100%
rename from packages/admin/src/components/ui/skeleton.tsx
rename to packages/dashboard/src/components/ui/skeleton.tsx
diff --git a/packages/admin/src/components/ui/slot.tsx b/packages/dashboard/src/components/ui/slot.tsx
similarity index 100%
rename from packages/admin/src/components/ui/slot.tsx
rename to packages/dashboard/src/components/ui/slot.tsx
diff --git a/packages/admin/src/components/ui/sonner.tsx b/packages/dashboard/src/components/ui/sonner.tsx
similarity index 100%
rename from packages/admin/src/components/ui/sonner.tsx
rename to packages/dashboard/src/components/ui/sonner.tsx
diff --git a/packages/admin/src/components/ui/switch.tsx b/packages/dashboard/src/components/ui/switch.tsx
similarity index 100%
rename from packages/admin/src/components/ui/switch.tsx
rename to packages/dashboard/src/components/ui/switch.tsx
diff --git a/packages/admin/src/components/ui/textarea.tsx b/packages/dashboard/src/components/ui/textarea.tsx
similarity index 100%
rename from packages/admin/src/components/ui/textarea.tsx
rename to packages/dashboard/src/components/ui/textarea.tsx
diff --git a/packages/admin/src/components/ui/tooltip.tsx b/packages/dashboard/src/components/ui/tooltip.tsx
similarity index 100%
rename from packages/admin/src/components/ui/tooltip.tsx
rename to packages/dashboard/src/components/ui/tooltip.tsx
diff --git a/packages/admin/src/hooks/use-admin-users.ts b/packages/dashboard/src/hooks/use-admin-users.ts
similarity index 100%
rename from packages/admin/src/hooks/use-admin-users.ts
rename to packages/dashboard/src/hooks/use-admin-users.ts
diff --git a/packages/admin/src/hooks/use-allowed-origins.ts b/packages/dashboard/src/hooks/use-allowed-origins.ts
similarity index 100%
rename from packages/admin/src/hooks/use-allowed-origins.ts
rename to packages/dashboard/src/hooks/use-allowed-origins.ts
diff --git a/packages/admin/src/hooks/use-api-keys.ts b/packages/dashboard/src/hooks/use-api-keys.ts
similarity index 100%
rename from packages/admin/src/hooks/use-api-keys.ts
rename to packages/dashboard/src/hooks/use-api-keys.ts
diff --git a/packages/admin/src/hooks/use-auth.ts b/packages/dashboard/src/hooks/use-auth.ts
similarity index 100%
rename from packages/admin/src/hooks/use-auth.ts
rename to packages/dashboard/src/hooks/use-auth.ts
diff --git a/packages/admin/src/hooks/use-categories.ts b/packages/dashboard/src/hooks/use-categories.ts
similarity index 100%
rename from packages/admin/src/hooks/use-categories.ts
rename to packages/dashboard/src/hooks/use-categories.ts
diff --git a/packages/admin/src/hooks/use-command-palette.tsx b/packages/dashboard/src/hooks/use-command-palette.tsx
similarity index 100%
rename from packages/admin/src/hooks/use-command-palette.tsx
rename to packages/dashboard/src/hooks/use-command-palette.tsx
diff --git a/packages/admin/src/hooks/use-copy-to-clipboard.ts b/packages/dashboard/src/hooks/use-copy-to-clipboard.ts
similarity index 100%
rename from packages/admin/src/hooks/use-copy-to-clipboard.ts
rename to packages/dashboard/src/hooks/use-copy-to-clipboard.ts
diff --git a/packages/admin/src/hooks/use-countries.ts b/packages/dashboard/src/hooks/use-countries.ts
similarity index 100%
rename from packages/admin/src/hooks/use-countries.ts
rename to packages/dashboard/src/hooks/use-countries.ts
diff --git a/packages/admin/src/hooks/use-custom-fields.ts b/packages/dashboard/src/hooks/use-custom-fields.ts
similarity index 100%
rename from packages/admin/src/hooks/use-custom-fields.ts
rename to packages/dashboard/src/hooks/use-custom-fields.ts
diff --git a/packages/admin/src/hooks/use-customer-groups.ts b/packages/dashboard/src/hooks/use-customer-groups.ts
similarity index 100%
rename from packages/admin/src/hooks/use-customer-groups.ts
rename to packages/dashboard/src/hooks/use-customer-groups.ts
diff --git a/packages/admin/src/hooks/use-customer-store-credits.ts b/packages/dashboard/src/hooks/use-customer-store-credits.ts
similarity index 100%
rename from packages/admin/src/hooks/use-customer-store-credits.ts
rename to packages/dashboard/src/hooks/use-customer-store-credits.ts
diff --git a/packages/admin/src/hooks/use-customers.ts b/packages/dashboard/src/hooks/use-customers.ts
similarity index 100%
rename from packages/admin/src/hooks/use-customers.ts
rename to packages/dashboard/src/hooks/use-customers.ts
diff --git a/packages/admin/src/hooks/use-direct-upload.ts b/packages/dashboard/src/hooks/use-direct-upload.ts
similarity index 100%
rename from packages/admin/src/hooks/use-direct-upload.ts
rename to packages/dashboard/src/hooks/use-direct-upload.ts
diff --git a/packages/admin/src/hooks/use-export.ts b/packages/dashboard/src/hooks/use-export.ts
similarity index 100%
rename from packages/admin/src/hooks/use-export.ts
rename to packages/dashboard/src/hooks/use-export.ts
diff --git a/packages/admin/src/hooks/use-gift-cards.ts b/packages/dashboard/src/hooks/use-gift-cards.ts
similarity index 100%
rename from packages/admin/src/hooks/use-gift-cards.ts
rename to packages/dashboard/src/hooks/use-gift-cards.ts
diff --git a/packages/admin/src/hooks/use-global-search.ts b/packages/dashboard/src/hooks/use-global-search.ts
similarity index 100%
rename from packages/admin/src/hooks/use-global-search.ts
rename to packages/dashboard/src/hooks/use-global-search.ts
diff --git a/packages/admin/src/hooks/use-markets.ts b/packages/dashboard/src/hooks/use-markets.ts
similarity index 100%
rename from packages/admin/src/hooks/use-markets.ts
rename to packages/dashboard/src/hooks/use-markets.ts
diff --git a/packages/admin/src/hooks/use-mobile.ts b/packages/dashboard/src/hooks/use-mobile.ts
similarity index 100%
rename from packages/admin/src/hooks/use-mobile.ts
rename to packages/dashboard/src/hooks/use-mobile.ts
diff --git a/packages/admin/src/hooks/use-option-types.ts b/packages/dashboard/src/hooks/use-option-types.ts
similarity index 100%
rename from packages/admin/src/hooks/use-option-types.ts
rename to packages/dashboard/src/hooks/use-option-types.ts
diff --git a/packages/admin/src/hooks/use-order.ts b/packages/dashboard/src/hooks/use-order.ts
similarity index 100%
rename from packages/admin/src/hooks/use-order.ts
rename to packages/dashboard/src/hooks/use-order.ts
diff --git a/packages/admin/src/hooks/use-payment-methods.ts b/packages/dashboard/src/hooks/use-payment-methods.ts
similarity index 100%
rename from packages/admin/src/hooks/use-payment-methods.ts
rename to packages/dashboard/src/hooks/use-payment-methods.ts
diff --git a/packages/admin/src/hooks/use-price-lists.ts b/packages/dashboard/src/hooks/use-price-lists.ts
similarity index 100%
rename from packages/admin/src/hooks/use-price-lists.ts
rename to packages/dashboard/src/hooks/use-price-lists.ts
diff --git a/packages/admin/src/hooks/use-prices.ts b/packages/dashboard/src/hooks/use-prices.ts
similarity index 100%
rename from packages/admin/src/hooks/use-prices.ts
rename to packages/dashboard/src/hooks/use-prices.ts
diff --git a/packages/admin/src/hooks/use-product-media.ts b/packages/dashboard/src/hooks/use-product-media.ts
similarity index 100%
rename from packages/admin/src/hooks/use-product-media.ts
rename to packages/dashboard/src/hooks/use-product-media.ts
diff --git a/packages/admin/src/hooks/use-product.ts b/packages/dashboard/src/hooks/use-product.ts
similarity index 100%
rename from packages/admin/src/hooks/use-product.ts
rename to packages/dashboard/src/hooks/use-product.ts
diff --git a/packages/admin/src/hooks/use-products.ts b/packages/dashboard/src/hooks/use-products.ts
similarity index 100%
rename from packages/admin/src/hooks/use-products.ts
rename to packages/dashboard/src/hooks/use-products.ts
diff --git a/packages/admin/src/hooks/use-promotions.ts b/packages/dashboard/src/hooks/use-promotions.ts
similarity index 100%
rename from packages/admin/src/hooks/use-promotions.ts
rename to packages/dashboard/src/hooks/use-promotions.ts
diff --git a/packages/admin/src/hooks/use-resource-mutation.ts b/packages/dashboard/src/hooks/use-resource-mutation.ts
similarity index 100%
rename from packages/admin/src/hooks/use-resource-mutation.ts
rename to packages/dashboard/src/hooks/use-resource-mutation.ts
diff --git a/packages/admin/src/hooks/use-scrolled.ts b/packages/dashboard/src/hooks/use-scrolled.ts
similarity index 100%
rename from packages/admin/src/hooks/use-scrolled.ts
rename to packages/dashboard/src/hooks/use-scrolled.ts
diff --git a/packages/admin/src/hooks/use-staff.ts b/packages/dashboard/src/hooks/use-staff.ts
similarity index 100%
rename from packages/admin/src/hooks/use-staff.ts
rename to packages/dashboard/src/hooks/use-staff.ts
diff --git a/packages/admin/src/hooks/use-stock-items.ts b/packages/dashboard/src/hooks/use-stock-items.ts
similarity index 100%
rename from packages/admin/src/hooks/use-stock-items.ts
rename to packages/dashboard/src/hooks/use-stock-items.ts
diff --git a/packages/admin/src/hooks/use-stock-locations.ts b/packages/dashboard/src/hooks/use-stock-locations.ts
similarity index 100%
rename from packages/admin/src/hooks/use-stock-locations.ts
rename to packages/dashboard/src/hooks/use-stock-locations.ts
diff --git a/packages/admin/src/hooks/use-stock-transfers.ts b/packages/dashboard/src/hooks/use-stock-transfers.ts
similarity index 100%
rename from packages/admin/src/hooks/use-stock-transfers.ts
rename to packages/dashboard/src/hooks/use-stock-transfers.ts
diff --git a/packages/admin/src/hooks/use-store-credit-categories.ts b/packages/dashboard/src/hooks/use-store-credit-categories.ts
similarity index 100%
rename from packages/admin/src/hooks/use-store-credit-categories.ts
rename to packages/dashboard/src/hooks/use-store-credit-categories.ts
diff --git a/packages/admin/src/hooks/use-store-settings.ts b/packages/dashboard/src/hooks/use-store-settings.ts
similarity index 100%
rename from packages/admin/src/hooks/use-store-settings.ts
rename to packages/dashboard/src/hooks/use-store-settings.ts
diff --git a/packages/admin/src/hooks/use-tax-categories.ts b/packages/dashboard/src/hooks/use-tax-categories.ts
similarity index 100%
rename from packages/admin/src/hooks/use-tax-categories.ts
rename to packages/dashboard/src/hooks/use-tax-categories.ts
diff --git a/packages/admin/src/hooks/use-variant-media.ts b/packages/dashboard/src/hooks/use-variant-media.ts
similarity index 100%
rename from packages/admin/src/hooks/use-variant-media.ts
rename to packages/dashboard/src/hooks/use-variant-media.ts
diff --git a/packages/admin/src/index.css b/packages/dashboard/src/index.css
similarity index 100%
rename from packages/admin/src/index.css
rename to packages/dashboard/src/index.css
diff --git a/packages/admin/src/lib/filters-to-ransack.ts b/packages/dashboard/src/lib/filters-to-ransack.ts
similarity index 100%
rename from packages/admin/src/lib/filters-to-ransack.ts
rename to packages/dashboard/src/lib/filters-to-ransack.ts
diff --git a/packages/admin/src/lib/form-errors.ts b/packages/dashboard/src/lib/form-errors.ts
similarity index 100%
rename from packages/admin/src/lib/form-errors.ts
rename to packages/dashboard/src/lib/form-errors.ts
diff --git a/packages/admin/src/lib/form-mappers.ts b/packages/dashboard/src/lib/form-mappers.ts
similarity index 100%
rename from packages/admin/src/lib/form-mappers.ts
rename to packages/dashboard/src/lib/form-mappers.ts
diff --git a/packages/admin/src/lib/formatters.ts b/packages/dashboard/src/lib/formatters.ts
similarity index 100%
rename from packages/admin/src/lib/formatters.ts
rename to packages/dashboard/src/lib/formatters.ts
diff --git a/packages/admin/src/lib/i18n.ts b/packages/dashboard/src/lib/i18n.ts
similarity index 100%
rename from packages/admin/src/lib/i18n.ts
rename to packages/dashboard/src/lib/i18n.ts
diff --git a/packages/admin/src/lib/nav-registry.ts b/packages/dashboard/src/lib/nav-registry.ts
similarity index 100%
rename from packages/admin/src/lib/nav-registry.ts
rename to packages/dashboard/src/lib/nav-registry.ts
diff --git a/packages/admin/src/lib/permissions.ts b/packages/dashboard/src/lib/permissions.ts
similarity index 100%
rename from packages/admin/src/lib/permissions.ts
rename to packages/dashboard/src/lib/permissions.ts
diff --git a/packages/admin/src/lib/query-client.ts b/packages/dashboard/src/lib/query-client.ts
similarity index 100%
rename from packages/admin/src/lib/query-client.ts
rename to packages/dashboard/src/lib/query-client.ts
diff --git a/packages/admin/src/lib/settings-nav-registry.ts b/packages/dashboard/src/lib/settings-nav-registry.ts
similarity index 100%
rename from packages/admin/src/lib/settings-nav-registry.ts
rename to packages/dashboard/src/lib/settings-nav-registry.ts
diff --git a/packages/admin/src/lib/slot-registry.ts b/packages/dashboard/src/lib/slot-registry.ts
similarity index 100%
rename from packages/admin/src/lib/slot-registry.ts
rename to packages/dashboard/src/lib/slot-registry.ts
diff --git a/packages/admin/src/lib/table-registry.ts b/packages/dashboard/src/lib/table-registry.ts
similarity index 100%
rename from packages/admin/src/lib/table-registry.ts
rename to packages/dashboard/src/lib/table-registry.ts
diff --git a/packages/admin/src/lib/utils.ts b/packages/dashboard/src/lib/utils.ts
similarity index 100%
rename from packages/admin/src/lib/utils.ts
rename to packages/dashboard/src/lib/utils.ts
diff --git a/packages/admin/src/lib/validation-messages.ts b/packages/dashboard/src/lib/validation-messages.ts
similarity index 100%
rename from packages/admin/src/lib/validation-messages.ts
rename to packages/dashboard/src/lib/validation-messages.ts
diff --git a/packages/admin/src/locales/en.json b/packages/dashboard/src/locales/en.json
similarity index 100%
rename from packages/admin/src/locales/en.json
rename to packages/dashboard/src/locales/en.json
diff --git a/packages/admin/src/main.tsx b/packages/dashboard/src/main.tsx
similarity index 100%
rename from packages/admin/src/main.tsx
rename to packages/dashboard/src/main.tsx
diff --git a/packages/admin/src/nav/default.ts b/packages/dashboard/src/nav/default.ts
similarity index 100%
rename from packages/admin/src/nav/default.ts
rename to packages/dashboard/src/nav/default.ts
diff --git a/packages/admin/src/nav/settings.ts b/packages/dashboard/src/nav/settings.ts
similarity index 100%
rename from packages/admin/src/nav/settings.ts
rename to packages/dashboard/src/nav/settings.ts
diff --git a/packages/admin/src/providers/auth-provider.tsx b/packages/dashboard/src/providers/auth-provider.tsx
similarity index 100%
rename from packages/admin/src/providers/auth-provider.tsx
rename to packages/dashboard/src/providers/auth-provider.tsx
diff --git a/packages/admin/src/providers/permission-provider.tsx b/packages/dashboard/src/providers/permission-provider.tsx
similarity index 100%
rename from packages/admin/src/providers/permission-provider.tsx
rename to packages/dashboard/src/providers/permission-provider.tsx
diff --git a/packages/admin/src/providers/store-provider.tsx b/packages/dashboard/src/providers/store-provider.tsx
similarity index 100%
rename from packages/admin/src/providers/store-provider.tsx
rename to packages/dashboard/src/providers/store-provider.tsx
diff --git a/packages/admin/src/providers/theme-provider.tsx b/packages/dashboard/src/providers/theme-provider.tsx
similarity index 100%
rename from packages/admin/src/providers/theme-provider.tsx
rename to packages/dashboard/src/providers/theme-provider.tsx
diff --git a/packages/admin/src/routeTree.gen.ts b/packages/dashboard/src/routeTree.gen.ts
similarity index 100%
rename from packages/admin/src/routeTree.gen.ts
rename to packages/dashboard/src/routeTree.gen.ts
diff --git a/packages/admin/src/router.tsx b/packages/dashboard/src/router.tsx
similarity index 100%
rename from packages/admin/src/router.tsx
rename to packages/dashboard/src/router.tsx
diff --git a/packages/admin/src/routes/__root.tsx b/packages/dashboard/src/routes/__root.tsx
similarity index 100%
rename from packages/admin/src/routes/__root.tsx
rename to packages/dashboard/src/routes/__root.tsx
diff --git a/packages/admin/src/routes/_authenticated.tsx b/packages/dashboard/src/routes/_authenticated.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated.tsx
rename to packages/dashboard/src/routes/_authenticated.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/customers/$customerId.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/customers/$customerId.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/customers/groups.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/customers/groups.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/customers/groups.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/customers/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/customers/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/orders/$orderId.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/drafts.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/orders/drafts.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/orders/drafts.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/orders/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/orders/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/$productId.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/options.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/options.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/options.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/options.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/price-lists/$priceListId/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/$priceListId/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/price-lists/$priceListId/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/$priceListId/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/price-lists/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/price-lists/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/price-lists/new.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/new.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/price-lists/new.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/price-lists/new.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/products/transfers.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/products/transfers.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/products/transfers.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/promotions/$promotionId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/promotions/$promotionId.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/promotions/$promotionId.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/promotions/$promotionId.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/promotions/gift-cards.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/promotions/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/promotions/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/promotions/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/promotions/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/promotions/new.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/promotions/new.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/promotions/new.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/promotions/new.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/allowed-origins.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/allowed-origins.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/allowed-origins.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/allowed-origins.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/api-keys.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/api-keys.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/api-keys.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/custom-field-definitions.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/custom-field-definitions.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/custom-field-definitions.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/custom-field-definitions.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/index.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/index.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/index.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/markets.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/markets.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/markets.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/markets.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/payment-methods.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/payment-methods.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/payment-methods.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/staff.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/staff.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/stock-locations.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/stock-locations.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/store.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/store.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/store.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/store.tsx
diff --git a/packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/settings/tax-categories.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/$storeId/settings/tax-categories.tsx
rename to packages/dashboard/src/routes/_authenticated/$storeId/settings/tax-categories.tsx
diff --git a/packages/admin/src/routes/_authenticated/index.tsx b/packages/dashboard/src/routes/_authenticated/index.tsx
similarity index 100%
rename from packages/admin/src/routes/_authenticated/index.tsx
rename to packages/dashboard/src/routes/_authenticated/index.tsx
diff --git a/packages/admin/src/routes/accept-invitation.$invitationId.tsx b/packages/dashboard/src/routes/accept-invitation.$invitationId.tsx
similarity index 100%
rename from packages/admin/src/routes/accept-invitation.$invitationId.tsx
rename to packages/dashboard/src/routes/accept-invitation.$invitationId.tsx
diff --git a/packages/admin/src/routes/login.tsx b/packages/dashboard/src/routes/login.tsx
similarity index 100%
rename from packages/admin/src/routes/login.tsx
rename to packages/dashboard/src/routes/login.tsx
diff --git a/packages/admin/src/schemas/auth.ts b/packages/dashboard/src/schemas/auth.ts
similarity index 100%
rename from packages/admin/src/schemas/auth.ts
rename to packages/dashboard/src/schemas/auth.ts
diff --git a/packages/admin/src/schemas/custom-field-definition.ts b/packages/dashboard/src/schemas/custom-field-definition.ts
similarity index 100%
rename from packages/admin/src/schemas/custom-field-definition.ts
rename to packages/dashboard/src/schemas/custom-field-definition.ts
diff --git a/packages/admin/src/schemas/customer-group.ts b/packages/dashboard/src/schemas/customer-group.ts
similarity index 100%
rename from packages/admin/src/schemas/customer-group.ts
rename to packages/dashboard/src/schemas/customer-group.ts
diff --git a/packages/admin/src/schemas/customer.ts b/packages/dashboard/src/schemas/customer.ts
similarity index 100%
rename from packages/admin/src/schemas/customer.ts
rename to packages/dashboard/src/schemas/customer.ts
diff --git a/packages/admin/src/schemas/gift-card.ts b/packages/dashboard/src/schemas/gift-card.ts
similarity index 100%
rename from packages/admin/src/schemas/gift-card.ts
rename to packages/dashboard/src/schemas/gift-card.ts
diff --git a/packages/admin/src/schemas/market.ts b/packages/dashboard/src/schemas/market.ts
similarity index 100%
rename from packages/admin/src/schemas/market.ts
rename to packages/dashboard/src/schemas/market.ts
diff --git a/packages/admin/src/schemas/option-type.ts b/packages/dashboard/src/schemas/option-type.ts
similarity index 100%
rename from packages/admin/src/schemas/option-type.ts
rename to packages/dashboard/src/schemas/option-type.ts
diff --git a/packages/admin/src/schemas/order.ts b/packages/dashboard/src/schemas/order.ts
similarity index 100%
rename from packages/admin/src/schemas/order.ts
rename to packages/dashboard/src/schemas/order.ts
diff --git a/packages/admin/src/schemas/payment-method.ts b/packages/dashboard/src/schemas/payment-method.ts
similarity index 100%
rename from packages/admin/src/schemas/payment-method.ts
rename to packages/dashboard/src/schemas/payment-method.ts
diff --git a/packages/admin/src/schemas/price-list.ts b/packages/dashboard/src/schemas/price-list.ts
similarity index 100%
rename from packages/admin/src/schemas/price-list.ts
rename to packages/dashboard/src/schemas/price-list.ts
diff --git a/packages/admin/src/schemas/product.ts b/packages/dashboard/src/schemas/product.ts
similarity index 100%
rename from packages/admin/src/schemas/product.ts
rename to packages/dashboard/src/schemas/product.ts
diff --git a/packages/admin/src/schemas/promotion.ts b/packages/dashboard/src/schemas/promotion.ts
similarity index 100%
rename from packages/admin/src/schemas/promotion.ts
rename to packages/dashboard/src/schemas/promotion.ts
diff --git a/packages/admin/src/schemas/stock-location.ts b/packages/dashboard/src/schemas/stock-location.ts
similarity index 100%
rename from packages/admin/src/schemas/stock-location.ts
rename to packages/dashboard/src/schemas/stock-location.ts
diff --git a/packages/admin/src/schemas/store-credit.ts b/packages/dashboard/src/schemas/store-credit.ts
similarity index 100%
rename from packages/admin/src/schemas/store-credit.ts
rename to packages/dashboard/src/schemas/store-credit.ts
diff --git a/packages/admin/src/schemas/store.ts b/packages/dashboard/src/schemas/store.ts
similarity index 100%
rename from packages/admin/src/schemas/store.ts
rename to packages/dashboard/src/schemas/store.ts
diff --git a/packages/admin/src/schemas/tax-category.ts b/packages/dashboard/src/schemas/tax-category.ts
similarity index 100%
rename from packages/admin/src/schemas/tax-category.ts
rename to packages/dashboard/src/schemas/tax-category.ts
diff --git a/packages/admin/src/tables/allowed-origins.tsx b/packages/dashboard/src/tables/allowed-origins.tsx
similarity index 100%
rename from packages/admin/src/tables/allowed-origins.tsx
rename to packages/dashboard/src/tables/allowed-origins.tsx
diff --git a/packages/admin/src/tables/custom-field-definitions.tsx b/packages/dashboard/src/tables/custom-field-definitions.tsx
similarity index 100%
rename from packages/admin/src/tables/custom-field-definitions.tsx
rename to packages/dashboard/src/tables/custom-field-definitions.tsx
diff --git a/packages/admin/src/tables/customer-groups.tsx b/packages/dashboard/src/tables/customer-groups.tsx
similarity index 100%
rename from packages/admin/src/tables/customer-groups.tsx
rename to packages/dashboard/src/tables/customer-groups.tsx
diff --git a/packages/admin/src/tables/customers.tsx b/packages/dashboard/src/tables/customers.tsx
similarity index 100%
rename from packages/admin/src/tables/customers.tsx
rename to packages/dashboard/src/tables/customers.tsx
diff --git a/packages/admin/src/tables/gift-cards.tsx b/packages/dashboard/src/tables/gift-cards.tsx
similarity index 100%
rename from packages/admin/src/tables/gift-cards.tsx
rename to packages/dashboard/src/tables/gift-cards.tsx
diff --git a/packages/admin/src/tables/markets.tsx b/packages/dashboard/src/tables/markets.tsx
similarity index 100%
rename from packages/admin/src/tables/markets.tsx
rename to packages/dashboard/src/tables/markets.tsx
diff --git a/packages/admin/src/tables/option-types.tsx b/packages/dashboard/src/tables/option-types.tsx
similarity index 100%
rename from packages/admin/src/tables/option-types.tsx
rename to packages/dashboard/src/tables/option-types.tsx
diff --git a/packages/admin/src/tables/orders.tsx b/packages/dashboard/src/tables/orders.tsx
similarity index 100%
rename from packages/admin/src/tables/orders.tsx
rename to packages/dashboard/src/tables/orders.tsx
diff --git a/packages/admin/src/tables/payment-methods.tsx b/packages/dashboard/src/tables/payment-methods.tsx
similarity index 100%
rename from packages/admin/src/tables/payment-methods.tsx
rename to packages/dashboard/src/tables/payment-methods.tsx
diff --git a/packages/admin/src/tables/price-lists.tsx b/packages/dashboard/src/tables/price-lists.tsx
similarity index 100%
rename from packages/admin/src/tables/price-lists.tsx
rename to packages/dashboard/src/tables/price-lists.tsx
diff --git a/packages/admin/src/tables/products.tsx b/packages/dashboard/src/tables/products.tsx
similarity index 100%
rename from packages/admin/src/tables/products.tsx
rename to packages/dashboard/src/tables/products.tsx
diff --git a/packages/admin/src/tables/promotions.tsx b/packages/dashboard/src/tables/promotions.tsx
similarity index 100%
rename from packages/admin/src/tables/promotions.tsx
rename to packages/dashboard/src/tables/promotions.tsx
diff --git a/packages/admin/src/tables/stock-locations.tsx b/packages/dashboard/src/tables/stock-locations.tsx
similarity index 100%
rename from packages/admin/src/tables/stock-locations.tsx
rename to packages/dashboard/src/tables/stock-locations.tsx
diff --git a/packages/admin/src/tables/stock-transfers.tsx b/packages/dashboard/src/tables/stock-transfers.tsx
similarity index 100%
rename from packages/admin/src/tables/stock-transfers.tsx
rename to packages/dashboard/src/tables/stock-transfers.tsx
diff --git a/packages/admin/src/tables/tax-categories.tsx b/packages/dashboard/src/tables/tax-categories.tsx
similarity index 100%
rename from packages/admin/src/tables/tax-categories.tsx
rename to packages/dashboard/src/tables/tax-categories.tsx
diff --git a/packages/admin/tsconfig.app.json b/packages/dashboard/tsconfig.app.json
similarity index 95%
rename from packages/admin/tsconfig.app.json
rename to packages/dashboard/tsconfig.app.json
index 209f26b407..2078200c1e 100644
--- a/packages/admin/tsconfig.app.json
+++ b/packages/dashboard/tsconfig.app.json
@@ -2,6 +2,7 @@
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
+ "ignoreDeprecations": "6.0",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
diff --git a/packages/admin/tsconfig.json b/packages/dashboard/tsconfig.json
similarity index 84%
rename from packages/admin/tsconfig.json
rename to packages/dashboard/tsconfig.json
index 2b78387c74..7f174c6a84 100644
--- a/packages/admin/tsconfig.json
+++ b/packages/dashboard/tsconfig.json
@@ -2,7 +2,7 @@
"files": [],
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }],
"compilerOptions": {
- "baseUrl": ".",
+ "ignoreDeprecations": "6.0",
"paths": {
"@/*": ["./src/*"]
}
diff --git a/packages/admin/tsconfig.node.json b/packages/dashboard/tsconfig.node.json
similarity index 95%
rename from packages/admin/tsconfig.node.json
rename to packages/dashboard/tsconfig.node.json
index 8a67f62f4c..6295f4102a 100644
--- a/packages/admin/tsconfig.node.json
+++ b/packages/dashboard/tsconfig.node.json
@@ -2,6 +2,7 @@
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2023",
+ "ignoreDeprecations": "6.0",
"lib": ["ES2023"],
"module": "ESNext",
"types": ["node"],
diff --git a/packages/admin/vite.config.ts b/packages/dashboard/vite.config.ts
similarity index 100%
rename from packages/admin/vite.config.ts
rename to packages/dashboard/vite.config.ts
diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json
index 4bbbe61308..ef32c20fca 100644
--- a/packages/sdk/tsconfig.json
+++ b/packages/sdk/tsconfig.json
@@ -15,7 +15,6 @@
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
- "baseUrl": ".",
"paths": {
"@/types": ["./src/types/generated/index.ts"]
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f00d79690c..436c399fb7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,7 +19,7 @@ importers:
specifier: ^2.9.9
version: 2.9.9
- packages/admin:
+ packages/dashboard:
dependencies:
'@base-ui/react':
specifier: ^1.4.1
@@ -283,6 +283,47 @@ importers:
specifier: ^4.1.5
+ packages/dashboard-core:
+ dependencies:
+ '@spree/dashboard-ui':
+ specifier: workspace:^
+ version: link:../dashboard-ui
+ react:
+ specifier: ^19.2.6
+ version: 19.2.6
+ react-dom:
+ specifier: ^19.2.6
+ version: 19.2.6([email protected])
+ devDependencies:
+ '@types/react':
+ specifier: ^19.2.14
+ version: 19.2.14
+ '@types/react-dom':
+ specifier: ^19.2.3
+ version: 19.2.3(@types/[email protected])
+ typescript:
+ specifier: ~6.0.3
+ version: 6.0.3
+
+ packages/dashboard-ui:
+ dependencies:
+ react:
+ specifier: ^19.2.6
+ version: 19.2.6
+ react-dom:
+ specifier: ^19.2.6
+ version: 19.2.6([email protected])
+ devDependencies:
+ '@types/react':
+ specifier: ^19.2.14
+ version: 19.2.14
+ '@types/react-dom':
+ specifier: ^19.2.3
+ version: 19.2.3(@types/[email protected])
+ typescript:
+ specifier: ~6.0.3
+ version: 6.0.3
+
packages/docs:
devDependencies:
vitest: