feat: add Settings and Media contexts with theme settings schema

- Create settings table for site-wide key-value configuration
- Create images table for BLOB storage of logo/header images
- Add Setting schema with JSON/string/integer/boolean support
- Add ThemeSettings embedded schema with all theme options
- Add Settings context with get/put/update operations
- Add Media context for image uploads and retrieval
- Add Image schema with SVG detection and storage
- Add 9 curated theme presets (gallery, studio, boutique, etc.)
- Add comprehensive tests for Settings and Media contexts
- Add seeds with default Studio preset
- All tests passing (29 tests, 0 failures)
This commit is contained in:
2025-12-30 21:35:52 +00:00
parent bb4633895c
commit a401365943
13 changed files with 7508 additions and 0 deletions

View File

@@ -9,3 +9,12 @@
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.
alias SimpleshopTheme.Settings
# Set default theme settings (Studio preset)
IO.puts("Setting up default theme settings...")
{:ok, _theme} = Settings.apply_preset(:studio)
IO.puts("✓ Default theme settings applied (Studio preset)")