Giter Site home page Giter Site logo

receevi / receevi Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 14.0 2.63 MB

Receevi - The Open Source WhatsApp Business Solution

Home Page: https://receevi.com/

License: Other

TypeScript 93.65% CSS 2.82% JavaScript 2.29% PLpgSQL 0.12% Dockerfile 1.12%
automation whatsapp whatsapp-automation whatsapp-webhook whatsapp-webhook-receiver whatsapp-cloud-api whatsapp-bulk-messages whatsapp-cloud-api-client

receevi's Introduction

Receevi - The Open Source WhatsApp Business Solution

Shape project future with Your Feedback

Help us improve our open-source "Receevi" project! Share your thoughts and suggestions in our community discussion: Click here

* IN PROGRESS *

This project is meant to be used as whatsapp cloud api webhook receiver. This project is currently in progress.

Work done so far

  • Login with admin user working
  • Contacts list just like in whatsapp web
  • Can receive text message
  • Can send text message (Other messsage types are yet to be done) alt text

Roadmap

  • User should be able to view received all type of messages

Installation

Prerequisites

  • Whatsapp cloud API permanent token

  • Facebook app secret

  • Phone number ID and WhatsApp Business Account ID

  • Supabase account

    • Create an account and a project on https://supabase.com/
    • Get anon, service_role and project URL from there
  • Geenrate random JWT_SECRET_KEY

    • openssl rand -hex 32
  • Generate random WEBHOOK_VERIFY_TOKEN

    • openssl rand -hex 32

Vercel setup

  • Deploy to vercel
  • Wait till build is finishd and hit Continue to dashbaoard
  • Go to Settings > Environment variables
  • Add following environment variables
    • JWT_SECRET_KEY - JWT secret key you generated in prerequisites
    • WEBHOOK_VERIFY_TOKEN - Whatsapp webhook verify token you generated in prerequisites
    • WHATSAPP_ACCESS_TOKEN - Whatsapp cloud API permanent token
    • FACEBOOK_APP_SECRET - Facebook app secret
    • NEXT_PUBLIC_SUPABASE_URL - Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY - Supabase anon key
    • SUPABASE_SERVICE_ROLE - Supabase service role
    • WHATSAPP_API_PHONE_NUMBER_ID - Phone number ID
    • WHATSAPP_BUSINESS_ACCOUNT_ID - WhatsApp Business Account ID
  • Go to Deployment
  • Click on three dot icon on last deployment and click "Redeploy" to refersh environment variables

Supabase setup

  • Create account at https://supabase.com/
  • Create a project
  • Clone this repository in your Computer
    • git clone https://github.com/receevi/receevi.git
  • Install supabase cli from here - https://supabase.com/docs/guides/cli
  • Go to https://app.supabase.com/account/tokens and generate access token
  • Login into supabase cli
    supabase login
    
    • Paste access token in this command
  • Link supabase account (Reference Id can be found in Project Settings)
    supabase link --project-ref <Reference Id>
    • Get Reference Id from Supabase > Project Settings > General
  • Create database schema
    supabase db push
  • Create database schema
    supabase functions deploy
  • Go to Supabase > Authentication > Add user > Create New User
  • Enter email address and new password to create a user
  • Go to Supabase > Project Settings > Edge Functions
  • Add 2 new secrets
    • Secret name: WHATSAPP_ACCESS_TOKEN
    • Value: Whatsapp webhook verify token you generated in prerequisites
    • Secret name: WHATSAPP_BUSINESS_ACCOUNT_ID
    • Value: WhatsApp Business Account ID taken from developer console

Whatsapp setup

  • Go to https://developers.facebook.com/apps/
  • Select App
  • Go to Whatsapp > Configuration
  • Under Webook, click Edit button
  • Add callback URL
    • URL will be Vercel's deployment + /webhook
    • If your webhook deployment URL is https://some-project.vercel.app/ then Callback URL will be https://some-project.vercel.app/webhook
  • Add Verify token from environment variable WEBHOOK_VERIFY_TOKEN
  • Click Verify and save
  • Under Webhook fields click Manage
  • Click subscribe checkbox in messages row and hit Done

Test the integration

  • Send test message to the whatsapp number
  • Visit deplyoment URL
  • See if message is received

Running locally

  • Copy .env.example into .env.local
  • Fill all environment variables in .env.local
  • Run the development server:
    npm run dev
  • Open http://localhost:3000 with your browser to see the result.

Disclaimer

This project is not affiliated with Whatsapp Inc. Whatsapp is a registered trademark of Whatsapp, Inc.

receevi's People

Contributors

junedkhatri31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.