23
Complete Modules
58
Domain Entities
32+
App Services
110+
API Endpoints

Module Categories

graph TD A[Shirinzad Platform] --> B[Core E-Commerce] A --> C[Customer Experience] A --> D[Content Management] A --> E[Infrastructure] B --> B1[Product Catalog] B --> B2[Shopping Cart] B --> B3[Order Management] B --> B4[Payment Processing] B --> B5[Shipping & Delivery] C --> C1[Reviews & Ratings] C --> C2[Wishlist & Comparison] C --> C3[User Profiles] C --> C4[Notifications] D --> D1[Blog] D --> D2[CMS Pages] D --> D3[File Storage] E --> E1[Caching] E --> E2[Audit Logging] E --> E3[Email Service] E --> E4[Health Monitoring]

1. Product Catalog Management

Overview

Comprehensive product management system with support for variants, categories, brands, and advanced features.

Entities (7)

  • Product: Main product entity with rich business logic
  • ProductVariant: Product variations (size, color, etc.)
  • ProductSpecification: Technical specifications
  • ProductGallery: Multiple product images
  • Category: Hierarchical product categories
  • Brand: Product manufacturers/brands
  • Tag: Product tags for categorization

Key Features

  • Hierarchical categories (unlimited depth)
  • Multi-category products
  • Product tagging system
  • Image gallery with thumbnails
  • Inventory management (stock tracking)
  • Low-stock alerts
  • Featured products
  • Discount pricing with percentage calculation
  • Product ratings (automatic aggregation)
  • View count tracking
  • SEO optimization (slug, meta tags)
  • Product dimensions and weight
  • Sales count tracking

Business Logic Methods

// Inventory Management
product.UpdateStock(newQuantity);
product.DecreaseStock(quantity);
product.IncreaseStock(quantity);

// Stock Status
bool inStock = product.IsInStock();
bool lowStock = product.IsLowStock();

// Pricing
decimal effectivePrice = product.GetEffectivePrice();
decimal discount = product.GetDiscountPercentage();

// Sales Tracking
product.IncrementSalesCount();
product.IncrementViewCount();

API Endpoints

15 endpoints: GET /api/app/product, POST /api/app/product, etc.

View API Details →

2. Shopping Cart & Checkout

Overview

Full-featured shopping cart with session support for guest users and persistent carts for authenticated users.

Entities (2)

  • Cart: Shopping cart with user/session tracking
  • CartItem: Individual cart items with quantity

Key Features

  • Session-based cart for guest users
  • Persistent cart for authenticated users
  • Add/update/remove items
  • Quantity validation against stock
  • Cart expiration (30 days)
  • Discount code application
  • Real-time total calculation
  • Cart abandonment tracking
  • Multi-step checkout process
  • Stock reservation during checkout

Business Rules

  • Automatic stock validation on add/update
  • Price recalculation on cart changes
  • Discount validation and application
  • Cart expiry cleanup (background job)
  • Maximum 100 items per cart

API Endpoints

8 endpoints: GET /api/app/cart/my-cart, POST /api/app/cart/add-item, etc.

View API Details →

3. Order Management

Overview

Complete order lifecycle management from creation to delivery, with status tracking and order history.

Entities (3)

  • Order: Main order entity with comprehensive tracking
  • OrderItem: Individual order line items
  • OrderStatusHistory: Status change audit trail

Order Lifecycle

graph LR A[Pending] --> B[Confirmed] B --> C[Processing] C --> D[Shipped] D --> E[Delivered] A -.-> F[Cancelled] B -.-> F C -.-> F E -.-> G[Refunded]

