Thanks to visit codestin.com
Credit goes to github.com

Skip to content

luiztim/realtime-chat-app

Repository files navigation

Description

Realtime chat app that automatically translates messages from Portuguese to English and vice-versa.

It uses Ably service for messages sending and IBM Watson Translation service for translation.

This is a Next.js project bootstrapped with create-next-app.

Thanks Guilherme Oka for the initial ideas on how to accomplish this. Thank you for all the fish as well...

watson-speech-translator.gif

Dependencies

In order to build this app, you will need:

Local dev pre-requirements

Ably

You'll need an API key from Ably to authenticate with the Ably Service. To get an API key, once you have created an Ably account:

  1. Visit your app dashboard and click on "Create New App".
  2. Give the new app a name
  3. Copy the Private API key once the app has been created. Keep it safe, this is how you will authenticate with the Ably service.

IBM Watson services

Provision the Language Translator service clicking here

Gather credentials

  • From the main navigation menu (☰), select Resource list to find your Language Translator service under Services.
  • Click on Language Translator service to find the Manage view where you can collect the API Key and URL

Building the Realtime Chat App

  1. Create a copy of .env.example file, naming it .env in the root of the directory, this is where we'll put the project's environment variables.
  2. Add your keys to the .env file:
ABLY_API_KEY=your-ably-api-key:goes-here
LANGUAGE_TRANSLATOR_APIKEY=your-watson-api-key:goes-here
LANGUAGE_TRANSLATOR_URL=your-watson-url:goes-here
  1. Navigate to project application directory and type into the console:
yarn

Yarn will download all project libraries

  1. To start your project, type into the console
yarn dev

Your project will be available on http://localhost:3000

  1. Alternatively, you can build the project for production using the following command
yarn build

Execute the production build using the following command

yarn start

Deploy the server

Click on button below for instructions on deploying the Node.js server.

cf

Use the web app

  1. Browse to your app URL

    • Use the URL provided at the end of your selected deployment option.
  2. Select the language you speak

  3. Start chatting

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors