diff --git a/CLAUDE.md b/CLAUDE.md index dd7307b..1d54bf9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,15 +23,24 @@ mix precommit # REQUIRED before committing: compile --warning-as-errors - **Settings** - Theme configuration persistence as JSON - **Theme** - CSS generation, ETS caching, 8 presets (Gallery, Studio, Boutique, etc.) -- **Products** - Product/variant data synced from Printify -- **Media/Images** - Image uploads and optimization pipeline (Oban jobs) -- **Providers** - Abstraction layer for POD providers (Printify integration) +- **Products** - Product/variant data synced from Printify/Printful +- **Media/Images** - Image uploads, optimization pipeline (Oban jobs), media library +- **Providers** - Abstraction layer for POD providers (Printify + Printful) +- **Pages** - Database-driven page builder (blocks, cache, defaults, 26 block types) +- **Orders** - Order lifecycle, fulfilment tracking, provider submission +- **Shipping** - Shipping rates, country detection, exchange rates +- **Analytics** - Privacy-first pageview tracking, e-commerce funnel +- **ActivityLog** - System event logging, order timeline +- **Redirects** - URL redirects, 404 monitoring, dead link scanning +- **Newsletter** - Email list collection, campaign sending +- **Search** - FTS5 full-text search index ### Web Layer (lib/berrypod_web/) -- **live/** - LiveViews for shop pages and theme editor -- **components/page_templates/** - Shared templates between preview and live shop -- **components/shop_components.ex** - Reusable shop UI components +- **live/admin/** - Admin LiveViews (orders, pages, media, analytics, etc.) +- **live/shop/** - Shop LiveViews (home, collection, product, cart, custom pages) +- **components/shop_components/** - Reusable shop UI components (split into focused modules) +- **page_renderer.ex** - Generic block-to-component dispatch for all pages ### Three-Layer CSS Architecture @@ -48,7 +57,18 @@ Theme switching is instant via CSS custom property injection (no reload). | `/` | Shop home | | `/collections/:slug` | Product collection (filtering) | | `/products/:id` | Product detail | -| `/admin/theme` | Theme editor (auth required) | +| `/cart` | Shopping cart | +| `/contact` | Contact + order lookup | +| `/:slug` | Custom CMS pages (catch-all, must be last scope) | +| `/setup` | First-run onboarding | +| `/admin` | Admin dashboard | +| `/admin/orders` | Order management | +| `/admin/pages` | Page editor | +| `/admin/media` | Media library | +| `/admin/analytics` | Analytics dashboard | +| `/admin/activity` | Activity log | +| `/admin/theme` | Theme editor | +| `/admin/settings` | Shop settings | ## Elixir Guidelines @@ -128,7 +148,7 @@ Template pattern: ``` -Empty state with Tailwind: +Empty state with `hidden only:block`: ```heex