@jatheon/shared-lib

v0.0.76

Published

A shared library for the WhatsApp scraper project

Downloads

472

Readme

WhatsApp Scrapper Shared Library

This shared library provides reusable components and services for managing WhatsApp client instances using whatsapp-web.js, AWS S3 storage, and MySQL database connections. The goal of the library is to allow for the creation and management of multiple WhatsApp client instances across microservices, handling authentication, session restoration, and event handling for each client.

Features

  • Session Persistence: Store and restore client sessions using AWS S3.
  • MySQL Database Support: Store user and client-related metadata, such as users, sessions, and other persistent data, using MySQL.
  • Database Entities: Predefined database entities for easy integration with MySQL.
  • Microservices Ready: Designed for integration with NestJS microservices architecture.

Installation

Install the shared library in your NestJS microservices:

npm install @jatheon/shared-lib

## Environment Variables

# AWS S3 Configuration
AWS_REGION=
AWS_SQS_HOST=
AWS_ACCOUNT_ID=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

# MySQL Database Configuration
MY_SQL_HOST=
MYSQL_USER=
MYSQL_PORT=
MYSQL_DATABASE=
MYSQL_PASSWORD=