notque/vexjoy-agent / skills/frontend/frontend
frontend
UnverifiedFrontend: UI design, distinctive visual styles, HTML artifacts, Three.js 3D, TypeScript/React/Next.js apps, e-commerce, portfolios, React Native, web performance.
references/nextjs-ecommerce/expertise.md
View on GitHub# Next.js E-commerce Expertise
Loaded on demand; `../nextjs-ecommerce.md` holds the hard rules.
## Deep Expertise
- **Next.js E-commerce Architecture**: App Router (Server/Client Components, Server Actions), API routes for webhooks, hybrid cart/checkout flows
- **Payment Processing**: Stripe Payment Intents, webhooks, customer management, subscription billing, PCI compliance
- **Database & State**: Prisma transactions, products/orders/customers relationships, cart persistence (localStorage + DB), inventory tracking
- **Authentication & Security**: NextAuth.js, role-based access (admin/customer), protected routes, HTTPS enforcement
- **E-commerce Features**: Product catalogs (search/filter), inventory management, checkout flows, order lifecycle, admin dashboards
Priorities:
1. **Security** - PCI compliance, Stripe tokens only, HTTPS, no sensitive data in client
2. **Type safety** - Zod schemas for payment/order data, Prisma types, TypeScript strict mode
3. **Server Components** - RSC for product listings, order history, analytics
4. **Cart persistence** - localStorage for guests, database for authenticated users
5. **Payment reliability** - Idempotent webhooks, order status tracking, transaction rollback
## Default Behaviors (ON unless disabled)
- **Communication Style**: Fact-based, concise, show code and outputs, no self-congratulation.
- **Temporary File Cleanup**: Remove test checkout flows, mock Stripe data, dev scripts at completion.
- **Cart Persistence**: localStorage (guests) or database (authenticated users).
- **Price Formatting**: `Intl.NumberFormat` for localization.
- **Product Image Optimization**: `next/image` with responsive sizes and lazy loading.
- **SEO Metadata**: JSON-LD structured data and Open Graph tags.
## Optional Behaviors (OFF unless enabled)
- **Multi-Currency Support**: Only when international sales are explicitly requested
- **Inventory Synchronization**: Only when external warehouse integration exists
- **Subscription Billing**: Only when recurring payments are requested
- **Abandoned Cart Emails**: Only when email automation is configured
## Capabilities & Limitations
### In scope
- **Shopping carts**: add/remove/update, quantity validation, persistence (localStorage + DB), cross-device sync
- **Stripe integration**: Payment Intents, webhooks, customer management, subscription billing
- **Checkout flows**: multi-step forms, guest checkout, Zod-validated addresses, payment method management
- **Product catalogs**: Server Component listings, search/filter (URL state), image galleries, SEO metadata
- **Admin dashboards**: product CRUD, order management, inventory tracking, analytics, RBAC
- **Authentication**: NextAuth.js (email/password, OAuth), protected routes, customer profiles
### Out of scope
- **UI/UX design** (load `../ui-design.md`)
- **Marketing copy** (use the `writing` skill)
- **Non-Stripe payments** (PayPal, Square require different patterns)
- **Complex tax logic** (use TaxJar/Avalara)
## Output Format
Use the **Implementation Schema**.
**Phase 1: ANALYZE**
- Identify e-commerce components needed (cart, checkout, products, orders, admin)
- Determine data models (Product, Order, Customer, CartItem)
- Plan Stripe integration points (Payment Intents, webhooks)
**Phase 2: DESIGN**
- Design database schema (Prisma models with relationships)
- Design checkout flow (multi-step vs single-page)
- Plan cart persistence strategy (localStorage + database sync)
**Phase 3: IMPLEMENT**
- Create Prisma models and migrations
- Implement cart components (Server/Client split)
- Integrate Stripe Payment Intents and webhooks
- Build admin dashboard with CRUD operations
**Phase 4: VALIDATE**
- Test checkout flow end-to-end
- Verify webhook handling (use Stripe CLI for local testing)
- Validate inventory tracking (prevent overselling)
- Check security (no sensitive data in client, HTTPS)
**Final Output**:
```
═══════════════════════════════════════════════════════════════
E-COMMERCE IMPLEMENTATION COMPLETE
═══════════════════════════════════════════════════════════════
Components Implemented:
- Shopping cart (persistent, quantity validation)
- Stripe checkout (Payment Intents + webhooks)
- Product catalog (search, filter, SEO)
- Order management (status tracking, admin dashboard)
- User authentication (NextAuth.js)
Database:
- Prisma models: Product, Order, Customer, CartItem
- Migrations applied
Security:
- Type-safe checkout (Zod validation)
- No credit card storage (Stripe tokens only)
- HTTPS enforcement
- Webhook idempotency
Testing:
- Stripe test mode configured
- Webhook endpoint: /api/webhooks/stripe
- Test: stripe listen --forward-to localhost:3000/api/webhooks/stripe
═══════════════════════════════════════════════════════════════
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |