Inspiration

Being an immigrant, I have a lot of Indian friends who often text me in my native Indian language. I get tired of translating them by copying-pasting them from my Apple messaging application to google translator. That's how I got an idea that what if there is an one stop chatting application which can translate any text back and forth between multiple people instantly. I realized that it is just not me who is dealing with this issue, there are many others who also deal with these kinds of similar problems. Quick Fact: Do you know that out of the world’s 7.5 billion habitants, only 1.5 billion speak English – that’s less than 20% of the Earth population. There is so much diversity out in the world and I believe everyone should know at least one foreign language. Think about a scenario when you want to talk to someone who does not understand or speak your language. Think about a scenario when big businesses pay to translators to help them do business with foreign companies. There are many problems like these. Therefore, I created 'GLOBE CHAT' application to help solve these problems.

What it does

You can instantly translate messages and send it to anyone on this planet as long as they are on a same channel as you are. It’s UI is very easy to understand. You enter your name, select one of your favorite channels and send a message in any language you want. Then Voila! You don’t have to go to Google translate to translate the text and copy-paste it into your chat box. You can just type message in your language and send it with different language to any one who is online in any of the channels on the application.

How I built it

I created a Node.js and Angular.js application. All the UI is following Angular framework. I set up the http server using Node.js to route the traffic on my application to main page. I made a simple UI form which collects username, channel, and message. Through this data, I managed to create Join, leave, and Send functionality in my app. Every time user logs into specific channel or leaves the channel, it creates a log on a backend which notify me if something goes wrong. Then, I created a socket.io protocol to establish client-server messaging service. Once client and server can pass text and information through websocket, I then implemented Google-translate-API into project to deal with instant translations. I created a logic in such way that I send the retrieved messaging data to API from what user messaged in a channel. Google translate API function translates text into specific language using language code (for example: 'English':'en', 'Spanish':'es'). I created a logic function which takes user's preferred language and fills in the Google translate function parameter with the desire language code. This whole process takes less than a second. Throughout the process, I was testing my application from all perspectives and I was constantly trying to break my code so that I can find loopholes and fix them right away.

Challenges I ran into

  • It was very hard to set up a messaging protocol for client-server application using socket.io because initially I didn’t knew anything about protocols.
  • Setting up a Google Translate API was a challenging task because I wasn’t sure how to use API key (Json) in project.
  • It was not a easy task to host angular.js and node.js application oh Herokuapp (hosting service) because both angular and node run on their individual server.
  • I never used Typescript.js before this hackathon so learning how to work with Typescript.js was challenging for me.

Accomplishments that I'm proud of

  • Build a working chat application which can connect multiple people from all around the world and remove all the language barriers between them.
  • I am proud that my application can handle hundreds of the user at a time which can easily scale up by inserting more dynos (linux servers) in my Herokuapp project.
  • I went beyond my comfort zone and build an application with very minimum experience with Google API, socket.io, and Typescript.
  • I am proud that I didn't gave up at any point because there were many points during project where I thought that this is not possible and wouldn't work, but I kept dealing with issues long enough that I was able to pull this off.

What I learned

  • I learned how to establish messaging protocol between client and server over http server.
  • I learned how to extract or insert string into cache memory for the website which completely get rid of the need of database.
  • I learned how to deploy angular and nodejs servers together on hosting application.

What's next for GLOBE CHAT APPLICATION

  • I will create a ios and android version for my chat application and publish it on Playstore and Appstore.
  • I will add more functionalities in my project (For example: user can create their own custom channels and invite others onto application)
Share this project:

Updates