# Homepage (post module-system retirement)

## Scope

`07-storefront-design-system.md` established the storefront's reusable tokens and components. This document originally described a generic `HomepageModuleConfig` system (6 module types, a 7-kind `ContentSource` union, an `EditableRegion` "unconfigured" placeholder) that CommerceDex's homepage was built on. That system has been **retired entirely** — `storefront/src/homepage/types.ts`, `moduleRegistry.ts`, `useContentSource.ts`, `homepageConfig.ts`, `HomepageModule.tsx`, and `components/EditableRegion.tsx` are all deleted. `Home.tsx` now composes exactly two things directly, with no generic module abstraction in between:

- The **Layout Mapping Engine** (`docs/design/13-layout-mapping-engine.md`, `storefront/src/api/storefrontLayouts.ts`) owns the marketing/banner sections — Hero, the 4 Feature tiles, the Promo banner, the Category banner. These are pure uploaded images, admin-authored via **Storefront Layouts → Nike Layout**. Only the hero is full-bleed (edge-to-edge); feature/promo/category are boxed like the rest of the site, with the same balanced container spacing as every other page — an exact full-bleed treatment for all of them didn't read well once real content was in place.
- **New arrivals** — the one live, data-driven section left, fetched directly in `Home.tsx` via `listProducts({ sort: "newest" })` and rendered through the standard `ProductRail`/`ProductCard` (title + price, same as everywhere else), just with arrow-scroll buttons (`arrows` prop) instead of a "See all" link since it's a standalone rail, not a lead-in to a fuller list page.

There's no "shop by category" rail and no searchable "shop everything" catalog grid on the homepage anymore — both were removed outright. Category browsing still exists via the header nav (`useSiteCategories.ts`) and `/category/:id` pages; full catalog browsing exists via the header's "Shop all" link. Recently-viewed was also dropped from the homepage specifically (the `RecentlyViewedRail` component itself is untouched and still used on Cart/Checkout/ProductDetail).

## Why this is simpler than before

With only one live section left, the generic module system (config array + type registry + per-kind resolver hooks + a shared "unconfigured" placeholder) was pure overhead — a single hardcoded `useQuery` + component call does the same job with far less indirection. If a second live, data-driven homepage section is ever needed, reconsider whether a shared abstraction earns its keep at that point; don't resurrect the old system preemptively.
