Evolution API Evolution API began as a WhatsApp controller API based on CodeChat, which in turn implemented the Baileys library. While originally focused on WhatsApp, Evolution API has grown into a comprehensive platform supporting multiple messaging services and integrations. We continue to acknowledge CodeChat for laying the groundwork. Today, Evolution API is not limited to WhatsApp. It integrates with various platforms such as Typebot, Chatwoot, Dify, and OpenAI, offering a broad array of functionalities beyond messaging. Evolution API supports both the Baileys-based WhatsApp API and the official WhatsApp Business API, with upcoming support for Instagram and Messenger.
Go to file
2024-06-09 08:44:06 -03:00
.github fix: Build in docker for linux/amd64, linux/arm64 platforms 2024-05-27 16:24:21 -03:00
.vscode gitignore .vscode 2024-02-10 16:30:54 -03:00
Docker Chatwoot review and improvements 2024-06-09 08:44:06 -03:00
Extras fix: Remove rabbitmq queues when delete instances 2023-09-30 07:20:57 -03:00
instances init project evolution api 2023-06-09 07:48:59 -03:00
prisma feat: Now you can register several typebots with triggers 2024-06-08 19:04:57 -03:00
public/images readme 2024-06-08 14:04:45 -03:00
src Chatwoot review and improvements 2024-06-09 08:44:06 -03:00
views fix: Recovering messages lost with redis cache 2024-04-18 17:31:05 -03:00
.dockerignore init project evolution api 2023-06-09 07:48:59 -03:00
.DS_Store fix: correcao swagger sem authkey 2024-05-06 19:28:57 -03:00
.env.example Chatwoot review and improvements 2024-06-09 08:44:06 -03:00
.eslintignore init project evolution api 2023-06-09 07:48:59 -03:00
.eslintrc.js wip 2023-07-26 10:58:13 -03:00
.gitignore gitignore .vscode 2024-02-10 16:30:54 -03:00
.prettierrc.js wip 2023-07-26 11:12:00 -03:00
CHANGELOG.md changelog 2024-06-08 21:32:01 -03:00
docker-compose.yaml.example clean: docker build will be remove in future releases / build into compose file 2023-08-26 02:36:45 -03:00
docker-compose.yaml.example.complete clean: docker build will be remove in future releases / build into compose file 2023-08-26 02:36:45 -03:00
docker-compose.yaml.example.dockerhub fix: include instance Id field in the instance configuration 2023-12-17 07:59:24 -03:00
Dockerfile Chatwoot review and improvements 2024-06-09 08:44:06 -03:00
LICENSE init project evolution api 2023-06-09 07:48:59 -03:00
package.json fix: now in typebot we wait until the terminal block to accept the user's message, if it arrives before the block is sent, it is ignored 2024-06-08 15:09:55 -03:00
README.md readme 2024-06-08 14:05:57 -03:00
start.sh Update start.sh 2024-01-24 13:43:19 -03:00
tsconfig.json feat(chatwoot): add some translations on chatwoot messages 2024-02-21 12:05:41 -03:00

Evolution Api

Whatsapp Group Discord Community Postman Collection Documentation License Support Support

Evolution API - Whatsapp API Node JS

This project is based on the CodeChat. The original project is an implementation of Baileys, serving as a Restful API service that controls WhatsApp functions.
The code allows the creation of multiservice chats, service bots, or any other system that utilizes WhatsApp. The documentation provides instructions on how to set up and use the project, as well as additional information about its features and configuration options.

The Evolution API has direct integration with Typebot and Chatwoot

Evolution Pro Community

Join our Evolution Pro community for expert support and a weekly call to answer questions. Visit the link below to learn more and subscribe:

Click here to learn more
Subscribe

Instalation

Installing NVM (Node Version Manager)

NVM allows you to install and manage multiple versions of Node.js. This is particularly useful for maintaining compatibility across different projects.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

source ~/.bashrc

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Installing Node.js

nvm install v20.10.0 && nvm use v20.10.0

Initializing the Application

Clone the repository:

git clone https://github.com/EvolutionAPI/evolution-api.git

Configure the environment variables in the .env file.

Installing Application Dependencies

cd evolution-api

npm install

npm run build

Env

OBS: Rename the .env.example file to .env

cp .env.example .env

Database Setup

The application supports PostgreSQL, MySQL, MariaDB.

Run one of the commands below for the non-existence of a database.

  • MySQL or MariaDB:

    npx prisma migrate dev --name init --schema ./prisma/mysql-schema.prisma
    
  • PostgreSQL:

    npx prisma migrate dev --name init --schema ./prisma/postgresql-schema.prisma
    

Deploying

For production environments.

For existing relational databases such as PostgreSQL, MySQL, or MariaDB, the setup involves two essential steps:

  1. Setting the Environment Variable: Initially, it's imperative to define the DATABASE_PROVIDER environment variable in alignment with your relational database type. Use postgresql for PostgreSQL, and mysql for MySQL or MariaDB. This configuration is crucial as it directs the Prisma ORM regarding the specific relational database in use.

  2. Deploying Schema Changes: Following this, execute the npx prisma migrate deploy --schema ./prisma/postgresql-schema.prisma command. This command serves as a shortcut for the prisma deploy command, whose main role is to examine the current schema of the relational database and implement necessary modifications. A key feature of this command is its ability to update the database schema without affecting the existing data. This ensures that your current data remains intact while the database schema is updated to meet the latest requirements of the application.

Prisma Studio

  • View your data
    npx prisma studio --schema ./prisma/mysql-schema.prisma
    # or
    npx prisma studio --schema ./prisma/postgresql-schema.prisma
    

This will sync your data models to your database, creating tables as needed.

Running the Application

  • Development Mode:

    npm run dev:server
    
  • Production Mode:

    npm run build
    npm run start:prod
    

Note

This code is in no way affiliated with WhatsApp. Use at your own discretion. Don't spam this.

This code was produced based on the baileys library and it is still under development.

Donate to the project.

PicPay

Buy me coffe - PIX

CHAVE PIX (Telefone): (74)99987-9409