This project is a backend system for processing digital content orders. It handles pricing, discounts, delivery, and user management for a digital store that sells ebooks, audiobooks, physical books, and subscriptions.
./gradlew run
Or build and run the JAR:
./gradlew build
java -jar build/libs/digital-store-1.0-SNAPSHOT.jar
Requires JDK 17+ and Gradle.
src/main/kotlin/com/digitalstore/
├── Main.kt
├── model/
│ ├── User.kt
│ ├── Item.kt
│ ├── Order.kt
│ ├── DeliveryInfo.kt
│ └── OrderResult.kt
├── service/
│ ├── OrderProcessor.kt
│ ├── InventoryManager.kt
│ └── DeliveryService.kt
└── util/
└── DataHelper.kt
- Refactor the code to improve maintainability and readability
- Fix any bugs you find
- Make the system easier to extend with new item types or discount rules
- Improve the overall design where you see fit
- The system currently supports item types:
ebook,audiobook,book,subscription - Promo codes:
SAVE10,SAVE20,FREESHIP,STUDENT15,NEWUSER - Membership types:
premium,standard,student - Tax rates vary by country