I want to implement a gamification microservice with Django that works alongside other microservices.
In this microservice, I want to have points, ranks, coins, badges and credit cards for each user.
Points: A number that is earned based on the user’s activity and this activity is not limited to purchase operations and can be earned by performing any kind of activity. Uses of points include increasing rank, buying discount codes and increasing lottery chances.
Rank: For example, you can have 5 ranks for users and rank them based on the total points they have earned so far. The ranks can be named from “Newcomer” to “Professional” level. Special benefits are provided for each rank, which may include discounts, various notifications, coefficient in getting rewards, etc.
Coins: Only earned for financial transactions. The higher the transaction amount, the more coins the user earns. You can get benefits other than discount codes through coins.
Badge: They are awarded to a person for repeating a specific activity. Having badges gives the user special advantages.
Credit card: A type of credit for in-app and out-of-app purchases. For example, you can buy a credit card for a specific product with a credit of $100 for $80. In this way, the user gets a 20% discount.
I want everything in this microservice to be dynamic. The benefits that the user gets, the rules that increase the points or the rank or the badge, or the way of converting one feature to another, should be dynamic and if these things need to change, less code should change.
I want you to guide me in designing this microservice. How should I implement the models so that the development of this microservice is easier in the future, the code readability is higher, and the SOLID principles are followed in it? Or if these explanations are ambiguous, guide me in finding these ambiguities.
Aucun commentaire:
Enregistrer un commentaire