Plugins
Templates
Blocks
Template Setup Guides

Investy - Investment Template

Template page link: https://zeroqode.com/template/investy---investment-platform-template-1541741540434x762511404271927300

Introduction

Investy no-code app template offers you the functionality of an investment platform. Use it to manage investors & investments. Suitable for cryptocurrency payments and withdrawals.The template is also suitable for treasury bills, fixed deposits, lending investment, commercial paper, cryptocurrency investments, etc. It has a variety of features and could be utilized in different ways.

Features

  • Fully responsive pages and user dashboard

  • Admin Dashboard for Management

  • Social sign-up Facebook & Google

  • Cryptocurrency Payments and Withdrawal powered by Coinbase Commerce and Coinbase.

  • Card Payments Powered by Voguepay

  • Supports multiple investment plans

  • Automated returns settlement

  • Due returns forecast for proper planning

  • Referral system with sustainability built in.

Data Structure

User

User’s data contains the usual profile info (Photo, Name, Email Address) and also contains additional fields relating to investments, payments, referrals etc.

Investment

Users can make multiple concurrent investments with varying plans (Percentage returns) and terms (Contract length). The template comes with two plans which have hard-coded variables.

Return

Users get returns on their investment based on their plan and invested amount. Currently returns are generated monthly by an API workflow.

Withdrawal

Users can withdraw their earnings in BTC. Withdrawal amounts are immediately frozen and removed from their wallets and then the admin will manually approve the transfer.

Referral

Referrals are created when a new user signs up with an invite link. It has field for the referral, the referred and the amount of money gained from the first investment of the referred user. A user can find a list of referrals they made under promotions in their dashboard.

Pages

Home

Signup

Signin

Dashboard

Invest

Admin

Specific References

Signing up

After a user signs up, the social network they used is stored to their object and they are forwarded to the dashboard.

Authentication

You would need to create an app/project in the developer console of each social network:

Facebook: https://developers.facebook.com

Google: https://console.developers.google.com

Ensure that you add all live & test URLs for these pages /signup, /signin & /dashboard as authorized redirect URLs.

You can check the Bubble forum or the developer guides of the social networks if you’re having trouble.

Navigation is straightforward on all pages but dashboard which has some AJAX-style navigation

Dashboard

Navigation in the dashboard makes use of custom states and conditions. It also makes use of Javascript to switch between dashboard view and new investment view. Be sure not to delete any elements inside “Group Plugins”.

Admin Dashboard

Navigation in this case makes use of custom states and conditions.

Investments

Users can make investments by clicking new investment button in the dashboard. They can then

  • Enter their investment amount

  • Choose a plan (Custom state on Group Plan Switch) : The buttons for choosing a plan validates the value of investment amount input and shows alerts if they don’t meet the hard-coded minimums.

  • Choose a term (Custom state on Group Term Switch)

  • Then proceed to make payment via cryptocurrency or in-built wallet (Only amount in wallet_balance can be used to make investment)

Returns

Returns are handled by the return_settlement API workflow which is set to run monthly after a successful investment. A new return is created every month until the tenure is finished. The returns is calculated from return_percentage and return_naira fields on the related investment object.

Referrals

Each user has a referral code created upon sign up.

The referral system makes use of HTML5 local storage. Existing users can invite their friends with their referral link which includes their code. When their friends visit this link loads a dedicated page which grabs & stores the referral code to HTML5 storage.

If the visitor proceeds to sign up, a condition is true workflow will retrieve the stored referral code and a custom event will create a new referral object and add the referrer to the newly signed up user.

When this newly signed up user makes an investment, within the investment payment confirmation workflow, the referral object created earlier is given value and the referrer’s total balance is increased.

Note: The referral system is built such that referral gains are only added to the referring users total balance. The wallet_balance remains the same. This means the referring user cannot immediately withdraw referral earnings but can only use them to make investments. You are free to change this behavior. To do so go to step 8 under cb_confirmation API workflow and you can add value to the referrer’s wallet balance as well.

Change referral reward: This is hard-coded within the cb_confirmation API workflow and to change it you simply need to change 0.05 value in Step 7. So 10% reward will become 0.1.

Withdrawals

Payouts/Withdrawals of earnings are made in Bitcoin using the Coinbase API.

Steps to set it up:

https://investmentapp.bubbleapps.io/version-test/manage/dashboard

https://investmentapp.bubbleapps.io/version-test/manage/dashboard?debug_mode=true

Replace the base URL with your own app’s base URL & ensure to add the live versions above it when you go live

  • Load the /manage/dashboard?debug_mode=true page and setup the Authentication with the Connect your Coinbase account button

  • Go to https://www.coinbase.com/accounts and select your preferred Bitcoin wallet/account

  • Copy the account id from the URL and paste it in the Coinbase send API connector call

  • Send at least $2 as a test transaction to complete setup

Withdrawal fee:

Setup The withdrawal fee is hard-coded to 5% and can be changed in step 2 of the confirm withdrawal workflow. You need to change 0.05 and 0.95. If you want your fee to be 8%, you will change 0.05 to 0.08 and 0.95 to 0.92.

Payments

This template uses Coinbase commerce for cryptocurrency payments and Voguepay for Card Payments

Coinbase Commerce Setup:

  • Visit https://commerce.coinbase.com/ and sign up. You will be give a mnemonic seed to use to create a new crypto wallet. Do that and be sure to backup the seed.

  • Go to settings in your Coinbase commerce, scroll to whitelisted domains and add your root domain. Example https://myinvest.bubbleapps.io Be sure to add your live domain when you go live.

  • Copy your API key and use it for the Coinbase Commerce API connector call in plugins.

  • Go to Settings> API in Bubble to generate an API token to use below

  • Go back to Coinbase Commerce and under Webhook subscriptions add two endpoints for your dev and live version like so

Dev: https://myappname.bubbleapps.io/version-test/api/1.1/wf/cb_confirmation?api_token=your_api_token

Live: https://myappname.bubbleapps.io/api/1.1/wf/cb_confirmation?api_token=your_api_token

Voguepay Setup:

  • Visit https://voguepay.com/ and sign up for a business account

  • Locate the merchant ID in your settings

  • Under the dashboard page in your Bubble app search for the element HTML Voguepay and replace the merchant ID parameter with yours. You can also change your preferred currency here

Webhooks

This template uses one webhook for Coinbase commerce to confirm cryptocurrency payments. They are handled by the cb_confirmation API workflow.

Notes

You will find over notes for this template in Bubble. They are for workflows and fields that need explaining. Mostly in User data fields, dashboard workflows and API workflows.

Things to Note:

Overlapping Elements

There are two groups on the homepage called Group VS and Group VS Mobile. They overlap each other. Be sure to make changes to both of them when customizing.

Demo to preview the template