Skip to content

Claude/headless woocommerce setup 011 c ut fa di rc brr eay td whoe#17

Open
mattbylett wants to merge 6 commits intodiet103:mainfrom
mattbylett:claude/headless-woocommerce-setup-011CUtFaDiRcBrrEayTdWhoe
Open

Claude/headless woocommerce setup 011 c ut fa di rc brr eay td whoe#17
mattbylett wants to merge 6 commits intodiet103:mainfrom
mattbylett:claude/headless-woocommerce-setup-011CUtFaDiRcBrrEayTdWhoe

Conversation

@mattbylett
Copy link
Copy Markdown

No description provided.

This commit adds a production-ready Next.js eCommerce template with comprehensive
infrastructure for building maintainable eCommerce applications.

Key Features:
- Complete design token system (CSS custom properties)
- 6 foundational components (Button, Card, Input, Form, Modal, Table)
- WooCommerce REST API integration with type-safe client
- Stripe payment integration
- Example products feature demonstrating all patterns
- Custom Claude Code skill for pattern enforcement
- Full TypeScript coverage with strict typing
- CSS Modules with design token enforcement
- Features-first architecture for scalability

Core Principles Enforced:
- DRY (Don't Repeat Yourself)
- SRP (Single Responsibility Principle)
- NO inline styles - all styling through Component.module.css
- Design tokens only - no hardcoded colors/spacing/values

Components Created:
- Button: 5 variants, 3 sizes, loading states, full accessibility
- Card: Flexible layout with header/body/footer sections
- Input: Text/email/password/textarea with validation & icons
- Form: Structured forms with error handling
- Modal: Accessible dialogs with focus trapping
- Table: Sortable, responsive data tables

Integration Libraries:
- WooCommerce client (src/lib/woocommerce/)
- Stripe client (src/lib/stripe/)
- Complete TypeScript type definitions

Documentation:
- Comprehensive README with examples
- Quick start SETUP_GUIDE
- Claude Code skill with detailed patterns
- Inline documentation throughout

Configuration:
- TypeScript with strict checking
- ESLint + Prettier
- Next.js 14 with App Router
- Path aliases for clean imports

This template provides everything needed to start a new Next.js + WooCommerce
eCommerce project with enforced best practices from day one.
- skill-rules.json: Defines triggers for auto-activation
- README.md: Explains how skills work and usage
- Enables automatic enforcement without manual reminders
Demonstrates what happens when user asks: 'Create a filter system for the shop sidebar'

Created Components:
- FilterSidebar.tsx - Fully featured filter component
- FilterSidebar.module.css - Design token-based styling
- FilterSidebar.example.tsx - Usage demonstration
- filters.ts - TypeScript type definitions

Pattern Adherence (Enforced by Skill):
✅ NO inline styles - all via .module.css
✅ Design tokens only - every value from tokens.css
✅ TypeScript with full JSDoc documentation
✅ React.FC pattern with proper interfaces
✅ Accessibility features (ARIA labels, keyboard nav)
✅ Responsive design using design token breakpoints
✅ Clean component structure

Features Implemented:
- Expandable/collapsible filter groups
- Price range slider with inputs
- Checkbox filters with counts
- Active filter display with removal
- Clear all functionality
- Keyboard navigation support
- Mobile responsive design
- Beautiful spacing and typography using tokens

This is exactly what the skill produces automatically.
Created three key documents for skill management:

1. SKILLS_ROADMAP.md (17 Planned Skills):
   Essential: API routes, error handling, notifications
   High: Cart/checkout, auth, form validation
   Medium: Testing, middleware, email, data fetching
   Low: Performance, security, SEO, i18n, analytics

2. HOW_TO_ADD_SKILLS.md:
   Complete guide for implementing skills
   Two methods: Ask Claude vs DIY
   Configuration options and examples

3. Updated README.md with documentation links

Allows incremental skill implementation as needed.
@mattbylett
Copy link
Copy Markdown
Author

Adding Framework For New Site

@mattbylett mattbylett closed this Nov 7, 2025
@mattbylett mattbylett reopened this Nov 7, 2025
@mattbylett mattbylett closed this Nov 7, 2025
@mattbylett mattbylett reopened this Nov 7, 2025
This patch contains all changes for the complete template.

To apply on your local machine:
1. Download this patch file
2. Run: git apply nextjs-ecommerce-template.patch
3. The nextjs-ecommerce-template directory will appear
Extract with: tar -xzf NEXTJS_ECOMMERCE_TEMPLATE.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants