Commit Graph

135 Commits

Author SHA1 Message Date
adaa564f4c docs: add image optimization pipeline plan
Detailed implementation plan for automatic image optimization:
- Lossless WebP storage in SQLite (26-41% smaller than PNG)
- AVIF/WebP/JPEG responsive variants generated to disk cache
- Oban for durable async processing with SQLite
- 10-phase incremental implementation with checkpoints
- Comprehensive test coverage strategy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:56:30 +00:00
7fbde87c5b perf: improve SEO and accessibility for PageSpeed
- Add meta description tag with theme_settings.site_description fallback
- Add site_description field to ThemeSettings schema
- Fix color contrast on tertiary text (WCAG AA compliance)
  - Clean mood: #a3a3a3 → #737373
  - Warm mood: #a8a29e → #78716c
  - Cool mood: #94a3b8 → #64748b
- Add width/height attributes to product images to prevent CLS:
  - Product cards: 600x600
  - Cart items: 96x96
  - Gallery thumbnails: 150x150
  - Lightbox: 1200x1200

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:55:55 +00:00
f29772010e fix: resolve nested HTML documents causing LiveView binding errors
The shop.html.heex and shop_root.html.heex were both full HTML documents.
When nested (root layout + live layout), this created invalid HTML with
duplicate <!DOCTYPE>, <html>, <head>, and <body> tags.

This caused:
- "Cannot bind multiple views to the same DOM element" console errors
- Failed Lighthouse audits
- Potential rendering issues

Fix:
- shop_root.html.heex: Now contains the full HTML document with theme
  settings, CSS variables, and data attributes
- shop.html.heex: Now just passes through @inner_content

Results:
- Console errors: Gone
- Best Practices: 96 → 100
- Total Blocking Time: 140ms → 30ms
- HTML validation: Passes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:20:39 +00:00
5faa6c4c09 perf: self-host fonts and add /admin route
Self-hosted fonts:
- Download all 10 typefaces (35 font files, 728KB) from Google Fonts
- Create @font-face declarations in assets/css/fonts.css
- Remove Google Fonts external dependency from layouts
- Privacy improvement (no Google tracking)
- Performance improvement (no DNS lookup to fonts.googleapis.com)
- GDPR compliant (no third-party requests)

Admin access:
- Add /admin route that redirects to /admin/theme (requires auth)
- Remove Admin link from footer (too visible for visitors)
- Shop owners can bookmark or type /admin directly

Layout improvements:
- Create shop_root.html.heex as minimal root for shop pages
- Shop pages no longer show admin nav bar

Other:
- Update .gitignore to exclude digested static files
- Add PageSpeed 100% task to ROADMAP.md
- Fix test to check /users/settings instead of shop homepage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:54:07 +00:00
8ab7169c1a docs: update ROADMAP and README with recent features
- Add Mobile Bottom Navigation section to ROADMAP
- Update routes table in README (collections routes)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:12:55 +00:00
4b22bb4a4b feat: add mobile bottom navigation bar
Replace cramped horizontal nav on mobile with a fixed bottom tab bar
for thumb-friendly navigation. The header nav is now hidden on mobile
(<768px) and the bottom nav provides Home, Shop, About, and Contact
links with icons.

- Add mobile_bottom_nav component with icon + label nav items
- Active page has accent-colored background highlight and larger icon
- Add shadow to lift nav visually off the page
- Update all page templates with bottom padding and bottom nav
- Remove CSS rule that was overriding Tailwind's hidden class
- Responsive header padding (tighter on mobile)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:03:42 +00:00
9c81f9511d chore: add "No spam" to newsletter description
Addresses the real concern people have about signing up.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:08:48 +00:00
c3f3bc237e chore: simplify newsletter description
Remove marketing fluff "Be the first" - everyone on the list gets
emails at the same time. Just describe what they'll receive.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:08:22 +00:00
a36d8f851c chore: change contact page copy from "us/we" to "me/I"
More personal and authentic for a solo POD seller:
- "Get in touch" instead of "Contact Us"
- "Drop me a message" instead of "Drop us"
- "I'll get back to you" instead of "we'll"
- "Send a message" instead of "Send us a message"
- "How can I help?" instead of "How can we help?"
- "I'll send you a link" instead of "we'll send"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:07:12 +00:00
6e52e03a03 chore: simplify newsletter card title to just "Newsletter"
Minimal and clear - the description does the selling, the button
says what to do.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:04:16 +00:00
8a616b0acd chore: change newsletter default title to "Join the newsletter"
Clear and explicit about what the user is signing up for.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:00:00 +00:00
7ae3af91ba chore: change newsletter default title to "Get updates"
More accurate than "Stay in touch" - newsletters are one-way communication.
Also updated description slightly: "news" instead of "updates" to avoid
repetition with the title.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:59:02 +00:00
4fa4a6a83e chore: change social links default title to "Find me online"
More neutral and personal than "Follow us":
- Works for all platform types (GitHub, Ko-fi, etc., not just social follows)
- "me" fits a solo POD seller better than corporate "us"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:56:52 +00:00
fc1b7dd708 chore: update demo social links for tech-savvy POD seller persona
Select platforms typical for a quirky, nerdy POD seller:
- Instagram: primary visual portfolio
- Bluesky: nerdy Twitter alternative
- Mastodon: federated/open web presence
- Ko-fi: indie tips and commissions
- GitHub: open source projects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:31:29 +00:00
2ff24197e0 feat: add comprehensive social platform icons using Simple Icons
Add 24 social platform icons from Simple Icons (MIT licensed):
- Commercial/Creative: instagram, pinterest, tiktok, facebook, twitter,
  youtube, patreon, kofi, etsy, gumroad, bandcamp
- Open Web/Federated: mastodon, pixelfed, bluesky, peertube, lemmy, matrix
- Developer/Hacker: github, gitlab, codeberg, sourcehut
- Communication: discord, telegram, signal
- Other: substack, rss, website

Also:
- Redesign social_links_card to single card with compact flex-wrap layout
- Remove redundant response_time text (hero already says "get back to you")

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:29:45 +00:00
6b45846d6d feat: enhance contact page with newsletter and social cards
Add newsletter_card component with :card and :inline variants to share
between footer and contact page. Add social_links_card component with
full-width icon+text cards for better discoverability.

Improve contact_form with optional email link and response time display,
keeping important contact info above the fold. Reorganize contact page
layout with form on left, info cards on right.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:13:48 +00:00
1f5498d7d8 docs: update ROADMAP with completed items
Mark as completed:
- Navigation links between admin and shop
- Collection routes with filtering and sorting
- Header navigation accessibility improvements

Update Phase 9 routes to reflect current implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:45:02 +00:00
50d7f135bc fix: improve header navigation accessibility
- Current page in nav is now a span instead of a link (no self-links)
- Logo links to home page, except when already on home
- Use aria-current="page" with accent underline for current page indicator
- Extract logo_content, logo_inner, and nav_item helper components
- Update CSS to target both a and span elements in .shop-nav

This follows WCAG accessibility guidelines - links that point to
the current page are confusing for screen reader users.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:43:54 +00:00
fe29c1ad36 feat: add product sorting to collection pages with tests
Add sort functionality to /collections/:slug pages with 6 sort options
(featured, newest, price ascending/descending, name A-Z/Z-A). Sort
selection persists across category navigation via URL query params.

Refactor handle_params to be DRY using load_collection/1 helper.
Add comprehensive unit tests for PreviewData category functions and
LiveView tests for the Collection page sorting and navigation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:38:22 +00:00
9fb836ca0d feat: add /collections/:slug routes with category filtering
- Add ShopLive.Collection LiveView for collection pages
- Add products_by_category/1 and category_by_slug/1 to PreviewData
- Support /collections/all for all products view
- Remove /products route and ShopLive.Products (replaced by collections)
- Update all links to use /collections/all instead of /products
- Update category nav to link to /collections/:slug
- Update PDP breadcrumb to link to specific collection

URL structure now follows Shopify convention:
- /collections/all - All products
- /collections/art-prints - Art Prints collection
- /collections/apparel - Apparel collection
- etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 23:26:41 +00:00
848c4ea146 feat: add navigation and collapsible sidebar to theme editor
- Add "← View Shop" link on admin/theme page for easy navigation
- Add collapsible sidebar with chevron toggle button
- Include proper ARIA attributes for accessibility (aria-label,
  aria-expanded, aria-controls)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:37:34 +00:00
8eda40f175 test: add settings → CSS cache invalidation test
Verifies that updating theme settings regenerates the CSS cache
with the new values. Tests accent color changes from red to blue
and confirms the correct HSL hue values appear in cached CSS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:21:08 +00:00
7c02323bf4 test: add CSSCache unit tests and benchmarks
Tests cover:
- get/0, put/1, invalidate/0, warm/0 functions
- Performance benchmark comparing cache hit vs CSS generation
- 100 cache hit consistency test

Run with: mix test test/simpleshop_theme/theme/css_cache_test.exs --include benchmark

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:14:27 +00:00
fae851159a docs: move CSS cache warming to completed (already implemented)
The CSSCache.init/1 already calls warm() on startup.
Remove from Quick Wins, add to Completed section.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:12:13 +00:00
73e749c573 docs: replace ROADMAP with detailed MVP implementation plan
New "Core MVP" section with 5 phases:
- Phase A: Products Context + Printify Sync
- Phase B: Session-Based Cart
- Phase C: Stripe Checkout integration
- Phase D: Orders + Printify Fulfillment
- Phase E: Cost Verification at Checkout

Includes concrete schemas, code examples, and file lists.
Adds Multi-Provider Support to future features.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:06:31 +00:00
7fcfff62a8 Add ROADMAP_UPDATED.md file after chat with Claude 2026-01-18 22:46:34 +00:00
f4ecc11eae docs: correct license to AGPL-3.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:10:02 +00:00
8e9a10e9b7 docs: rename to SimpleShop in docs, plan full rename for later
- Update README title to "SimpleShop"
- Update ROADMAP title to "SimpleShop Roadmap"
- Add "Rename Project to SimpleShop" to Technical Debt section
  with list of files that would need updating

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:09:42 +00:00
ac6a8d248d docs: reframe README with shop as primary feature
The shop is the product; the theme editor is a feature.
Reorder features section to lead with "The Shop" before
"Theme Editor".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:08:33 +00:00
f3451429da docs: add Enhanced Contact Page to roadmap
- Newsletter signup card for prominent subscription CTA
- Social media links card with icons and text labels
- Makes social links more discoverable than small footer icons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:06:04 +00:00
2e61115959 docs: fix ROADMAP references and move sample content to completed
- Remove reference to deleted sample-content.md
- Move Sample Content to Completed section (it's implemented)
- Note Printify integration in completed features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:56:21 +00:00
a3f81af990 docs: add mockup generator to README, delete sample-content.md
- Add "Generating Mockups" section documenting mix generate_mockups
- Remove stale reference to deleted docs/spec.md
- Delete docs/plans/sample-content.md (plan fully implemented)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:55:01 +00:00
5050b0bde5 docs: merge UX patterns into design-philosophy, delete ux-patterns.md
- Add Accessibility Baseline section with WCAG 2.1 AA requirements
- Add Quality Checklist for shipping verification
- Delete standalone ux-patterns.md (all useful content merged)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:52:06 +00:00
b5fbfd5882 docs: merge typography research into design-philosophy
- Add Typography System section with type scale rationale
- Add line-height guidelines and font pairing categories
- Add spacing system (8px grid) explanation
- Add e-commerce typography patterns (Baymard research)
- Delete standalone typography.md (redundant)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:49:10 +00:00
796c39d366 docs: extract design philosophy, remove outdated spec
- Create docs/research/design-philosophy.md with:
  - Core design principles
  - Target audience
  - POD research findings
  - Preset rationale
  - Customisation philosophy
- Delete docs/spec.md (outdated, didn't match implementation)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:42:57 +00:00
6b6c7cc148 docs: reorganize documentation and add ROADMAP
- Rewrite README.md with proper project overview, setup, and structure
- Create ROADMAP.md capturing future improvements and known gaps
- Move reference docs to docs/ directory:
  - docs/spec.md (theme system specification)
  - docs/plans/sample-content.md (POD content refresh plan)
  - docs/plans/page-builder.md (existing)
  - docs/research/typography.md
  - docs/research/ux-patterns.md
- Delete obsolete planning files:
  - PLAN.md (work complete)
  - PHASE_9_PLAN.md (work complete)
  - PHASE_9_PROGRESS.md (stale tracker)
  - RECENT_CHANGES.md (stale)
- Keep AGENTS.md (Phoenix codegen guidelines)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:39:37 +00:00
a2d655d302 feat: add Cart page and themed error pages
- Add ShopLive.Cart at /cart using shared PageTemplates
- Update ErrorHTML to render fully themed 404/500 pages
- Add dev-only error preview routes at /dev/errors/404 and /dev/errors/500
- Update error page tests for themed output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:29:45 +00:00
94f98b8be0 docs: add page builder feature plan
Document the architecture and implementation phases for transforming
static page templates into a database-driven, customizable page builder
with visual editing capabilities.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:19:09 +00:00
c25953780a refactor: consolidate shop and preview page templates
- Create shared PageTemplates module in components/page_templates/
- Shop LiveViews now use explicit render/1 calling shared templates
- Theme preview now uses preview_page/1 component calling shared templates
- Delete duplicate preview_pages directory and shop_live/*.html.heex
- Single source of truth: mode param controls shop vs preview behavior

Templates: home, about, contact, collection, pdp, cart, error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:17:59 +00:00
e02d928815 feat: add Product Detail page to public storefront
Add PDP (Product Detail Page) at /products/:id with full e-commerce
functionality including product gallery, variant selector, quantity
controls, reviews section, and related products.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:57:43 +00:00
4f70c6649a feat: add Products listing page to public storefront
- Create ShopLive.Products module and template
- Add /products route to public shop live session
- Shows product grid with category filters and sort dropdown
- Displays all 16 preview products with categories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:54:31 +00:00
5ceff20aaa feat: add Contact page to public storefront
- Create ShopLive.Contact module and template
- Add /contact route to public shop live session
- Includes contact form, order tracking, info cards, social links

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:52:11 +00:00
1f8dbd645d feat: add About page to public storefront
- Create ShopLive.About module and template
- Add /about route to public shop live session
- Reuse shop_components for header, footer, hero, rich text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:49:16 +00:00
75206474a1 refactor: consolidate CSS to use .themed class with native nesting
- Add .themed class as shared selector for both shop and preview
- Move visual/behavioral styles from .preview-frame to .themed
- Keep .preview-frame only for CSS variable switching (editor live preview)
- Update CSSGenerator to target .themed instead of .shop-root
- Refactor CSS files to use native CSS nesting syntax
- Update tests to reflect new class structure

This improves maintainability by:
- Eliminating duplicate selectors (.shop-root + .preview-frame)
- Using modern CSS nesting (94%+ browser support)
- Clear separation: .preview-frame = vars, .themed = styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:43:26 +00:00
7491c34723 test: add CSS consistency tests for shop and preview
Add tests to verify that:
- Both .shop-root and .preview-frame have theme data attributes
- Theme settings changes are reflected on shop pages
- CSS file has correct selectors for both contexts
- Generated CSS cache includes all theme variables

These tests catch regressions like the selector issue where
.preview-frame[data-mood="warm"] was incorrectly transformed to
.preview-frame, .shop-root[data-mood="warm"] instead of
.preview-frame[data-mood="warm"], .shop-root[data-mood="warm"]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 16:28:22 +00:00
0157f20ae9 fix: update shop layout and CSS selectors for shop-root
- Fix asset paths in shop layout (css/app.css, js/app.js)
- Add Google Fonts preconnect and stylesheet link
- Update theme-layer2-attributes.css to target both .preview-frame
  and .shop-root so theme styles apply to real shop pages
- Properly duplicate attribute selectors (e.g., [data-mood="warm"])
  for both .preview-frame and .shop-root

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 16:25:52 +00:00
88636db9d2 feat: add shop storefront with optimized theme CSS
- Create LoadTheme plug for loading theme settings
- Add shop layout with inline CSS injection (~400 bytes vs 17KB full)
- Create ShopLive.Home at / using shared ShopComponents
- Wire up CSS cache invalidation when theme settings change
- Replace Phoenix welcome page with themed shop home page

The shop layout injects only the active theme CSS variables inline,
achieving a 97% reduction compared to the full variants file used
by the theme editor.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 16:19:35 +00:00
97981a9884 refactor: extract remaining PDP components to ShopComponents
Add PDP-specific components:
- product_gallery with lightbox
- product_info (title, price, sale badge)
- variant_selector
- quantity_selector
- add_to_cart_button
- product_details accordion
- star_rating
- trust_badges
- reviews_section with review_card

Add page layout components:
- page_title for consistent h1 styling
- cart_layout for cart page structure
- rich_text for structured content blocks
- accordion_item for generic collapsible sections

Update preview pages to be fully component-based:
- PDP: 415 → 48 lines (88% reduction)
- Cart: 47 → 23 lines
- About: 65 → 27 lines

Add preview data functions:
- reviews() for product reviews
- about_content() for rich text blocks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 15:37:58 +00:00
0c15929c19 refactor: extract remaining page sections to ShopComponents
Add reusable components for all page sections:
- category_nav: Category circles for homepage navigation
- featured_products_section: Product grid with title and view-all CTA
- image_text_section: Two-column image + text layout
- collection_header: Page header with title and product count
- filter_bar: Category pills and sort dropdown
- content_body: Long-form content wrapper for about page
- contact_form: Contact form card
- order_tracking_card: Order tracking input card
- info_card: Bullet-point info card
- contact_info_card: Email contact card with icon
- social_links: Social media icon links
- cart_item: Cart item row with quantity controls
- order_summary: Order totals and checkout card
- breadcrumb: Navigation breadcrumb trail
- related_products_section: Related products grid

All preview pages now compose entirely of reusable components,
making them easier to maintain and enabling future section-based
theme customization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 15:14:25 +00:00
1589ebaeca refactor: expand hero_section with page and error variants
Add variant support to hero_section component:
- :default - Standard hero with section wrapper (home, about)
- :page - Page header style with larger title, more spacing (contact)
- :error - Error page with pre-title (404), dual buttons (error)

Now used in: home, about, contact, error pages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 14:57:31 +00:00