About the project
Smart Invoice Guard (SIG) is an invoice management platform designed for high availability, performance, and load resilience. The project demonstrates advanced backend architecture with multi-layer caching, asynchronous processing, and automated performance tests.
Repository: github.com/kopolot/example-smart-invoice-guard
Key implementations
Idempotency and payment security
Dedicated middleware with atomic Redis locks (Cache::add / SETNX) prevents double form submissions and parallel payment charges.
Race condition elimination
Asynchronous job queues protected by row-level database locking (lockForUpdate()) and transactional DB::afterCommit() events.
Search and HA
Elasticsearch integration (edge_ngram prefixes) with automatic fallback to SQL LIKE. Infrastructure based on Percona XtraDB Cluster, ProxySQL, Memcached, and Redis Lua scripts.
Load tests
Comprehensive k6 test suite (Smoke, Load, Stress, Regression) integrated with GitHub Actions CI, enforcing response-time thresholds under load.