Handcrafted Crystal Jewelry | Made in Winnipeg, Canada
π Website: trovesandcoves.ca | ποΈ Etsy: Shop on Etsy | π§ Email: info@trovesandcoves.ca
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 | Purpose | Protection | Deployment |
|---|---|---|---|
feat/* |
Feature development | None | No |
main |
Integration branch | None | No |
prod |
Production source | Protected | Yes (GitHub Pages) |
Workflow Rules:
- Create feature branches from
main:git checkout -b feat/thing main - Develop and test locally
- Push to
mainwhen ready:git checkout main && git merge feat/thing - CI runs tests on
mainpush - 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.
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
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
# 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 previewAutomatic:
- Push to
prodbranch β triggers GitHub Actions - Build runs:
npm run build - Output uploaded to GitHub Pages
- Live at https://trovesandcoves.ca
Manual cache purge:
gh workflow run purge-cache.yml| 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 |
Before Making Changes:
- Read this file β Understand the workflow and branch strategy
- Check existing patterns β Look at similar components before creating new ones
- Test locally β Run
npm run devand verify your changes work - 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:
- Immediately revert the offending commit
- Document what went wrong
- Fix on a feature branch
- Test thoroughly before re-deploying
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:
- Create component in
client/src/pages/ - Add route in
client/src/App.tsx
| 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 |
CLAUDE.mdβ Project-specific guidance for AI agents.github/workflows/β CI/CD configurationscripts/β Build and deployment utilities
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
- 14k gold-plated wire and components
- Natural quartz, amethyst, obsidian, and more
- Nickel-free and skin-friendly
- Durable construction meant to last
- Facebook: Troves & Coves
- Instagram: @troves_and_coves
- Linktree: linktr.ee/TrovesAndCoves
Β© 2026 Troves & Coves. All rights reserved.