Conversation
Set up directory structure for core/merchant separation: - Add core/ for Vendure-maintained components, lib, hooks, contexts, theme - Add merchant/ for customizable overrides and extensions - Add config/ for storefront configuration Extract theme tokens to layered CSS files: - Move CSS variables to src/core/theme/base.css - Create merchant override placeholders for tokens and components - Update globals.css to import layered theme files Add path aliases @core/*, @merchant/*, @config/* to tsconfig.json
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Move commerce components to src/core/components/commerce/: - ProductCard, ProductGrid, ProductCarousel, ProductInfo - FeaturedProducts, RelatedProducts, ProductImageCarousel - Price, FacetFilters, SortDropdown, OrderStatusBadge Move layout components to src/core/components/layout/: - Navbar (with navbar/ subcomponents), Footer, HeroSection - SearchInput, ThemeSwitcher, NavbarCart, NavbarUser, etc. Update all imports to use @core/* path alias.
Phase 5: Extract Shared Components - Move shared components to src/core/components/shared/ - Includes pagination, country-select, product-grid-skeleton - Includes skeletons: cart, navbar-user, search-input, search-results Phase 6: Extract Library Code - Move lib/vendure/* to src/core/lib/vendure/ - Move utils.ts and format.ts to src/core/lib/ - Move contexts/auth-context.tsx to src/core/contexts/ - Move hooks/use-mobile.ts to src/core/hooks/ - Create re-export files for shadcn/ui compatibility - Keep metadata.ts, auth.ts, search-helpers.ts as merchant-owned - Update all imports across the codebase
- Move Pagination from ServerComponentRegistry to ClientComponentRegistry (component uses 'use client' and React hooks) - Fix FacetFiltersProps type to use ResultOf<SearchProductsQuery> instead of loose typing with Array<unknown> - Update unified registry exports to reflect correct client/server separation
- Add ProductCard override example in @merchant/components/overrides - Provides customization point for merchant-specific styling
- Update app pages to import from ServerComponents and ClientComponents - Update core components to use registry patterns for cross-component references
The registry file is just a re-export barrel that doesn't need 'use client'. The individual components already have their own directives. Having 'use client' on the barrel caused server components to receive client references instead of the actual component objects.
- Export Props interfaces from each component file - Update registries to import Props from components instead of defining inline - Add SearchInputProps with className support to SearchInput component - Update merchant ProductCard override to import Props from core
Add comprehensive documentation for the layered architecture: - CUSTOMIZATION.md: Theme, component override, and GraphQL extension guides - UPGRADING.md: Upstream sync workflow and conflict resolution guide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7 (phases 1 & 2)
Summary
Test plan