### Introduction

Thank you for purchasing code. It really means a lot and It's our pleasure to serve top-notch service to you. Thank you so much for choosing WRTeam . If you have trouble with the code and documentation please contact to our Support Team Here

## Installation of Web Setup Video for Client Side

###### Configure Code in CodeEditer

Recommended tutorial is below 👇

###### Upload Code in Server

Recommended tutorial is below 👇

####
1. How to setup Web Version

###### Install Node JS

###### WARNING

NodeJS version should be 16.8 or later
Install NodeJS

####
2. Where to set API URL (Admin)

1. Go to Main Folder -> `.env` file open it ADMIN PANEL URL

####
3. Where to Set Google Maps API Key

1. Get your Google Maps API key from https://console.cloud.google.com/

2. Paste here your Google Maps Api here

###### Note

If you already have setup the App version of eBroker and already created firebase project at that time then you can skip 4.1 step

####
4. How to configure firebase configuration and authorised domain add.

1. Create firebase project in your account
2. Add web application to your firebase project
3. Enter the App Name and Click on Register App
4. How to configure firebase integration and domain in firebase console.
5. Copy this Highlited Code and paste one by one as per label given in admin panel->web settings->settings
6. This credentials should match with the credentials that you have set in `.env` file Otherwise it will not work properly.
7. How to configure domain in firebase console
8. You have successfully connected your Web application to your firebase project.

####
5. How to enable firebase auth

1. Go to firebase project.Click on authentication menu and goto sign-in method. Enable the authentication method mention in below image

####
6. How to Add Vapid Api key for Notification

1. Note: Go to `Firbase Project Settings` > `Messsaging` > `Web configuration` and copy key pair and paste to you `.env` file

1. Locate the `.env` file.

####
7. How to Change Web Application Name

1. Change the application name for your Web application. Go to the `.env file`

####
8. How to Change Web Favicon

1. Go to the folder `pages → _app.js`

####
9. How to Change Social Platforms Links

1. go to your admin panel `Settings > Web Settings > Social Media Links` add here your social media links
2. go to your admin panel `Settings > Web Settings > More Settings` add here your play store and app store links

####
10. How to Add Default Country Code

1. Go to`.env` File

####
11. How to Set Color Code

1. Go to your admin panel `Settings → System Settings → More Settings → System Color`

####
12. How to Set Logo for web

1. Go to your admin panel `Settings → Web settings → Image Settings → Main Logo`
2. Go to your admin panel `Settings → Web settings → Image Settings → Placeholder Image`
3. Go to your admin panel `Settings → Web settings → Image Settings → Footer Logo`

####
13. How to Add Your Address Google Map

1. Go to google Maps

first search your location then go to `share >` `Embed a map` and copy iframe html `COPY HTML`

2. Go to Admin panel `system settings > Web Settings > Iframe Link For Web`

Paste your html code here

3. Great! now you can see your Google maps on Contact Us Page

####
14. How to Add Google AdSence

1. Go to Google AdSence and sigin your account and Add site as per Image
2. click on Let's Go button
3. Copy this script code and paste to your `src` -> `pages` -> `_document.js`
4. after script add you need to run command for build folder npm run export and upload to your server. and after click on verify button in google adsence
5. If it says `Getting ready` your account is still under review and your site will not display ads until it has been approved.

####
15. How to run this project

###### Open VS Code teminal by typing CTRL+J in Windows/Linux, and for MacOS CMD+J and execute the command
npm i
This will take some time to download a few Packages so wait for a few minutes.

###### After npm i finishes run this command
npm run dev
This Command will Start the development mode.Check If everything is working fine then your are good to go ahead.

####
16. How to Setup Sitemap

1. add web domain or subdomain url in `.env` File
2. generate sitemap use command :- `npm run dev`
3. if you want to customize the sitemap then go to file`public->sitemap.xml`

####
17. Local Build and Deploy (Without SEO)

###### After all the changes, you are ready to deploy your Web application on a live server.

###### Open the VS Code terminal by typing CTRL+J in Windows/Linux or CMD+J for MacOS and execute the command npm run export. This will take a few seconds to build the live and optimized version of the web application.

###### After the process completion, go to the `out` folder and upload these files to your live server (only upload files from the out folder).

###### If you encounter any deployment-related problems, you can follow the official document: Next.js Deployment

####
18. Seo for Web

###### WARNING

If you possess a VPS server along with some familiarity with Node.js, npm, and pm2, you're well-equipped to delve into the Advanced SEO section. Otherwise, feel free to skip this part and deploy your site.
1. if you have VPS server then go to `.env file` and make it "true"`NEXT_PUBLIC_SEO="true"`

####
19. Deploy to the Server

###### WARNING

(For SEO) Deployment of the Next JS needs a bit of knowledge about `node js` `npm` `pm2` technologies. We have assumed that you are using a `debian` based OS, apt is your package manager. If you are using any other linux distro then apt will be replaced with the respective package manager of the OS

### Before starting the project deployment, you must upload your project to the server. Project can be upload to the server using FileZila or in other ways.

### Installing NodeJS

NodeJS can be installed using NVM by which multi Node version can be controlled easily.

`sudo apt install curl` `curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash>` `sudo apt install curl` `nvm install node 20.*` Check if node js is installed correctly using this command `node -v`

###### INFO

For more information, use official documentation

### Installing PM2 Server

By running the following command, PM2 server can be installed globally

`npm install pm2 -g`

### Pass the Proxy in the Server

Before configuring Apache, some necessary modules need to be enabled. Run the following commands to enable the modules

`sudo a2enmod proxy_ajp` `sudo a2enmod rewrite` `sudo a2enmod deflate` `sudo a2enmod proxy_balancer` `sudo a2enmod proxy_connect` `sudo a2enmod proxy_html`
Create Reverse Proxy for the Node JS server in your apache server settings

`<Location />
ProxyPass http://localhost:8001/
</Location>
`

### Setup the Project

###### MANDATORY

Make sure you have `node_modules` installed in your directory.
For installing package run the following command
`npm install`
The above command will install all the node modules in your directory.
After that, project must be built. For that, run the following command, which will build the production application in the out folder.
`npm run build`

#### Run the PM2 server

Go to the project root and run the following command
`pm2 start "npm start" -n "YOUR_PROJECT_NAME"`
Check if pm2 process is Running OK
`pm2 ls`
When you run pm2 ls you will see , 2 types of output
1. Error :
2. Success :

If you are getting errors in the pm2 process , then run pm2 logs and send us the Screenshot of the error, so that we can guide you to resolve your issues.

If you want to restart your pm2 process then run pm2 restart id // Replace id with your process id

For example here id is 0 in the above screenshot --> `pm2 restart 0`

For deleting the previous project running in the PM2 server, use the following command
`pm2 delete "YOUR_PROJECT_NAME"`

###### INFO

For more information, use official documentation

####
20. Upload .htaccess file

###### MANDATORY

You are required to add the provided `.htaccess` file to your web code on your server.

### Support

Delighted to serve and support you! Contact our support team led by Muzammil Sumra on Skype

To help our customers, we constantly be in touch with every customer if they need any assistance regarding our product. We offer our customers a support from Mon – Fri 9.00am to 6.00pm IST (GMT +5.30) – We are a Team located in India – Asia.

Typically we reply our customers for all the questions and queries within 24 hours of time via comments, support forum or emails.

### Your Feedback

Dear valuable customer, Thank you very much for choosing our product. It's our pleasure to serve top-notch service to you. Please give us your honest feedback that will help us to make a more strong and reliable product by click here Rate Us. Thank you very much.

### Contact Us

WRTeam has creative and dedicated group of developers who are mastered in Apps Developments and Web Application Development with a nice in delivering quality solutions to customers across the globe. Contact us today to find out how we can help you or for freelance work.

Visit Us : https://wrteam.in

Mail Us : support@wrteam.in

Thank you very much.