Rameez ScriptsYour software partner RS WhatsApp · Source code guide
Get help
Source code guide. For buyers of the full source code who sell the app under their own name. Have a Pro plan instead? Open the Pro plan VPS guide
RS WhatsApp · Full source code

Make RS WhatsApp your own product.

Host your own licence panel, put your name on the app, build your installer and sell plans. Every file and line to change is shown.

  • 20Simple steps
  • 2 hoursStart to finish
  • 1Panel of your own
  • 100%Your name
index.js — your-app
index.jspackage.json
78var BRAND = {
79  name: "Your App",
82  publisher: "Your Business",
83  website: "https://yourbrand.com",
86  licenseServer: "https://license.yourbrand…",87  licensePublicKey: "MFkwEwYHKoZIzj0…",88  supportWhatsApp: "923001234567",
89  supportEmail: "support@yourbrand.com",
91};
mainLn 86, Col 3UTF-8JavaScript
One block makes the app yours (step 10)
Part 1 of 6

Before you start.

01
Step 1 of 20

Is this the right guide?

There are two ways to own RS WhatsApp. This guide is for the second one.

You boughtWhat you doYour guide
A Pro plan (licence)You install our app on your VPS with one command and sell workspaces. You change no code. Keys, updates and the licence server stay ours.Pro plan VPS guide
The full source codeYou put your own name on the app, run your own licence panel, make your own keys and plans, build your own installer and sell it as your product.This guide
Good to know You do not have to be a programmer. You will change a few marked lines with a text editor and copy a few commands. Each one is shown here with the file name, the line number and the exact text to look for.
Next: What is inside
02
Step 2 of 20

What is in the source code

Folder or fileWhat it is
out/The app itself (the main program, the screens, the server mode). Most of your edits are here.
src/The screens that are built into out/renderer/assets/assistant.js with one command.
tools/Scripts: VPS install, building, signing updates, making your update key.
build/The app icon (icon.png, icon.ico).
license-server/Your licence panel (PHP + MySQL): customers by Gmail, plans, trials, resellers, the VPS install command.
package.jsonThe app name, version and installer settings.
guide/These guides.

How the parts talk to each other:

  1. 01Your panelKeeps your customers' Gmail plans and signs every licence.
  2. 02Your appYour name and icon, pointed at your panel.
  3. 03Your releasesInstallers and updates on GitHub, signed with your key.
  4. 04Your customersSign in with Google; you set their plan.
Next: What you need
03
Step 3 of 20

What you need

WhatDetails
A Windows 10 or 11 PCTo build the Windows installer.
Node.js 22 (LTS) or newerFree from nodejs.org. Install it with the default options.
VS CodeA free text editor from code.visualstudio.com, to change the lines.
A GitHub accountFree. Holds your installer so your customers' apps can update.
Web hosting with PHP 8.1+ and MySQLFor your licence panel. Hostinger, any cPanel host or your own VPS works. It needs HTTPS (free SSL is fine).
A domainFor example yourbrand.com. The panel will live on license.yourbrand.com.
Optional: a VPSOnly if you want to run the app on a server or sell VPS hosting (part 5).
A Google account (Google Cloud)Free. Your customers sign in to your app with Google, and their plan is found by their Gmail (step 14).
Next: Address and database
Part 2 of 6

Host your licence panel.

04
Step 4 of 20

Make the panel's address and database

Do this in your hosting panel (hPanel on Hostinger, or cPanel).

  1. Add a subdomain: license on your domain, so it becomes license.yourbrand.com. Note the folder it makes (for example public_html/license or domains/license.yourbrand.com/public_html).
  2. Turn on SSL (HTTPS) for that subdomain. Most hosts do it with one switch.
  3. Open MySQL Databases and make a new database and a database user with a strong password. Give the user all privileges on that database.
  4. Write down four things: the database host (usually localhost), the database name, the user and the password.
Done when Opening https://license.yourbrand.com shows an empty page or the host's default page with a lock icon, and you have the four database details.
Next: Upload the panel files
05
Step 5 of 20

Upload the panel files

  1. On your PC, open the source code folder and go into license-server.
  2. Select everything inside it (also the hidden .htaccess file), right-click › Compress to ZIP.
  3. In your hosting panel open File Manager and go into the subdomain's folder from step 4.
  4. Upload the ZIP there and Extract it. The files (login.php, update_setup.php, includes…) must sit directly in that folder, not inside another folder.
  5. Delete the ZIP file after extracting.
Hidden files If you upload file by file, turn on "show hidden files" in File Manager and make sure .htaccess is there. The panel's address rules and safety rules live in it.
Next: Put in your database login
06
Step 6 of 20

Put in your database login

  1. In File Manager, find config.example.php, copy it and name the copy config.php.
  2. Open config.php (Edit) and change these four lines with your details from step 4:
LineNow saysChange to
11define('DB_HOST', 'localhost');Your database host (keep localhost if your host says so)
12define('DB_NAME', 'your_database_name');Your database name
13define('DB_USER', 'your_database_user');Your database user
14define('DB_PASS', 'your_database_password');Your database password
  1. Save. Keep the quotes and the semicolon exactly as they are; change only the text inside the quotes.
Next: Tables and admin
07
Step 7 of 20

Build the tables and your admin

  1. Open https://license.yourbrand.com/update_setup.php in your browser.
  2. It builds every table and makes your own signing keys (the keys that prove a licence came from you). You see a list of green lines and Update completed successfully.
  3. Under it, the form Create the first admin shows. Type a username, your email and a password of 10+ characters, and press Create admin.
  4. It opens the sign-in page. Sign in with what you just made.
Never run it on someone else's panel The first-admin form only shows while the panel has no users at all. After your admin exists it never shows again, and the page only adds what is missing; it never deletes data.
Done when You are signed in to your own panel and see its dashboard.
Next: Set up your panel
08
Step 8 of 20

