In this app, we're going to build a self destructing voice chat app. The app deletes the message after the recipient has listened to the message and left the chat screen.
This demo app uses the following:
In order to run the demo application locally, you'll need to follow the following steps:
- Create an account with CometChat Pro
- Go to the CometChat Pro Dashboard and create a new app called self-destruct-voice-app .
- You will be redirected to your newly created app, now click on the Explore button to view your app details.
- Go to the API Keys tab and you will see an already generated App ID and API Key
- Copy the details from the list with Full Access as Scope.
- Clone the repository by running
git clone https://github.com/cometchat-pro-tutorials/self-destructing-voice-notes
in the terminal and open it with a code editor of your choice. cd
into the newly created folder and runnpm install
to install dependencies.- At the root of your project foleder, create a
.env
file and paste the following snippet.
REACT_APP_COMETCHAT_API_KEY=YOUR_API_KEY
REACT_APP_COMETCHAT_APP_ID=YOUR_APP_ID
- Run
npm start
and wait for the development server to start. - Open the page
http://localhost:3000
on two different browsers to see the app. - Use any of the default usernames SUPERHERO1, SUPERHERO2, SUPERHERO3 to login and start sending voice messages.