Introduction
TokShop is live shopping and auction market place, this app is done fully by flutter framework, it supports both android and ios, its a livestream social shopping app for people to sell, auction, bid on live auctions and also shop from their favourite brands,Engage with your audience during the live stream allow them to speak and ask questions or comment in the live stream.
Features
- Create live stream, attach products and start selling live
- Invite core hosts and friends to join your live stream
- Create live auctions during live session and accet live bids, highest bidder by the time ends wins the auction
- Create sudden death auctions - last bidder wins the auction
- Chat with audience live during live stream
- Send tip to hosts and users you follow
- Import Woocommerce products from wordpress website and sync to TokShop, accept orders from both platforms and sync between them
- Support Multi vendors
- Vendors sell in the marketplace, accept and manage sales and orders
- Platform Owner Earns Commission on sales from vendors
- Vendors can withdraw earnings from TokShop to their bank accounts they have connected.
- Users have and can manage wallet balances
- Dark and Light Theme support
- Multi language support
Domain Setup
Step 1 : Log in to your domain provider account
- Examples include GoDaddy, Namecheap, Google Domains, or Hostinger.
Step 2 : Navigate to the DNS management section
- This section might be labeled differently depending on your provider but look for "DNS Management," "DNS Settings," or similar.
Step 3 : Create an 'A record'
- Host: Enter the subdomain name, such as "admin."
- IP Address: Enter your server's IP address.
- TTL (Time to Live): You can typically leave this as the default setting (e.g., "Automatic").
Step 4 : Save the changes
- Look for a button or option to save or apply the changes, such as "Save All Changes."
- Following these steps should correctly create an A record for your subdomain.
Create DigitalOcean Account
- Create your VPS Server on Digital Ocean and receive $200 in credits for 2 monthsClick Here
Server Setup
Step 1 : Create Droplet in Control Panel
- Please click on the "Create" button located in the top right corner to open the create menu.

Step 2 : Choose Region
- In the "Choose Region" section, please select the region where you would like to create your Droplet.

Step 3 : Choose an image
- In the "Choose an image" section, you can select the image you wish to use for your Droplet.
- Please ensure that you select the Ubuntu operating system with version 22.04 for your Droplet.

Step 4 : Choose Size
- In the "Choose Size" section, you can determine the amount of RAM, storage space, and CPU cores for your Droplet.

Step 5 : Enable Backups
- You have the option to enable "Automatic Backups" for the Droplet, which will incur an additional cost based on the frequency of the backups.

Step 6 : Choose Authentication Method
- In the "Choose Authentication Method" section, select the preferred method for logging in to your Droplet.

Step 7 : Recommended and Advanced Options
- In the "We recommend these options" section, you have the opportunity to enable various optional services that enhance the functionality of your Droplet.
- Additional options are accessible by expanding the "+Advanced Options" section.


Step 8 : Finalize Details
- In the "Finalize Details" section, you can specify the quantity, name, tags, and project for the Droplet you are creating.
- After selecting your options, please click on "Create Droplet". A progress bar will then indicate the status of your Droplet's readiness.
- Once the Droplet setup is complete, its IP address will be displayed in the control panel.
- Once you have obtained the IP address, you can establish a connection to your Droplet using SSH.




Extract The Project
- Inside the project you download from codecanyon, there is a file called install_mongodb.sh
- Run this command in your server terminal
- This will install mongodb and provide you with the database connection string

./install_mongodb.sh

Admin Panel Setup
- Connect to the server via SSH using tools like WinSCP for file transfer and PuTTY for command line access.
- Transfer/Copy folder TokShop-Admin to the root directory of your server and below is the structure.
- Navigate inside the folder by running this command
cd TokShop-Admin
- backend - is the api for the admin panel and the app
- client - is the frontend for the admin panel
- Install packages required to run the backend and client by running install-all.sh:

./install-all.sh
- Still being in the folder TokShop-Admin path, run the following command on the terminal.
- After the command runs, you will see a link that you should open in your browser, click the link or open it in your browser, if you are running the admin panel locally, the page will open automatically:
- Enter the database connection string you had copied when you run install-all.sh
- Enter Email and Password for the admin
- Enter the Port you want the api to run on, you can leave it to default 5000
- Click save and connect, and then reload the page and login to the admin panel
npm run dev


Generate Firebase Private Key
- Login to firebase console.
- Click on the gear icon (Settings) next to "Project Overview" on the top left corner of the Firebase Console.
- In the project settings, navigate to the "Service Accounts" tab.
- Scroll down to the "Firebase Admin SDK" section.
- Click on the "Generate New Private Key" button.
- A prompt will appear asking you to confirm your action.
- Once downloaded, rename the JSON file containing the private key to service_account.json.
- Copy the file and paste it in admin -> backend as shown below..


SetUp Agora
- Open Agora consoleClick Here
- When you are logged in and you are in the console, click Overview,Click Create Project, it will generate a new project and then Click on Configure at the far end of the project
- Under Basic Info set switch to Live if you are doing production, you can also change the project name, under use case you can pick a category, Copy App Id and enter it in the admin panel
- Under Security on the app certificate, click on Enable, then cofirm in the dialog, after that a certificate key will be generated, copy it and enter it in the admin panel
- Paste App Id and Certificate key in the admin panel






SetUp Stripe
- Open Stripe Click Here. Create an account if you do have one or login if you already have an account and you will be directed to the dashboard, toggle test mode on or off depending with if you want to production, for this guide we will use test mode
- Click Developer option at the bottom of the page, click Api Keys tab, put your mouse on top of Publishable key and copy
- Paste Publishable Key you copied to admin panel settigs, then repeat the same for the Secret key , after this you can click save




Admin Other Settings
- Set currency your system will use e.g $
- set up commission in % you want to retain when vendors in the platform makes a sale e.g 2

Firebase Api Key
This Key is used to sign tokens so that user ca be able to login with email
- Go to firebase console Click Here
- Click on the gear icon (Settings) next to "Project Overview" on the top left corner of the Firebase Console.
- In the project settings, navigate to the "Project Settings -> General -> Add App(Create a ne)" tab, then click Continue to Firebase
- Click the web app, enter web app name the click register app
- In the next page you will see the api key, copy the key and paste to admin panel settings page, then click next to finish the setup



