December 31st 2024
Sahseh - Technical Deep Dive into MENA's Leading Discount Platform
A technical analysis of Sahseh's architecture, implementation, and the technologies powering this modern e-commerce platform.
Introduction
Sahseh is a sophisticated e-commerce platform built on modern web technologies, designed to handle complex discount code operations at scale. Launched in 2019, the platform implements advanced algorithms for real-time coupon validation and application, serving the MENA region through a distributed architecture.
Technical Architecture
Frontend Architecture
The frontend is built on Vue.js 3 with Nuxt.js, implementing a robust component-based architecture:
-
State Management: Pinia for predictable state mutations
-
Routing: Vue Router with dynamic route handling
-
UI Framework: TailwindCSS for utility-first styling
-
Internationalization: Nuxt i18n module for Arabic/English support
-
Performance: Implements lazy loading and component hydration
-
API Integration: RESTful endpoints with JSON:API specification
Core Features Implementation
-
Coupon Engine
The platform’s core functionality is powered by:
- Real-time validation system for coupon codes
- Asynchronous processing of discount calculations
- Rate limiting and abuse prevention mechanisms
- Caching layer for frequently accessed codes
- Automated expiry handling and cleanup
-
Multi-Platform Integration
Cross-platform compatibility achieved through:
- Progressive Web App (PWA) implementation
- Native bridge for mobile applications
- Browser extension utilizing content scripts
- Shared core logic across platforms
- WebSocket connections for real-time updates
-
Performance Optimizations
- Implemented code splitting and lazy loading
- Asset optimization and CDN distribution
- Service Worker for offline capabilities
- Memory-efficient state management
- Optimized database queries and indexing
Technical Stack Details
Frontend Technologies
-
Vue.js 3 with Composition API
-
Nuxt 3 for SSR capabilities
-
TailwindCSS for styling
-
Vite for development and building
-
TypeScript for type safety
Development Tools
-
ESLint for code quality
-
Prettier for code formatting
-
Husky for git hooks
-
Jest for unit testing
-
Cypress for E2E testing
Performance Metrics
The platform maintains high performance standards:
-
First Contentful Paint (FCP): < 1.5s
-
Time to Interactive (TTI): < 3.5s
-
Core Web Vitals compliance
-
90+ PageSpeed Insights score
-
99.9% uptime SLA
System Architecture
Microservices
The platform utilizes a microservices architecture:
-
Auth Service: JWT-based authentication
-
Coupon Service: Discount code management
-
User Service: Profile and preferences
-
Analytics Service: Usage tracking
-
Notification Service: Real-time alerts
Data Flow
-
Request Handling:
- Load balancing
- Request validation and sanitization
- Rate limiting implementation
- CORS and security headers
-
Processing Pipeline:
- Coupon validation algorithms
- Real-time availability checks
- Fraud detection systems
- Cache layer integration
Development Workflow
The development process follows industry best practices:
-
Gitflow workflow
-
CI/CD pipeline with automated testing
-
Feature flags for gradual rollouts
-
A/B testing capabilities
-
Automated deployment strategies
Conclusion
Sahseh represents a technically sophisticated implementation of a modern coupon and savings platform. Its architecture balances performance, scalability, and maintainability while serving millions of users across the MENA region.