diff --git a/PLAN.md b/PLAN.md new file mode 100644 index 0000000..1e7e274 --- /dev/null +++ b/PLAN.md @@ -0,0 +1,927 @@ +# SimpleShop Theme - Implementation Plan + +## Overview + +Integrate the complete theme feature from `theme-demo-v28.html` into the Phoenix LiveView application. The system will provide 9 curated presets and extensive customization options with real-time preview. All data (including uploaded images) will be stored in a single SQLite database file. + +**Key Concept:** This codebase IS the shop (like WordPress is one site). Multiple users can manage it, but there's only one shop/site per deployment. + +## Core Architectural Decisions + +### 1. Database Storage Strategy +- **Images as BLOBs in SQLite** - Complete self-containment in single database file +- **Application-level settings** - NO Shop model, just Settings tables for the site +- **Multiple admin users** - Any authenticated user can manage theme (no ownership model) +- **SVG stored as both BLOB and TEXT** - Enable recoloring feature + +### 2. CSS Architecture +- **Three-layer CSS system** using Custom Properties: + - Layer 1: Primitives (static) - spacing, fonts, radii + - Layer 2: Theme tokens (dynamic) - generated from settings + - Layer 3: Semantic aliases (static) - friendly variable names +- **Inline `