Set up your panel

  1. Open RS WhatsApp Keys in the sidebar.
  2. Press the ⋮ menu at the top and choose Server settings.
  3. Fill in your product name, the key prefix (like BRND), your support WhatsApp and email, the trial days and the renew / buy link. Press Save.
  4. In the same window, copy the two values at the bottom: Server address (like https://license.yourbrand.com/api/license) and Public key (a long line). You paste both into the app in step 10. Keep them in a text file.

Your plans and prices

The two plans (Starter and Pro) and their prices are in one line of the panel. In File Manager open includes/lib/license.php, line 68:

includes/lib/license.php, line 68
return [['Starter', 30, 50, '2.99', 1, array_values(array_diff($all, ['social'])), 'WhatsApp and email', 50], ['Pro', 30, 0, '9.99', 5, $all, 'Priority', 0]];

Each plan is in square brackets, in this order:

PlaceMeaningStarter now
1Plan name'Starter'
2Days the plan lasts30
3New AI contacts a day (0 = unlimited)50
4Price in USD'2.99'
5WhatsApp numbers1
6Features (Starter has all except Facebook / Instagram)array_values(…)
7Support text'WhatsApp and email'
8Messages a day (0 = unlimited)50

Change only the numbers and the text in quotes, then save. VPS hosting and SaaS seats follow the Pro plan.

Next: Open the code on your PC
Part 3 of 6

Make the app yours.

09
Step 9 of 20

Open the code on your PC

  1. Unzip the source code to a short path, for example C:\rswa.
  2. Open VS Code › File › Open Folder › pick that folder.
  3. Open the terminal inside VS Code: Terminal › New Terminal. Run this once (it downloads what the app needs, a few minutes):
Type in the VS Code terminal, in the source code folder
npm install
How to find a line In VS Code press Ctrl + G and type the line number. Or press Ctrl + F and paste the text shown in this guide. Line numbers are for version 1.0.57; if a line has moved a little, the search still finds it.
Next: Your name and panel
10
Step 10 of 20

Your name, panel and contact

Everything that makes the app yours is in one block. Open out/main/index.js and go to line 78 (search for var BRAND = {). Change these lines:

LineFieldPut
79nameYour app name, like "BrandChat". Windows shows it on the window, tray and notifications.
80codeNameThe same name in small letters with dashes, like "brandchat".
81appIdYour own id, like "com.yourbrand.brandchat". Use the same value in package.json (step 12).
82publisherYour business name.
83websiteYour website.
84, 85buyUrl, accountUrlWhere customers buy or renew: your shop page or your WhatsApp link.
86licenseServerThe Server address from step 8.
87licensePublicKeyThe Public key from step 8 (one long line, inside the quotes).
88supportWhatsAppYour WhatsApp number with the country code, digits only, like "923001234567".
89supportEmailYour support email.
90releasesRepoYour GitHub releases repository, like "yourname/brandchat-releases" (step 16).
Lines 86 and 87 must match your panel If the server address or the public key is wrong, your app cannot check any customer's plan. Copy them from your panel, never type them.
Next: Other links
12
Step 12 of 20

Installer name and icon

Open package.json and change:

LineNow saysChange to
3 and 40"productName": "RS WhatsApp"Your app name
6"description": …One line about your app
7"author": …Your name and email
8"homepage": …Your website
39"appId": "com.rameezscripts.rswhatsapp"The same appId as step 10
41"copyright": …Copyright (c) 2026 your business
82, 83"shortcutName", "uninstallDisplayName"Your app name
90, 91"owner", "repo"Your GitHub user name and your releases repository (step 16)
  • Icon: replace build/icon.png (512 × 512 px) and build/icon.ico with your own, same names.
  • Keep line 85 ("artifactName") as it is. If you rename the installer there, change the same name in tools/sign-update.mjs line 16 too.
Next: Your own update key
13
Step 13 of 20

Your own update key

Your apps only install updates that are signed with your key. Make it once:

Type in the VS Code terminal, in the source code folder
node tools/make-update-key.mjs
  1. It saves your private key in C:\Users\YOU\.config\rs-whatsapp\update-signing.pem and prints two public values.
  2. Open out/main/update-verify.js, line 12, and put value 1) inside the quotes of UPDATE_KEY = "…".
  3. Open tools/install.sh, lines 36 to 38 (PUB="-----BEGIN PUBLIC KEY-----), and replace the three lines with value 2).
Back up the key file Copy update-signing.pem to a USB stick or a password manager. If you lose it, the apps you already sold can never update again. Never share it and never upload it anywhere.
Next: Google sign-in
14
Step 14 of 20

Google sign-in (needed)

Your customers sign in to your app with their Google account. Their plan is found by that Gmail, and their data is kept in their own Google Sheet. You need your own Google "client" for this. It is free.

  1. Open console.cloud.google.com and sign in with your Google account. Make a new project named after your app.
  2. APIs & Services › Library: turn on Google Sheets API and Google Drive API.
  3. APIs & Services › OAuth consent screen (Google Auth Platform): app name, your support email, and your website. Audience: External.
  4. Under Data access add the scopes openid, email, profile and .../auth/drive.file.
  5. Under Clients press Create client, type Desktop app, give it a name and press Create. Copy the Client ID and the Client secret.
  6. Back in Audience, press Publish app so it is In production (in Testing, only test users you add can sign in).
  7. In your panel: RS WhatsApp Keys › ⋮ › Server settings: paste the Client ID and the Client secret, and Save. The secret stays on your panel, never in the app.
  8. In the code: open out/main/google-auth.js, line 18, and put your Client ID inside the quotes of GOOGLE_CLIENT = "…".
Google may ask to verify the app With many users Google can ask you to verify your consent screen (your website, a privacy policy page, a short video). The panel has a ready privacy page at https://license.yourbrand.com/privacy/ you can use.
Done when The panel's Server settings preview says Google sign-in: ready, and line 18 holds your own Client ID.
Next: Build your installer
Part 4 of 6

Build and ship.

15
Step 15 of 20

Build your installer

  1. Open package.json and set line 4 "version" to your first version, for example "1.0.0".
  2. In the VS Code terminal run:
Type in the VS Code terminal, in the source code folder
npm run dist
  1. Wait a few minutes. Your installer is in the dist folder: RS-WhatsApp-Setup-1.0.0.exe (with your app name inside).
  2. Install it on your PC and check: your app name, your icon, and on the License page your own support contact.
  3. Sign in with Google in the app. Your trial starts, and the Gmail shows up in your panel (step 18).
Windows warning The installer is not code-signed, so Windows may show "Windows protected your PC" (More info › Run anyway). A code-signing certificate removes this; it is optional and bought separately.
Next: Updates
16
Step 16 of 20

Send updates to your customers

  1. On GitHub make a public repository for your installers, for example brandchat-releases (the one in package.json lines 90–91).
  2. After each npm run dist, sign the update (use your version number):
Type in the VS Code terminal, in the source code folder
node tools/sign-update.mjs 1.0.0
  1. On GitHub open the repository › Releases › Draft a new release. Tag: v1.0.0.
  2. Attach three files from dist: the .exe, the .exe.blockmap and latest.yml. Press Publish release.
  3. In your panel, Server settings › Latest version: type the new version. Installed apps find the update within an hour.
Each new version Raise the version in package.json, run npm run dist, sign, and publish a new release. Only signed releases install.
Next: Run it on a VPS
Part 5 of 6

Server and selling.

17
Step 17 of 20

Run it on a VPS

The app also runs on a Linux VPS and opens in any browser. There are two ways.

A. Your own server (simple)

  1. Put your source code in a private GitHub repository.
  2. In tools/install.sh line 24, change REPO="rameezimdad/rs-whatsapp-source" to your private repository.
  3. Build the Linux version on a Linux PC or in WSL (Ubuntu on Windows): OUT=dist bash tools/build-linux.sh 1.0.0. It makes RS-WhatsApp-linux-x64-1.0.0.tar.gz and a signed linux.json.
  4. In that private repository make a release v1.0.0 and attach both files.
  5. On GitHub make a fine-grained access token with read-only access to that one repository (Contents: Read).
  6. Open your VPS (ssh) and run, with your token and repository:
Type on the VPS, after you sign in with ssh
curl -fsSL -H "Authorization: Bearer YOUR-TOKEN" -H "Accept: application/vnd.github.raw" https://api.github.com/repos/YOURNAME/YOUR-REPO/contents/tools/install.sh | sudo env RSWA_TOKEN=YOUR-TOKEN bash

It asks for your domain and a password, exactly like steps 8 to 10 of the Pro plan VPS guide (DNS record, firewall and first sign-in are the same).

B. Sell VPS hosting to your customers (advanced)

Your Pro customers get a one-time install command from their app, served by your panel. For this:

  1. In tools/install.sh change line 27 (LIC=…), line 158 (the download address check) and line 292 (L=…) from license.rameezscripts.com to your panel's domain.
  2. Sign the install script: node tools/sign-linux.mjs --install tools/install.sh dist/install.sig.
  3. On your hosting, make a folder rswa-vps one level above the panel's web folder, and upload install.sh, install.sig, linux.json and a file dl.txt that holds a random folder name (32 letters a–f and 0–9).
  4. Upload the .tar.gz into the panel's web folder at vdl/<that random name>/.
  5. Your customers on Pro then press Settings › VPS hosting › Get my install command in their app, and follow the Pro plan VPS guide.
See how we do it The file tools/release.sh (lines 41 to 47) does B for us after every release. Read it and change the domain and the SSH name to yours if you want the same one-command release.
Next: Give plans and sell
18
Step 18 of 20

Give plans and sell

  1. Your customer installs your app and presses Continue with Google. Their free trial starts by itself, and a row with their Gmail shows in your panel under RS WhatsApp Keys.
  2. When they pay you, open their row (search their Gmail) and set the plan and the days. Or press Add Gmail at the top and type their Gmail with the plan.
  3. The customer presses Check now in the app (Settings › About, or the Plans page). The new plan comes in without reinstalling.
  4. To renew, add time to their row. To stop, pause or cancel it. The app checks once a day.
  5. Resellers: on the Users page add a user with the role Reseller and a limit. They can add Gmail plans within that limit.
Trial length Server settings › trial days and the trial message limit decide what a new Gmail gets before paying.
Done when A Gmail you gave a plan to shows that plan in your installed app after Check now, with your name and your contact.
Next: Problems and fixes
Part 6 of 6

Help.

19
Step 19 of 20

Problems and fixes

update_setup.php says it cannot connect to the database

Check the four lines in config.php (step 6). On many hosts the user name and database name start with your account prefix, like u123_license.

The panel shows a 500 error or a blank page

Check your host uses PHP 8.1 or newer (PHP settings in your hosting panel), and that .htaccess was uploaded.

My app says the plan is invalid, or cannot reach the server

Lines 86 and 87 in out/main/index.js do not match your panel. Copy the Server address and Public key again from Server settings, rebuild with npm run dist and reinstall.

npm install or npm run dist fails

Check Node.js is version 22 or newer (node -v). Close VS Code, delete the node_modules folder and run npm install again.

My app does not find the update

The release must be public, hold the .exe, .blockmap and latest.yml, and latest.yml must be signed (step 16). The version in package.json must be higher than the installed one.

tools/sign-update.mjs says latest.yml does not match the installer

Run it right after npm run dist, with the same version number, before you change anything in dist.

Google sign-in fails or says the app is blocked

Check step 14: Sheets and Drive APIs on, client type Desktop app, the app published In production, the same Client ID in google-auth.js line 18 and in Server settings, and the secret saved in Server settings.

I lost my update key

The apps you sold cannot update any more. Make a new key (step 13), build, and ask your customers to download and install the new installer once by hand.

Next: Launch checklist
20
Step 20 of 20

Launch checklist

0 of 10 done
Stuck on a step?Send us the step number and a photo of your screen on WhatsApp. Custom changes are a paid project.
Get help