Key Features

  • Unique order number generation (ORD-YYYYMMDD-####)
  • 7 order states with transitions
  • Customer information capture
  • Shipping address integration
  • Payment method selection
  • Order status updates with timestamps
  • Order cancellation support
  • Order history for customers
  • Admin order management
  • Customer notes
  • Denormalized data for performance
  • Stock reservation on order creation

API Endpoints

12 endpoints: GET /api/app/order/my-orders, POST /api/app/order/{id}/cancel, etc.

View API Details →

4. Payment Processing

Overview

Flexible payment processing system supporting multiple payment methods and gateways.

Entities (2)

  • Payment: Payment transaction records
  • PaymentMethod: Available payment methods

Payment Methods

  • ZarinPal (Iranian payment gateway)
  • Cash on Delivery
  • Bank Transfer
  • Credit Card (ready for integration)

Payment States

State Description
Pending Payment initiated, awaiting confirmation
Completed Payment successful
Failed Payment failed
Refunded Payment refunded to customer

Key Features

  • Multiple payment methods
  • Payment gateway abstraction
  • Payment status tracking
  • Transaction ID logging
  • Amount verification
  • Payment confirmation
  • Refund support
  • Payment method CRUD (admin)

API Endpoints

5 endpoints: POST /api/app/payment/initiate, POST /api/app/payment/verify, etc.

5. Shipping & Delivery

Overview

Comprehensive shipping management with multiple carriers and tracking support.

Entities (2)

  • Shipment: Shipment records with tracking
  • ShippingMethod: Available shipping options

Shipping Methods

  • Standard: 3-5 business days
  • Express: 1-2 business days
  • Same Day: Within 24 hours (major cities)

Key Features

  • Multiple shipping methods
  • Shipping cost calculation (weight-based)
  • Tracking number management
  • Delivery status tracking
  • Estimated delivery dates
  • Carrier information
  • Shipping address validation

API Endpoints

6 endpoints: GET /api/app/shipping-method/active, POST /api/app/shipment/track, etc.

6. Discounts & Promotions

Overview

Flexible discount system with support for various promotion types and usage rules.

Entities (1)

  • Discount: Discount codes and rules

Discount Types

  • Percentage: Discount by percentage (e.g., 10% off)
  • Fixed Amount: Fixed discount (e.g., 50,000 Toman off)

Key Features

  • Discount codes (alphanumeric)
  • Percentage and fixed amount discounts
  • Date-based activation/expiration
  • Usage limits (total and per-user)
  • Minimum order amount requirements
  • User-specific discounts
  • Active/inactive status
  • Discount validation logic

Business Rules

// Discount Validation
bool isValid = discount.IsValid();
bool isExpired = discount.IsExpired();
bool isUsageLimitReached = discount.HasReachedUsageLimit();
bool meetsMinimumAmount = orderTotal >= discount.MinimumOrderAmount;

// Discount Calculation
decimal discountAmount = discount.CalculateDiscountAmount(orderTotal);

API Endpoints

5 endpoints: POST /api/app/discount/validate, GET /api/app/discount/active, etc.

7. Product Reviews & Ratings

Overview

Complete review system with approval workflow, replies, likes, and image uploads.

Entities (4)

  • ProductReview: Customer product reviews
  • ReviewReply: Admin/seller replies to reviews
  • ReviewLike: Helpful/not helpful votes
  • ReviewImage: Review photos uploaded by customers

Key Features

  • 5-star rating system
  • Review approval workflow (admin moderation)
  • Verified purchase badges
  • Like/dislike functionality (helpful votes)
  • Admin/seller replies
  • Featured reviews
  • Review images (multi-upload)
  • Automatic product rating aggregation
  • Review sorting (helpful, recent, rating)
  • Customer name and email capture

Review Workflow

graph LR A[Customer Writes Review] --> B[Pending Approval] B --> C{Admin Reviews} C -->|Approve| D[Published] C -->|Reject| E[Rejected] D --> F[Admin Can Reply] D --> G[Customers Can Like]

API Endpoints

8 endpoints: GET /api/app/product-review/by-product/{id}, POST /api/app/product-review, etc.

8. Wishlist System

Overview

Advanced wishlist functionality with multiple lists, priorities, and sharing capabilities.

Entities (2)

  • Wishlist: Customer wishlists
  • WishlistItem: Products in wishlists

Key Features

  • Multiple wishlists per user
  • Default wishlist auto-creation
  • Public/private wishlists
  • Priority levels (High, Medium, Low)
  • Notes for wishlist items
  • Share wishlist functionality
  • Add to cart from wishlist
  • Price drop notifications (prepared)

Priority Levels

Level Value Description
Low 1 Items user might buy someday
Medium 2 Items user wants to buy
High 3 Items user plans to buy soon

API Endpoints

7 endpoints: GET /api/app/wishlist/my-wishlists, POST /api/app/wishlist/add-item, etc.

Additional Modules (9-23)

9. Product Comparison

Entities: ComparisonList, ComparisonItem

Category-based product comparison with limit of 4 items. Guest user support with session-based storage.

API Endpoints: 5

10. Notification System

Entities: Notification, NotificationSettings, NotificationTemplate

14 notification types with multi-channel delivery (in-app, email, SMS, push). Template system with placeholders.

API Endpoints: 12

11. File Storage

Entities: FileUpload

9 file categories with metadata tracking. Public/private access control, CDN integration ready.

API Endpoints: 6

12. User Management

Entities: UserProfile, UserAddress

Extended user profiles with multiple addresses, loyalty points, and notification preferences.

API Endpoints: 12

13. Advanced Search

Service: ProductSearchAppService

Full-text search with multi-criteria filtering, dynamic faceting, and price range aggregation.

API Endpoints: 3

14. Configuration Management

Entity: ShirinzadConfig

Site settings, contact information, social media links, and business hours with caching support.

API Endpoints: 4

15. Reporting & Analytics

Services: ReportAppService, DashboardAppService

Comprehensive dashboard with sales reports, product performance, and customer insights.

API Endpoints: 9

16. Blog System

Entities: Post, PostCategory, Comment

Full blogging platform with categories, comments, and SEO optimization.

API Endpoints: 8

17. Automotive Module

Entities: Vehicle, Make, Model, Part, Service

Specialized automotive e-commerce features for parts and services.

API Endpoints: 10

18. CMS

Entities: Page, Menu, Slider, FAQ, Video

Content management system for static pages, menus, sliders, and FAQs.

API Endpoints: 12

19. Caching Service

Service: CacheService, CacheInvalidationService

Redis-based distributed caching with 30+ cache key patterns and smart invalidation.

Cache Keys: 30+

20. Audit Logging

Entity: AuditLog

Complete audit trail for all user actions with IP tracking and request/response logging.

Tracked Actions: All CRUD operations

21. Email Service

Service: EmailNotificationService

Template-based email system with 8 predefined templates and placeholder replacement.

Templates: 8

22. Health Monitoring

Service: ShopHealthCheckService

Database connectivity checks, query performance monitoring, and system statistics.

Endpoints: 3

23. Rate Limiting

Service: RateLimitService

Distributed cache-based rate limiting with IP, user, and endpoint-specific limits.

Protection Levels: Per IP, Per User, Per Endpoint

Module Statistics

Module Entities Services API Endpoints Status
Product Catalog 7 5 15 Complete
Shopping Cart 2 1 8 Complete
Order Management 3 1 12 Complete
Payment Processing 2 1 5 Complete
Shipping & Delivery 2 1 6 Complete
Reviews & Ratings 4 1 8 Complete
All Other Modules 38 20+ 56 Complete
TOTAL 58 32+ 110+ 100%

Related Documentation