Commit Graph

63 Commits

Author SHA1 Message Date
jamey
255912af73 update docs and progress tracking
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-13 13:34:36 +00:00
jamey
09f55dfe67 add database backup and restore admin page
Some checks failed
deploy / deploy (push) Has been cancelled
- SQLCipher-encrypted backup creation via VACUUM INTO
- Backup history with auto-pruning (keeps last 5)
- Pre-restore automatic backup for safety
- Restore from history or uploaded file
- Stats display with table breakdown
- Download hook for client-side file download
- SECRET_KEY_DB config for encryption at rest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-13 13:33:29 +00:00
jamey
b0f8eea2bc add competitive gap analysis document
All checks were successful
deploy / deploy (push) Successful in 1m8s
2026-03-10 09:46:02 +00:00
jamey
e04a5edbbb add SEO enhancements plan 2026-03-10 08:53:47 +00:00
jamey
f49d52a1e0 add editor reorganisation plan
All checks were successful
deploy / deploy (push) Successful in 50s
2026-03-10 08:14:00 +00:00
jamey
2282af91db complete onboarding UX v2
Some checks failed
deploy / deploy (push) Has been cancelled
Tasks C, H, I from the plan:

- Forgiving API key validation: add Printify UUID format and Printful
  length validation, validate on blur for fast feedback, helpful error
  messages with specific guidance

- External links UX: verified all external links use <.external_link>
  component with target="_blank", rel="noopener noreferrer", icon, and
  screen reader text

- Input styling WCAG compliance: increase input border contrast from
  ~3.3:1 to ~4.5-5:1 across all theme moods (neutral, warm, cool, dark)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-10 07:56:54 +00:00
jamey
ae0a149ecd add draft-then-publish workflow plan
All checks were successful
deploy / deploy (push) Successful in 53s
Plan for auto-saving drafts with explicit publish. Visitors always see
published version, admins see their drafts while editing. Removes need
for beforeunload warnings since work is never lost.

Planned to follow unified-editing-mode completion.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-09 11:07:46 +00:00
jamey
168b6ce76f implement unified on-site editor phases 1-2
All checks were successful
deploy / deploy (push) Successful in 1m10s
Add theme editing to the existing PageEditorHook, enabling on-site
theme customisation alongside page editing. The editor panel now has
three tabs (Page, Theme, Settings) and can be collapsed while
keeping editing state intact.

- Add theme editing state and event handlers to PageEditorHook
- Add 3-tab UI with tab switching logic
- Add transparent overlay for click-outside dismiss
- Add mobile drag-to-resize with height persistence
- Fix animation replay on drag release (has-dragged class)
- Preserve panel height across LiveView re-renders
- Default to Page tab on editable pages, Theme otherwise
- Show unsaved changes indicator on FAB when panel collapsed
- Fix handle_event grouping warning in admin theme

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-09 09:01:21 +00:00
jamey
74ab6411f7 add unified on-site editing mode plan
All checks were successful
deploy / deploy (push) Successful in 46s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-08 23:09:51 +00:00
jamey
0c2d4ac406 add rate limiting and HSTS for security hardening
Some checks failed
deploy / deploy (push) Failing after 8m33s
- Add Hammer library for rate limiting with ETS backend
- Rate limit login (5/min), magic link (3/min), newsletter (10/min), API (60/min)
- Add themed 429 error page using bare shop styling
- Enable HSTS in production with rewrite_on for Fly proxy
- Add security hardening plan to docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-08 08:58:43 +00:00
jamey
48eb7a9d9c update notification system docs as implementation reference
All checks were successful
deploy / deploy (push) Successful in 1m22s
Rewrote planning doc as a reference guide with:
- decision tree for choosing feedback type
- implementation patterns with code examples
- accessibility requirements
- common mistakes to avoid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-08 07:55:55 +00:00
jamey
dbcecc7878 update notification overhaul plan
All checks were successful
deploy / deploy (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:30:29 +00:00
jamey
db130a7155 rework email settings for true progressive enhancement
All checks were successful
deploy / deploy (push) Successful in 1m19s
Render all adapter field sections in the form with CSS :has(:checked)
controlling visibility. Selecting a provider instantly shows its config
fields — no JS, no page reload, no server round-trip needed.

- Render all 6 adapter configs with data-adapter attribute
- CSS :has(:checked) show/hide rules per adapter in admin stylesheet
- Namespace field names per adapter (email[brevo][api_key] etc)
- Drop 4 transactional-only providers (Resend, Postmark, Mailgun, MailPace)
- Remove noscript "Switch provider" button and controller redirect workaround
- Remove configured_adapter hidden input tracking
- Hide JS-only test email button for no-JS users via noscript style
- LiveView progressively enhances with async save and test email

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:10:37 +00:00
jamey
67a26eb6b4 add contextual prompts for skipped setup steps
All checks were successful
deploy / deploy (push) Successful in 1m26s
Disable checkout when Stripe isn't connected (cart drawer, cart page,
and early guard in checkout controller to prevent orphaned orders).
Show amber warning on order detail when email isn't configured.
Fix pre-existing missing vertical spacing between page blocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:02:49 +00:00
jamey
2e5217b010 add plans from usability testing: onboarding v2, notifications, live editor
All checks were successful
deploy / deploy (push) Successful in 1m7s
Onboarding UX v2 supersedes the original plan — reworks setup into a
single guided journey with progress bar, forgiving validation, and
contextual prompts for skipped steps.

Notification overhaul replaces floating toasts with inline feedback
and persistent top banners (110+ flash messages audited).

Live site editor is a design exploration for on-site editing with
contenteditable text and live CSS variable injection.

Also adds SEO settings and multiple providers to the roadmap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 22:45:41 +00:00
jamey
8ea77e5992 fix content image double-suffix, clean up page defaults and editor UX
All checks were successful
deploy / deploy (push) Successful in 1m22s
- Fix resolve_content_image returning base path (not full URL) so
  responsive_image doesn't double-append width/extension
- Remove legacy image fields (image_src, image_alt, image_url) from
  block settings schemas
- Remove demo/mockup fallbacks from renderer and defaults — blank
  fields stay blank instead of showing preview content
- Replace demo text in defaults with instructional placeholders that
  guide new shop owners
- Remove redundant X button from editor sidebar, add unsaved-changes
  confirmation to Done button
- Fix block card name overflow on mobile (display: block, flex-wrap)
- Add onboarding UX improvement plan (10 tasks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:56:01 +00:00
jamey
96341613f4 fix CSS nesting warnings and test type warnings
Replace BEM-style &--modifier nesting (unsupported in native CSS) with
&.class-modifier in shop/components.css and page_renderer.ex. Fix
Elixir 1.19 type warnings comparing lists with != [].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 01:02:24 +00:00
jamey
867a69109e fix visual regressions in admin CSS refactor
Five missing line-height values caused pixel shifts when Tailwind
utilities (text-sm, text-lg, text-xs) were replaced with semantic
classes that only set font-size. Also remove phantom padding-bottom
on .admin-header (the old pb-4 utility was never defined).

Fixes: .admin-header, .admin-header-subtitle, .admin-error,
.admin-brand, .admin-text-secondary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:39:22 +00:00
jamey
edef628214 tidy docs: condense progress, trim readme, mark plan statuses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:18 +00:00
jamey
ad2e6d1e6d add newsletter and email campaigns
Subscribers with double opt-in confirmation, campaign composer with
draft/scheduled/sent lifecycle, admin dashboard with overview stats,
CSV export, and shop signup form wired into page builder blocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:25:28 +00:00
jamey
f4bf9c13e6 add admin UX polish plan from full audit
All checks were successful
deploy / deploy (push) Successful in 53s
10 tasks covering unsaved changes warning, block picker
descriptions, sidebar grouping, nav editor labels, inline
page settings, real data preview, and more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:48:22 +00:00
jamey
356e336eef plan custom CMS pages feature with catch-all routing
All checks were successful
deploy / deploy (push) Successful in 1m22s
Six-stage plan for user-created content pages at top-level URLs.
System pages keep dedicated LiveViews, custom pages use a single
generic LiveView with portable blocks. Includes navigation
management, SEO, and auto-redirects on slug change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 01:40:37 +00:00
jamey
847b5f3e5e add admin media library with image management and block picker integration
- Schema: alt, caption, tags fields on images table with metadata changeset
- Context: list_images with filters, find_usages, used_image_ids, delete_with_cleanup
- Admin UI: /admin/media with grid view, upload, filters, detail panel, metadata editing
- Block editor: :image field type for image_text and content_body blocks
- Page renderer: image_id resolution with legacy URL fallback
- Mobile: bottom sheet detail panel with slide-up animation
- CSS: uses correct --t-* admin theme tokens, admin-badge colour variants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:20:51 +00:00
jamey
3f97742c0b add inline block settings editing to page editor
All checks were successful
deploy / deploy (push) Successful in 3m40s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:47:24 +00:00
jamey
21f57e39e2 fix stage 3 checkboxes in page builder plan
All checks were successful
deploy / deploy (push) Successful in 1m0s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:33:45 +00:00
jamey
24ad3b8b60 wire order pages and theme preview to page renderer, remove old templates
Some checks failed
deploy / deploy (push) Has been cancelled
All 14 pages now render through PageRenderer. Theme editor preview
unified from 10 preview_page clauses to one function + page-context
helpers. PageTemplates module and 10 .heex template files deleted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:32:50 +00:00
jamey
16ebc29fa9 wire collection, PDP, cart, and search pages to page renderer
Stage 4 of the page builder: all shop pages now render via
PageRenderer instead of inline templates or PageTemplates.

- Collection: full filter bar moved to renderer (category pills,
  sort dropdown, CollectionFilters hook, empty state)
- PDP: related_products and reviews loaded via block data loaders
  instead of manual queries
- Cart: page definition loaded in mount, subtotal computed in render
- Search: page definition loaded in mount, handle_params unchanged
- Added Phoenix.VerifiedRoutes to PageRenderer for ~p sigil
- Net -55 lines (128 added, 183 removed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:13:00 +00:00
jamey
914e0661a1 update url-redirects plan status to complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:32:26 +00:00
jamey
c69e51051f wire simple pages to PageRenderer (stage 3)
Home, Content (about/delivery/privacy/terms), Contact, and ErrorHTML
now render through the generic PageRenderer instead of hardcoded
templates. Block wrapper divs enable CSS grid targeting. Featured
products block supports layout/card_variant/columns settings for
different page contexts. Contact page uses CSS grid on data-block-type
attributes for two-column layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:29:20 +00:00
jamey
ca9f32fa42 update progress and plan for page builder stages 1-2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:08:57 +00:00
jamey
6e57af82fc add URL redirects with ETS-cached plug, broken URL tracking, and admin UI
All checks were successful
deploy / deploy (push) Successful in 3m30s
Redirects context with redirect/broken_url schemas, chain flattening,
ETS cache for fast lookups in the request pipeline. BrokenUrlTracker
plug logs 404s. Auto-redirect on product slug change via upsert_product
hook. Admin redirects page with active/broken tabs, manual create form.
RedirectPrunerWorker cleans up old broken URLs. 1227 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:14:14 +00:00
jamey
61887b9d5b improve cart recovery: product links in email, persistent session cookie
All checks were successful
deploy / deploy (push) Successful in 3m32s
- add product_id to order_items (migration + schema + create_order)
- cart recovery email now includes a direct product link per item
- extend session cookie max_age to 7 days so carts survive browser restarts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 13:12:41 +00:00
jamey
0f1135256d add canonical URLs, robots.txt, and sitemap.xml
Canonical: all shop pages now assign og_url (reusing the existing og:url
assign), which the layout renders as <link rel="canonical">. Collection
pages strip the sort param so ?sort=price_asc doesn't create a duplicate
canonical.

robots.txt: dynamic controller disallows /admin/, /api/, /users/,
/webhooks/, /checkout/. Removed robots.txt from static_paths so it
goes through the router instead of Plug.Static.

sitemap.xml: auto-generated from all visible products + categories +
static pages, served as application/xml. 8 tests.

Also updates PROGRESS.md: marks tasks 55, 58, 59, 61, 62 as done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:47:35 +00:00
jamey
7ceee9c814 add dashboard filtering to analytics
All checks were successful
deploy / deploy (push) Successful in 1m19s
Click any row in pages, sources, countries, or devices tables to
filter the entire dashboard by that dimension. Active filters show
as dismissible chips. Filters thread through all queries including
previous-period deltas. 1050 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:46:34 +00:00
jamey
65e646a7eb add analytics v2 plan, demo seed data, and improved funnel display
- analytics-v2 plan with prioritised improvements (comparison mode, filtering, CSV export, entry/exit pages)
- seed script generating ~35k realistic events over 12 months (weighted traffic, referrers, devices, e-commerce funnel)
- funnel chart now shows overall conversion rate from product views instead of step-to-step percentages
- summary line with overall conversion rate and revenue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:30:24 +00:00
jamey
f1b4e55cc7 mark email settings and setup auto-confirm as done
All checks were successful
deploy / deploy (push) Successful in 53s
Both features were already fully implemented. Updated task list
and plan status to reflect reality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:33:11 +00:00
jamey
508695b852 mark setup-auto-confirm plan as complete
All checks were successful
deploy / deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:24:42 +00:00
jamey
9d9bd09059 auto-confirm admin during setup, skip email verification
Some checks failed
deploy / deploy (push) Has been cancelled
Setup wizard no longer requires email delivery. Admin account is
auto-confirmed and auto-logged-in via token redirect. Adds setup
secret gate for prod (logged on boot), SMTP env var config in
runtime.exs, email_configured? helper, and admin warning banner
when email isn't set up. Includes plan files for this task and
the follow-up email settings UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:24:26 +00:00
jamey
a78a1db847 fix admin font loading and theme CSS cache miss bug
add system font stack to admin reset CSS so setup/admin pages render
sans-serif on all devices instead of falling through to browser default.
pass path_resolver to CSSGenerator.generate on cache miss paths so
font URLs resolve to digested paths in production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:39:41 +00:00
jamey
e5362d56fc add admin font loading plan doc
Documents the missing @font-face and font-family on admin/setup
pages, the cache miss path resolver bug, and options for fixing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:14:01 +00:00
jamey
c2caeed64d add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
jamey
9528700862 rename project from SimpleshopTheme to Berrypod
All modules, configs, paths, and references updated.
836 tests pass, zero warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:23:15 +00:00
jamey
c65e777832 update progress and css migration plan status after phase 7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:12:41 +00:00
jamey
1a61f4bb62 add CSS migration plan (Tailwind + DaisyUI to modern CSS)
9-phase plan to replace Tailwind v4 and DaisyUI with hand-written
CSS using @layer, native nesting, container queries, oklch, and
@property. Visual regression testing at each phase. ~22h across
14 sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 22:15:10 +00:00
jamey
3c788bff78 add Printful provider integration with HTTP client and order routing
Printful HTTP client (v2 + v1 for sync products), Provider behaviour
implementation with all callbacks (test_connection, fetch_products,
submit_order, get_order_status, fetch_shipping_rates), and multi-provider
order routing that looks up the provider connection from the order's
product instead of hardcoding "printify".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:01:05 +00:00
jamey
5c2f70ce44 add shipping costs with live exchange rates and country detection
Shipping rates fetched from Printify during product sync, converted to
GBP at sync time using frankfurter.app ECB exchange rates with 5%
buffer. Cached in shipping_rates table per blueprint/provider/country.

Cart page shows shipping estimate with country selector (detected from
Accept-Language header, persisted in cookie). Stripe Checkout includes
shipping_options for UK domestic and international delivery. Order
shipping_cost extracted from Stripe on payment.

ScheduledSyncWorker runs every 6 hours via Oban cron to keep rates
and exchange rates fresh. REST_OF_THE_WORLD fallback covers unlisted
countries. 780 tests, 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:48:00 +00:00
jamey
edcbc596e3 add LIKE substring fallback to search and update plan statuses
FTS5 prefix matching misses mid-word substrings (e.g. "ebook" in
"notebook"). When FTS5 returns zero results, fall back to LIKE
query on title and category with proper wildcard escaping. 4 new
tests, 757 total.

Also marks completed plan files (search, admin-redesign,
setup-wizard, products-context) with correct status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:09:10 +00:00
jamey
093bdcc7a6 add admin redesign plan and update progress roadmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:51:42 +00:00
jamey
880f63e0b1 add setup wizard plan and update progress roadmap
Detailed plan for setup wizard, go-live gate, and registration
lockdown. Covers single-admin account creation, coming soon page,
admin setup checklist, and platform compatibility notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:35:25 +00:00
jamey
209ae7aee7 fix navigation links, footer categories, product card structure, and social icons
- add missing cta_href to hero section and error page CTAs
- replace hardcoded footer shop links with real product categories
- restructure product cards with stretched-link pattern so category
  badges link to their collection page
- unify social icons: footer and contact page share the same default
  links from a single source in content.ex
- add search implementation plan (docs/plans/search.md, deferred)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 08:17:19 +00:00