How azimsh3r/kaspi-price-monitor works
Project type and purpose
• This is a backend-only, production-grade Spring Boot microservice (monolithic codebase) called “Kaspi Price Monitor & Auto-Updater.”
• Its purpose is to fetch product data from the Kaspi marketplace, apply dynamic pricing strategies (undercutting or raising prices via smart algorithms and proxy rotation), push updated prices back to Kaspi, and expose order statistics and management endpoints via a JWT-secured REST API.
File structure
• Top-level build files: Gradle scripts (build.gradle.kts, settings.gradle.kts, gradlew).
• src/main/java/com/metaorta/kaspi split by concern:
• config holds Spring Security and Redis configuration.
• controller defines REST controllers (Auth, Product, Order, Merchant, Session).
• dto, model, enums for data transfer, domain entities, and enums.
• repository for JPA interfaces (PostgreSQL).
• service for business logic, subdivided by domain:
– order (sync, stats, scheduling, remote client),
– product (fetch, sync, price-monitor),
– security, proxy, user, merchant.
• util for mapping and factories.
• src/main/resources/application.properties configures DB, Redis, JWT, and Kaspi API token.
• Presence of OrderSyncScheduler and use of ScheduledExecutorService + semaphores indicate internal scheduling and concurrency controls.
README for additional insights
• Architecture sketch showing client → controllers → services → proxy/calculation layers.
• Highlights external systems: Redis, PostgreSQL, Kaspi remote API.
• Security: JWT + role-based access.
• Core modules: PriceUpdateSvc (scheduler + semaphores), ProductFetchSvc, OrderStatisticsSvc, ProxyService, PriceCalcService.