Commit Graph

11 Commits

Author SHA1 Message Date
Unchained
84b85f5291 test: comprehensive test suite for Manoon storefront
Add complete testing infrastructure with Vitest:

Testing Stack:
- Vitest for unit/integration tests
- @testing-library/react for component tests
- @playwright/test for E2E (installed, ready to configure)
- MSW for API mocking

Test Coverage:
1. Webhook Handler Tests (src/__tests__/integration/api/webhooks/saleor.test.ts)
   - ORDER_CONFIRMED: Emails + analytics
   - ORDER_CREATED: No duplicates
   - ORDER_FULFILLED: Tracking info
   - ORDER_CANCELLED: Cancellation reason
   - ORDER_FULLY_PAID: Payment confirmation
   - Error handling (400/500 responses)
   - Currency handling (RSD preservation)

2. OrderNotificationService Tests
   - Email sending in all 4 languages (SR, EN, DE, FR)
   - Price formatting verification
   - Admin vs Customer templates
   - Address formatting
   - Tracking info handling

3. AnalyticsService Tests
   - Revenue tracking with correct currency
   - Duplicate prevention verification
   - Error handling (doesn't break flow)
   - Singleton pattern

4. Utility Tests
   - formatPrice: RSD, EUR, USD formatting
   - Decimal and zero handling

Fixtures:
- Realistic order data in src/__tests__/fixtures/orders.ts
- Multiple scenarios (with tracking, cancelled, etc.)

Scripts:
- npm test: Run tests in watch mode
- npm run test:run: Run once
- npm run test:coverage: Generate coverage report
- npm run test:e2e: Run Playwright tests

Coverage target: 80%+ for critical paths
2026-03-25 21:07:47 +02:00
Unchained
17367024c2 feat(analytics): add OpenPanel tracking to storefront
Add comprehensive OpenPanel analytics tracking:
- Install @openpanel/nextjs SDK
- Add OpenPanelComponent to root layout for automatic page views
- Create useAnalytics hook for tracking custom events
- Track checkout funnel: started, shipping step, order completed
- Track product views and add-to-cart events
- Identify users on order completion
- Add NEXT_PUBLIC_OPENPANEL_CLIENT_ID to environment
2026-03-25 18:48:13 +02:00
Unchained
5576946829 feat(emails): implement transactional email system with Resend
Some checks failed
Build and Deploy / build (push) Has been cancelled
- Add Resend email integration with @react-email/render
- Create email templates: OrderConfirmation, OrderShipped, OrderCancelled, OrderPaid
- Implement webhook handler for ORDER_CREATED and other events
- Add multi-language support for customer emails
- Admin emails in English with order details
- Update checkout page with auto-scroll on order completion
- Configure DASHBOARD_URL environment variable
2026-03-25 14:13:34 +02:00
Unchained
b8b3a57e6f feat: Add Saleor webhook handler with Resend email integration
- Add Resend SDK for transactional emails
- Create React Email templates for order events:
  - OrderConfirmation
  - OrderShipped
  - OrderCancelled
  - OrderPaid
- Multi-language support (SR, EN, DE, FR)
- Customer emails in their language
- Admin emails in English to me@hytham.me and tamara@hytham.me
- Webhook handler at /api/webhooks/saleor
- Supports: ORDER_CONFIRMED, ORDER_FULLY_PAID, ORDER_CANCELLED, ORDER_FULFILLED
- Add GraphQL mutation to create webhooks in Saleor
- Add Resend API key to .env.local
2026-03-25 10:10:57 +02:00
Unchained
93005af0a1 Remove playwright - testing tool only
Some checks failed
Build and Deploy / build (push) Has been cancelled
2026-03-21 17:26:46 +02:00
Unchained
0b4e3f89d1 Add playwright for visual testing 2026-03-21 17:25:45 +02:00
Unchained
1b733c63d5 feat(saleor): Phase 5 - Remove WooCommerce
- Remove @woocommerce/woocommerce-rest-api dependency
- Delete src/lib/woocommerce.ts
- Delete src/stores/cartStore.ts (replaced by saleorCheckoutStore)
- Clean up package.json dependencies
- Project now fully migrated to Saleor GraphQL API
2026-03-21 12:45:56 +02:00
Unchained
7b94537670 feat(saleor): Phase 1 - GraphQL Client Setup
- Add Apollo Client for Saleor GraphQL API
- Create GraphQL fragments (Product, Variant, Checkout)
- Create GraphQL queries (Products, Checkout)
- Create GraphQL mutations (Checkout operations)
- Add TypeScript types for Saleor entities
- Add product helper functions
- Install @apollo/client and graphql dependencies

Part of WordPress/WooCommerce → Saleor migration
2026-03-21 12:36:21 +02:00
Unchained
7d23176b6a Remove /en routes to fix build - using sr locale only 2026-03-06 16:24:06 +02:00
Unchained
9cd8b19787 Redesign homepage with moumoujus-inspired layout
- Add AnnouncementBar with marquee animation
- Add NewHero with floating product card
- Add StatsSection with large stat numbers
- Add FeaturesSection with icons
- Add TestimonialsSection with cards
- Add NewsletterSection with signup form
- Update Header styling for new design
- Update globals.css with marquee animations
- Update page.tsx to use new components

All existing WooCommerce functionality preserved
2026-03-06 16:05:50 +02:00
Neo
cbb49ba64f Working state: Serbian at root (/), English at /en, proper i18n structure 2026-03-04 08:48:37 +00:00