For version 1 visit here
- Clone the repository
- cd into the repository
- Run
npm install - copy the
.env.samplefile to.env.localand fill in the required details
cp .env.sample .env.local- Run
npm run devto start the server - Visit
http://localhost:3000to view the app
- MongoDB URI -
MONGODB_URIthis is the connection string to your MongoDB database can be gotten from MongoDB Atlas or your local MongoDB instance - MONGODB_DB -
MONGODB_DBthis is the name of the database you want to use preferably useusecret-dev - GOOGLE_CLIENT_ID -
GOOGLE_CLIENT_IDthis is the client id of your google oauth app - GOOGLE_CLIENT_SECRET -
GOOGLE_CLIENT_SECRETthis is the client secret of your google oauth app - NEXTAUTH_URL -
NEXTAUTH_URLthis is the url of your app in development it should behttp://localhost:3000 - WA_PHONE_NUMBER -
WA_PHONE_NUMBERthis is the phone number you want to use to send the whatsapp message - CLOUD_API_ACCESS_TOKEN -
CLOUD_API_ACCESS_TOKENthis is the access token for the facebook cloud api - CLOUD_API_VERSION -
CLOUD_API_VERSIONthis is the version of the facebook cloud api , default isv20.0 - REDIS_REST_URL -
REDIS_REST_URLthis is the url of the redis instance you want to use - REDIS_REST_PORT -
REDIS_REST_PORTthis is the port of the redis instance you want to use - REDIS_REST_PASSWORD -
REDIS_REST_PASSWORDthis is the password of the redis instance you want to use - REDIS_REST_HOST -
REDIS_REST_HOSTthis is the host of the redis instance you want to use
- Visit MongoDB Atlas and create an account
- Create a new cluster
- Create a new database
- Create a new user
- Add the user to the database
- Get the connection string and use it as the
MONGODB_URIin the.env.localfile
- Install MongoDB on your local machine
- Create a new database
- Create a new user
- Add the user to the database
- Get the connection string and use it as the
MONGODB_URIin the.env.localfile
- Visit Google Cloud Console
- Create a new project
- Enable the Google+ API
- Create OAuth credentials
- Get the client id and client secret and use them as the
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETin the.env.localfile
- Visit Facebook Developers
- Create a new app
- Get the access token and use it as the
CLOUD_API_ACCESS_TOKENin the.env.localfile
- Visit Upstash
- Create a new redis database
Note: if using REDIS_REST_URL no need to use REDIS_REST_HOST, REDIS_REST_PORT and REDIS_REST_PASSWORD
- Get the url and use it as the
REDIS_REST_URLin the.env.localfile
- Install Redis on your local machine
- On MacOS
brew install redis
- On Ubuntu
sudo apt-get install redis-server
- On Windows (recommended to use WSL)
use ubuntu on WSL and follow the ubuntu steps
- Start the redis server
- On MacOS
brew services start redis
- On Ubuntu
sudo systemctl start redis
- Get the host, port and password and use them as the
REDIS_REST_HOST,REDIS_REST_PORTandREDIS_REST_PASSWORDin the.env.localfile- DEFAULT PORT: 6379
- DEFAULT PASSWORD: null
- DEFAULT HOST: localhost