Skip to content

πŸ›οΈ Enterprise-scale e-commerce platform with microservices architecture. Handles 2K+ TPS with sub-100ms latency using Redis caching, optimized databases, and Elasticsearch search.

License

Notifications You must be signed in to change notification settings

mmerlyn/shop-sphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ shop-sphere

ShopSphere is a modern e-commerce platform designed for scale and performance. Built with a distributed microservices architecture to handle high traffic and provide seamless shopping experiences.

Status Architecture Performance

Key Features

  • Microservices Architecture - 3/8 services completed with robust separation
  • Complete Authentication - JWT-based auth with role-based access control
  • Advanced Product Catalog - MongoDB-powered search with 34 API endpoints
  • Smart Shopping Cart - Redis-backed cart with guest/user support
  • Multi-Database Strategy - PostgreSQL + MongoDB + Redis optimization
  • Containerized Development - Docker Compose with full infrastructure

Tech Stack

Backend Framework

  • NestJS + TypeScript - Enterprise-grade Node.js framework
  • Prisma ORM - Type-safe database access for PostgreSQL
  • Mongoose - MongoDB object modeling
  • ioredis - High-performance Redis client

Databases & Storage

  • PostgreSQL - User authentication & cart analytics
  • MongoDB - Product catalog with advanced search indexing
  • Redis - Shopping cart storage & session management
  • RabbitMQ - Message queuing

Microservices

βœ… Completed Services (4/8):

  • πŸ‘€ User Service - Complete authentication system with JWT, role-based access, profile management
  • πŸ“¦ Product Service - Advanced catalog with MongoDB search, categories, variants, 34 endpoints
  • πŸ›’ Cart Service - Redis-powered cart with guest support, coupon system, real-time calculations
  • πŸ›οΈ Order Service - Order processing & tracking

πŸ—οΈ In Development (4/8):

  • πŸ” Search Service - Enhanced Elasticsearch integration
  • πŸ“§ Notification Service - Email & SMS notifications
  • πŸ“Š Payment Service - Secure payment handling
  • 🌐 API Gateway - Request routing & rate limiting

Current Performance & Features

User Service Achievements

  • Complete Authentication Flow - Registration, login, JWT refresh
  • Role-based Access Control - Admin, user, guest permissions
  • Profile Management - Full user data management
  • Security Features - Password hashing, token validation

Product Service Achievements

  • 34 API Endpoints - Comprehensive product management
  • Advanced Search Engine - MongoDB text indexing with filters
  • Category Hierarchy - Multi-level product categorization
  • Product Variants - Size, color, stock management
  • SEO Optimization - URL slugs and metadata
  • Business Logic - Related products, brands, vendor support

Cart Service Achievements

  • 12 API Endpoints - Complete cart functionality
  • Redis Performance - Sub-millisecond cart operations
  • Guest Cart Support - Seamless anonymous shopping
  • Cart Merging - Guest to user cart conversion
  • Coupon System - Discount codes with business rules
  • Real-time Calculations - Tax, shipping, discounts
  • Product Integration - Live stock validation

Target Performance Metrics

  • API Latency: < 100ms average
  • Search Speed: 50ms average response (planned)
  • Database Operations: < 80ms CRUD operations
  • Throughput: 2,000+ transactions/second (target)
  • Scalability: Handles 1M+ product records

Contributing

This project is currently in active development. The core microservices are functional but the platform is not yet production-ready. Ideas for additional services? If you have suggestions for new microservices that would enhance this e-commerce platform, feel free to contribute! Open an issue or submit a pull request with your ideas.

Potential service ideas I am considering:

  • Review & Rating Service
  • Inventory Management Service
  • Recommendation Engine
  • Analytics & Reporting Service
  • Coupon & Promotion Service

Feel free to check back for updates

⭐ Star this repo if you find the microservices architecture interesting!

About

πŸ›οΈ Enterprise-scale e-commerce platform with microservices architecture. Handles 2K+ TPS with sub-100ms latency using Redis caching, optimized databases, and Elasticsearch search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages