6ammart App Customization: Refer & Earn

Job ID: 39318517

Budget: ₹12,500 – ₹37,500 INR

I need a developer to customize my 6ammart app, which is built in Flutter with a Laravel backend. The main focus of this project is to implement a 'Refer and Earn' system.

Key Tasks:
1. System Roles & Referral Eligibility
In this referral system, there are four main roles:
Customer (User): Can refer and be referred by other Customers, Shops, or Delivery Boys.
Shop Owner: Can refer and be referred by Customers, Shops, or Delivery Boys.
Delivery Boy: Can refer and be referred by Customers, Shops, or other Delivery Boys.
Admin: Admins only manage the referral program but cannot directly participate by referring or being referred.
Each role has its own ability to refer others and be referred. For instance, a customer can refer other customers, but they can't refer a shop directly. Similarly, the shop owner can refer a delivery boy, but not another customer.
2. Admin Controls & Referral Commission Rules
The Admin has the ability to set rules for how referrals are rewarded. These rules are configurable and allow the admin to define:
Referral Commission: Defines how much money a user (referrer) gets for referring someone of a specific role (e.g., if a customer refers a shop, the customer gets ₹200).
Transaction Conditions: Specifies how many successful transactions the referred user needs to complete before the referrer earns the reward (e.g., ₹50 after 1 transaction).
Referral Bonus Type: Can be a fixed amount (e.g., ₹50) or a percentage (e.g., 5% of the referred user's transaction amount).
Referral Expiry: Defines a validity period for the referral reward (e.g., 30 days from when the referral happens).
Wallet Transfer Settings: Defines whether the rewards are added automatically or require manual approval before being credited to the referrer’s wallet.
3. Workflow with Examples
Here’s how the referral workflow functions for different scenarios:
Case 1: Delivery Boy Refers a New Customer
1.The delivery boy shares his unique referral code with a potential customer.
2.The new customer signs up using the referral code.
3.The admin has set a rule that the delivery boy gets ₹50 after the customer completes 1 successful order.
4.Once the customer places and successfully completes the order, the system checks the rule and credits ₹50 to the delivery boy’s wallet.
5.Both the delivery boy and customer are notified of the successful referral.
Case 2: Shop Owner Refers a New Delivery Boy
1.The shop owner shares his referral code with a delivery boy.
2.The new delivery boy signs up using the shop owner's referral code.
3.The admin rule states that the shop owner gets ₹100 after the delivery boy completes 3 deliveries.
4.After the delivery boy completes 3 deliveries, the system checks the rule and credits ₹100 to the shop owner's wallet.
5.The shop owner and the delivery boy are notified of the successful referral.
Case 3: Customer Refers a New Shop
1.The customer shares their referral code with a local shop.
2.The shop registers using the customer’s referral code.
3.The admin rule says that the customer gets ₹200 after the referred shop fulfills 5 orders.
4.After the shop fulfills 5 orders, the system checks the referral conditions and credits ₹200 to the customer's wallet.
5.Both the customer and shop are notified of the successful referral.
4. Key Checks to Avoid Mistakes
Several rules and checks are put in place to ensure the referral system functions fairly and accurately:
No Self-Referral: A user cannot refer themselves. This avoids people exploiting the system by creating multiple accounts.
Unique Referral Codes: Every user has a unique referral code. This ensures that referrals are correctly attributed to the right person.
Transaction Validation: Only completed, successful, and non-refunded transactions count towards the referral reward. This ensures the system doesn’t reward fraudulent or incomplete transactions.
Role-Based Rules: The admin can define different rewards for different referral pairs. For instance, referring a customer might have a different reward than referring a delivery boy.
Pending Earnings Dashboard: Users can see their "pending" referral rewards until the conditions (like completing a certain number of transactions or deliveries) are met. This keeps users informed of the progress.
5. Final Flow Summary
Here’s a simplified overview of how the referral program works:
1.A user (referrer) shares their referral code with someone they want to refer (referee).
2.The referee signs up using the referral code.
3.The system tracks the transactions (orders or deliveries) completed by the referee.
4.Once the referee meets the conditions defined by the admin (e.g., completing 5 orders), the system credits the referrer’s wallet with the reward.
5.Notifications are sent to both the referrer and referee, informing them of the successful referral and reward.
Next Steps for Developer
To implement this system effectively, here are the key tasks for developers:
1.Referral Code Generation: Develop a mechanism to generate unique referral codes for each user (Customer, Shop Owner, Delivery Boy) upon registration.
2.Admin Controls for Setting Rules: Create an interface in the admin panel where the admin can define referral rules like commission amounts, minimum transactions required, reward types, etc.
3.Transaction Tracking: Develop functionality to track the completion of transactions (e.g., orders or deliveries) and check if the referrer’s conditions are met for earning a reward.
4.Referral Reward Automation: Implement the automatic reward system where, once the conditions are met, the system credits the referral reward to the referrer’s wallet.
5.Notifications: Set up push notifications or in-app alerts to notify users when they earn referral rewards.
6.Pending Referrals Dashboard: Create a section in the user interface where users can see their pending referrals and track their progress toward receiving rewards.
Tech Stack
Backend (Laravel): Laravel will handle the referral logic, rule setting, wallet management, and transaction tracking.
Frontend (Flutter): Flutter will handle the user interface, allowing users to sign up with referral codes, view their wallet balances, and track pending rewards.
Related categories: PHP Mobile App Development Android Laravel Flutter