Download the PHP package mbsoft31/loyalty-rewards without Composer
On this page you can find all versions of the php package mbsoft31/loyalty-rewards. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mbsoft31/loyalty-rewards
More information about mbsoft31/loyalty-rewards
Files in mbsoft31/loyalty-rewards
Package loyalty-rewards
Short Description A flexible loyalty rewards system for PHP applications
License MIT
Informations about the package loyalty-rewards
๐ฏ Loyalty Rewards System
A comprehensive, enterprise-grade loyalty rewards system for PHP applications. Built with Domain-Driven Design principles, this package provides flexible point earning/redemption, fraud detection, audit logging, and multi-tier reward programs.
โจ Features
- ๐ Flexible Rewards Engine โ Category multipliers, tier bonuses, time-based promotions
- ๐ก๏ธ Built-in Fraud Detection โ Velocity checks, amount validation, suspicious activity alerts
- ๐ Complete Audit Trail โ Full transaction logging with compliance support
- โก High Performance โ Handles 1000+ transactions/second with optimized database queries
- ๐งช 100% Test Coverage โ Comprehensive test suite with unit, integration, and performance tests
- ๐ง Framework Agnostic โ Works with Laravel, Symfony, or standalone PHP applications
- ๐ Type Safe โ Full PHP 8.2+ type declarations with strict type checking
๐ Quick Start
Installation
composer require mbsoft31/loyalty-rewards
Basic Usage
๐๏ธ Architecture Overview
๐ก Real-World Examples
E-commerce Rewards Program
๐ง Configuration
Database Setup
Dependency Injection
Rules Configuration
๐งช Testing
The package includes comprehensive tests with 100% coverage:
Run all tests
Run specific test suites
Run with coverage report
Performance benchmarks
Test Results
- 71 tests passing
- 209 assertions
- Unit tests: Value objects, domain models, rules engine
- Integration tests: Database operations, service workflows
- Performance tests: High-volume transactions, memory efficiency
๐ Security & Fraud Detection
Built-in fraud detection with configurable rules:
Detection Methods:
- Velocity checking (transaction frequency)
- Amount anomaly detection
- Pattern recognition
- Account behavior analysis
๐ Performance
Benchmarked Performance:
- Single Transaction: < 100ms average
- Bulk Operations: 1000 transactions in < 10 seconds
- Memory Usage: < 50MB for 1000 transactions
- Database Queries: Optimized with proper indexing
Scalability Features:
- Connection pooling support
- Caching layer integration
- Async queue processing
- Horizontal scaling ready
๐ข Enterprise Features
Audit & Compliance
- Complete transaction audit trails
- Regulatory compliance reporting
- Data retention policies
- Encrypted sensitive data storage
Multi-Currency Support
- 7+ supported currencies (USD, EUR, GBP, NGN, etc.)
- Automatic currency conversion
- Regional formatting
- Exchange rate integration ready
Event-Driven Architecture
- Domain events for all state changes
- Easy integration with external systems
- Webhook support ready
- Real-time notifications
๐ Documentation
- API Reference (API.md) โ Complete method documentation
- Architecture Guide (ARCHITECTURE.md) โ Technical design decisions
- Examples (EXAMPLES.md) โ 10+ real-world implementations
- Configuration (CONFIGURATION.md) โ Setup and customization options
- Laravel Adapter โ Service provider, config, and migrations
๐ข Release Guide
To cut a release:
CI runs unit + integration tests and a DB matrix (Postgres 16, MySQL 8). Coverage gate enforces โฅ80% on PHP 8.2.
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ Links
- GitHub Repository: https://github.com/mbsoft31/loyalty-rewards
- Issues: https://github.com/mbsoft31/loyalty-rewards/issues
- Discussions: https://github.com/mbsoft31/loyalty-rewards/discussions
- Releases: https://github.com/mbsoft31/loyalty-rewards/releases
Built with โค๏ธ by mbsoft31 โ Empowering businesses with flexible, scalable loyalty solutions.
All versions of loyalty-rewards with dependencies
ext-pdo Version *
psr/event-dispatcher Version ^1.0
psr/log Version ^3.0
ramsey/uuid Version ^4.7