A South African men's apparel store on Spree 5.6 + Next.js 15. 160 products
live, three markets, live Malaysian courier rates, customer-owned carts.
What is here:
storefront/ the Next.js app
backend/ ONLY the custom Spree code. Spree itself is a prebuilt image
that mounts no app code, so every file here needs an explicit
volume entry in docker-compose.yml or it is silently ignored.
catalogue/ the scripts that loaded and maintain the products
docs/ manifest, mock registry, napkins
Real .env files are committed deliberately. This lives on the house's private
Gitea, and a clone that runs beats a clone that needs a secrets handover.
LANDMINE.md maps every key, what it opens, and what must be rotated before this
repo goes anywhere less private.
The admin API key used to be a literal in six catalogue scripts. They now read
SPREE_ADMIN_KEY from the environment and refuse to run without it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
18 lines
638 B
Ruby
18 lines
638 B
Ruby
# Image Studio — custom admin page for the Photoroom pipeline.
|
|
#
|
|
# Delivered as bind-mounted files rather than a rebuilt image: this deployment
|
|
# runs the prebuilt ghcr.io/spree/spree image with no app code mounted, so any
|
|
# custom file needs an explicit mount in docker-compose.yml. See the web
|
|
# service's volumes block.
|
|
|
|
# Routes live in config/routes.rb — see the note there.
|
|
|
|
Rails.application.config.after_initialize do
|
|
Spree.admin.navigation.sidebar.add :image_studio,
|
|
label: 'Image Studio',
|
|
url: :admin_image_studio_path,
|
|
icon: 'photo',
|
|
position: 35,
|
|
active: -> { controller_name == 'image_studio' }
|
|
end
|