Skip to content

reverb256/trovesandcoves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

456 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Troves & Coves

Handcrafted Crystal Jewelry | Made in Winnipeg, Canada

Live Site Portfolio Etsy


Quick Start

🌐 Website: trovesandcoves.ca | πŸ›οΈ Etsy: Shop on Etsy | πŸ“§ Email: info@trovesandcoves.ca


Developer Documentation

Overview

This is a production e-commerce showcase for Troves & Coves, a Winnipeg-based handcrafted crystal jewelry business. The site is built as a static React application deployed to GitHub Pages.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        WORKFLOW                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  FEAT   β”‚ ───▢│  MAIN   β”‚ ───▢│  PROD   β”‚ ───▢│  LIVE    β”‚  β”‚
β”‚  β”‚ Branch  β”‚     β”‚ Branch  β”‚     β”‚ Branch  β”‚     β”‚   Site   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚              β”‚               β”‚                            β”‚
β”‚       β–Ό              β–Ό               β–Ό                            β”‚
β”‚   Feature work    Tests pass     Protected                      β”‚
β”‚   experiments     CI/CD runs     No merge commits               β”‚
β”‚   can break       Lint checks    Cherry-pick only               β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Branch Strategy

Branch Purpose Protection Deployment
feat/* Feature development None No
main Integration branch None No
prod Production source Protected Yes (GitHub Pages)

Workflow Rules:

  1. Create feature branches from main: git checkout -b feat/thing main
  2. Develop and test locally
  3. Push to main when ready: git checkout main && git merge feat/thing
  4. CI runs tests on main push
  5. For production: Cherry-pick commits to prod (protected branch)

Why cherry-pick? The prod branch is protected with:

  • ❌ No merge commits
  • ❌ No force-push
  • βœ… Only fast-forward or cherry-pick

This keeps production history linear and traceable.

Tech Stack

Frontend Framework:  React 18 + TypeScript
Build Tool:          Vite 5
Styling:            Tailwind CSS + CSS variables for theming
Component Library:  shadcn/ui (Radix UI primitives)
Icons:              lucide-react
Routing:            Wouter (lightweight alternative to React Router)
State Management:   Zustand (cart) + React Context (theme)
Forms:              React Hook Form + Zod validation
Animations:         Framer Motion
PWA:                VitePWA (service worker, manifest)
Testing:            Vitest + Playwright
Hosting:            GitHub Pages

Project Structure

trovesandcoves/
β”œβ”€β”€ client/                          # React application source
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/                # shadcn/ui primitives
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.tsx         # Site navigation
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.tsx         # Site footer
β”‚   β”‚   β”‚   β”œβ”€β”€ ProductCard.tsx    # Product display
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ pages/                 # Route components
β”‚   β”‚   β”œβ”€β”€ lib/                   # Utilities (API, store, theme)
β”‚   β”‚   β”œβ”€β”€ hooks/                 # Custom React hooks
β”‚   β”‚   └── main.tsx               # App entry point
β”‚   β”œβ”€β”€ public/                    # Static assets
β”‚   └── index.html                 # HTML template
β”œβ”€β”€ scripts/                       # Build/deployment scripts
β”‚   β”œβ”€β”€ postbuild-copy.cjs         # Creates CNAME, 404.html
β”‚   └── generate-sitemap.ts        # SEO sitemap generation
β”œβ”€β”€ .github/workflows/             # CI/CD
β”‚   β”œβ”€β”€ deploy.yml                 # Deploy to GitHub Pages
β”‚   β”œβ”€β”€ main.yml                   # Test on main branch
β”‚   └── purge-cache.yml            # Cloudflare cache purge
β”œβ”€β”€ package.json                   # Dependencies
β”œβ”€β”€ vite.config.ts                 # Vite configuration
└── tailwind.config.js             # Tailwind configuration

Local Development

# Install dependencies
npm install

# Start dev server (http://localhost:5173)
npm run dev

# Run type checking
npm run check

# Run linter
npm run lint

# Run tests
npm run test

# Build for production
npm run build

# Preview production build
npm run preview

Deployment

Automatic:

  1. Push to prod branch β†’ triggers GitHub Actions
  2. Build runs: npm run build
  3. Output uploaded to GitHub Pages
  4. Live at https://trovesandcoves.ca

Manual cache purge:

gh workflow run purge-cache.yml

Key Architectural Decisions

Decision Rationale
Static React over SSR Simple hosting (GitHub Pages), fast edge caching, no server costs
Wouter over React Router Smaller bundle, hooks-based API, sufficient for simple routing
Zustand over Redux Minimal boilerplate, great for simple cart state
shadcn/ui Copy-paste components, full control over styling, no npm bloat
CSS Variables for theming Runtime theme switching without rebuild, system preference detection
Client-side cart only Checkout through Etsy β€” no payment processing, no backend needed
VitePWA Simple PWA setup, automatic service worker generation

Accountability Structure

Before Making Changes:

  1. Read this file β€” Understand the workflow and branch strategy
  2. Check existing patterns β€” Look at similar components before creating new ones
  3. Test locally β€” Run npm run dev and verify your changes work
  4. Run checks β€” npm run check && npm run lint && npm run test

Commit Guidelines:

<type>: <description>

Types: feat, fix, chore, docs, refactor, perf, test

Examples:
- feat: add product search functionality
- fix: resolve mobile navigation bug
- chore: update dependencies
- docs: add deployment instructions

Code Review Checklist:

  • No console errors or warnings
  • No broken links (test navigation)
  • Mobile responsive (test at 375px, 768px, 1024px)
  • Theme toggle works (light/dark)
  • Cart functionality intact
  • No new console errors
  • Linting passes (npm run lint)
  • Type checking passes (npm run check)

Breaking the Production Site:

If you break production:

  1. Immediately revert the offending commit
  2. Document what went wrong
  3. Fix on a feature branch
  4. Test thoroughly before re-deploying

Common Tasks

Add a new product: Edit client/src/lib/products.ts β€” products are statically defined.

Change colors/styles: Modify client/src/lib/theme.tsx for theme variables, or component-specific CSS.

Update SEO: Edit client/src/components/SEOHead.tsx for meta tags, scripts/generate-sitemap.ts for sitemap.

Add a new page:

  1. Create component in client/src/pages/
  2. Add route in client/src/App.tsx

Troubleshooting

Issue Solution
Build fails on prod Check scripts/ directory β€” required: postbuild-copy.cjs, generate-sitemap.ts
Changes not visible Purge cache: gh workflow run purge-cache.yml
Route returns 404 Check 404.html exists in build output (created by postbuild-copy.cjs)
Theme not persisting Check localStorage is enabled in browser
Images not loading Verify paths are in client/public/ and referenced correctly

Documentation Files

  • CLAUDE.md β€” Project-specific guidance for AI agents
  • .github/workflows/ β€” CI/CD configuration
  • scripts/ β€” Build and deployment utilities

Customer-Facing Information

About Troves & Coves

Every piece is:

  • Handmade with attention to detail
  • Crafted in Canada (Winnipeg, Manitoba)
  • Made with authentic crystals β€” ethically sourced
  • Designed for meaning β€” each stone has its own energy

Materials

  • 14k gold-plated wire and components
  • Natural quartz, amethyst, obsidian, and more
  • Nickel-free and skin-friendly
  • Durable construction meant to last

Social Media


Β© 2026 Troves & Coves. All rights reserved.

About

Handcrafted crystal jewelry showcase site | Made in Winnipeg, Canada

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors