WalysonGO / WppPanelApi

Simple Panel for Baileys API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zete Logo

Zete-Panel for WhatsApp API

Tests

Zete-Panel, is an open-source application interface for this ookamiiixd/baileys-api with laravel/livewire and you can install it on any Shared Hosting that support NodeJs and SSH

Features

  • Auto-refreh QR Code
  • Connect/Disconnect Device
  • Message Log
  • Send test Message
  • Change Profile (Name)
  • Regenerate API Key
  • Built-in API with Documentation
  • Use sanctum for API Token
  • Ready-to-use

Installation on Shared Hosting

First you need to Setup the API.

  1. Create a new subdomain, e.g. example.yourdomain.com
  2. Open the terminal or SHH to start cloning this repository to your subdomain directory
git clone https://github.com/ookamiiixd/baileys-api.git public_html/example.yourdomain.com
  1. Enter to the subdomain directory.
cd public_html/example.yourdomain.com
  1. Setup configuration

Create a database for ookamiiiixd/baileys-api as it is needed for data storage

Then copy the .env from .env.example

cp .env.example .env

then edit the .env file, you can use nano with the command

nano .env

Paste this

# Listening Host
HOST="127.0.0.1"

# Listening Port
PORT="48000"

# Database Connection URL
# mysql://{db_username}:{db_password}@127.0.0.1:3306/{db_name}
DATABASE_URL="mysql://root:12345@127.0.0.1:3306/baileys_api"

# Reconnect Interval (in Milliseconds)
RECONNECT_INTERVAL="5000"

# Maximum Reconnect Attempts
MAX_RECONNECT_RETRIES="5"

# Maximum SSE QR Generation Attempts
SSE_MAX_QR_GENERATION="10"

# Pino Logger Level
LOG_LEVEL="warn"
  1. Create .htaccess file, and copy these
Options +FollowSymLinks -Indexes
IndexIgnore *
DirectoryIndex
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ http://127.0.0.1:48000/$1 [P]
</IfModule>
  1. Go to "Setup Node.js App", follow these settings, and Create
Node.js version = v16 above
Application mode = Production
Application root = public_html/example.yourdomain.com
Application URL = example.yourdomain.com
Application startup file = app.js
  1. Copy the virtual environment path, open your terminal or SSH, paste it, and Enter
source /home/u123456/nodevenv/public_html/example.yourdomain.com/16/bin/activate && cd /home/u123456/public_html/example.yourdomain.com
  1. Install the dependencies
yarn install

or

npm i
  1. Build the project
yarn build

or

npm run build
  1. Push the schema
npx prisma db push
  1. Install pm2
npm install pm2@latest -g

or

yarn global add pm2
  1. Run the app.js
npx pm2 start app.js
  1. Now the endpoint should be available according to your environment variables configuration. Default is at http://example.yourdomain.com Your API is ready, give it a try here => DOCS

Install Zete-Panel

  1. Create a new domain, e.g. yourdomain.com
  2. Open the terminal or SHH to start cloning this repository to your domain directory
git clone https://github.com/cinderjk/zete.git public_html/yourdomain.com
  1. Enter to the domain directory.
cd public_html/yourdomain.com
  1. Install the dependencies
composer i
  1. Create a new Database
  2. Open file manager and edit the .env
APP_NAME=Zete
APP_ENV=local
APP_KEY=base64:oLpa/yTwIUUiFoPg5A17Ao15djIt6d4SOwUvdZyp5QZ=
APP_DEBUG=false
APP_URL=http://yourdomain.com
WA_API_URL=http://example.yourdomain.com
USE_JOB_QUEUE=false

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_zete_database
DB_USERNAME=your_zete_database_username
DB_PASSWORD=your_zete_database_password

Note:

WA_API_URL: please change it to your API endpoint

Using Queue

USE_JOB_QUEUE: set to TRUE If you want to use queue, you will need a cron jobs

run these commands on cron jobs

*/5	*	*	*	*	/usr/local/bin/php /home/u123456/public_html/yourdomain.com/artisan queue:work --max-time=300 >> /dev/null 2>&1

via terminal

php artisan queue:work
  1. Run migration and key:generate, simply just
php artisan fresh:data

or

php artisan migrate:fresh --seed & php artisan key:generate
  1. Create .htaccess file, and copy these
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
  1. Go to yourdomain.com
  2. Login use username admin & 123
  3. Go to Device > Add, and create new Device
  4. Scan the QR with your whatsapp
  5. Next, go to Messages > Add, and test it.

Screenshots

Login Page

Login Page

Dashboard

Dashboard Page

Devices

Devices Page

Scan Devices

Scan Devices Page

Add Message

Add Message Page

Profile

Profile Page

Docs

Docs Page

Tech Stack

Client: Livewire, Bootstrap

Server: NodeJs, Laravel

Credit

About

Simple Panel for Baileys API


Languages

Language:PHP 35.5%Language:Blade 31.5%Language:CSS 31.5%Language:JavaScript 1.5%