You need to create a Magento Plugin.
Theme will be Argento.
Plugin Requirement:
After signup, a referral code should be generated automatically.
Each referral code consists of some bonus point/Discount Etc. (Which will be managed by Site Administrator and can be managed in bulk).
When the referral code will be shared the Sharing user and Referral code user will get the Bonus point or Special Discount. (Which will be managed by Site Administrator and can be managed in bulk).