Flutter Chat App

Flutter has very quickly found its way to the topmost choice for a mobile app development framework. It is undoubtedly very neat, expressive, flexible & fast. There is plenty of prebuilt packages available to create almost any type of layout in flutter.
In this tutorial, I will help you create a chat app in flutter that communicates with a Socket.IO chat service written in NodeJs.

Prerequisites


This post will help you to create a Chat Server with NestJs + socket.io + MongoDB. We will develop the service in NestJs, expose the WebSocket gateway using socket.io & store the messages in MongoDB.
Follow the steps below:

Step#1: Create a NestJs project

I prefer to use Nest CLI for the same. If you do not have Nest CLI, download the package through NPM using the command:

$ npm install -g @nestjs/cli

To create a NestJs app (I am naming my project ‘chat-service’; give any name of your choice), open a console in your preferred folder, and run the command:

$ nest new chat-service


Let’s face it, we think of deploying our applications on cloud for FREE every time we are ready with a few features, be it to enable other applications to integrate with our APIs or to demo the features to our stakeholders.
When picking a cloud provider, Azure probably is alluring the most these days. It is increasingly gaining popularity and more and more businesses are adopting it for their cloud computing needs. Ease of usage, an array SaaS apps, great docs & IT support, comparatively cheaper, etc. …


PassportJs is one of the best authentication middleware libraries for NodeJs applications. It supports more than 500 authentication strategies including the most common strategies like username-password, Google, Facebook, Twitter, etc. Its flexibility and ease of integration puts it at the topmost priority when selecting a authentication middleware library for NestJs apps.

If you are using Firebase for your authentication needs, you can use the ‘passport-jwt’ strategy provided by PassportJs. Follow the steps below to know how.

Step#1: Create a Firebase Project

Create a Firebase project and add a web app.

Follow the steps here.

Step#2: Create a NestJs app

Create a NestJs project. I prefer to use Nest CLI for…


Now that we are always connected to the internet, do you really need to setup a local environment (read: database) for your projects?

MongoDB is undoubtedly the most popular, and probably one of the fastest-growing NoSql databases in the market. It is an open-source, document-oriented database that provides high scalability and performance. MongoDB is distinctly popular in the NodeJs community and is widely adopted in the NodeJs based tech stacks like MEAN, MERN, MEVN, etc.

To obtain a cloud hosted free MongoDB cluster, ‘MongoDB Atlas’ is the solution. Follow the steps below:

Step#1: SignIn to MongoDb Atlas

SignIn to MongoDB Atlas. You would be prompted…


VueJs needs no introduction and neither does the need for a robust authentication mechanism in a frontend application. Setting up an authentication server to accept all methods of signing in: Email/Password, Facebook, Google, Twitter, etc., maintain user sessions and integrating with your client & resource server is quite a task. Firebase takes away more than half the pain by providing authentication service along with integration libraries out of the box and leaves you to integrate it into your favorite frameworks.
In this post, we will see how to setup firebase authentication in a VueJs frontend application.

Step#1: Create a Firebase project

Create a Firebase project…


NestJs is an excellent framework on NodeJs written in TypeScript and/or JavaScript. Its efficiency and scalability enable you to create a range of varied application backends. This makes it very important to have a rigid security mechanism in your apps.
This post will help you secure your NestJs APIs through Firebase Auth.

Step#1: Create a Firebase project and add a web app.

Follow the steps here.

Step#2: Create a NestJs project.

I prefer to use Nest CLI for the same. If you do not have Nest CLI, download the package through NPM using the command:

$ npm install -g @nestjs/cli

To create a NestJs app (I am naming my project ‘firebase-auth’; give any name of…


To setup Firebase in a backend server, the Firebase-Admin SDK is required which needs a Firebase service account.
Follow the steps below to setup a Firebase service account.

Step#1: Create a Firebase project and add a web app.

Follow the steps here.

Step#2: Generate New private key

Go to Settings -> Service accounts in Firebase console and Press ‘Generate new private key’.


Firebase provides a bucket full of tools and services which can be accessed by iOS, Android, or a Web app. Popular tools provided by Firebase like authentication, storage, hosting, etc. let you focus on application logic and give the headache of setting these up on your own, a rest.
Let’s create a Firebase project and setup different apps in these very easy steps:

Step#1: Create a Firebase project

a) Go to Firebase Console.

b) Click on Add Project.

Vikash Kumar

A passionate coder, technology enthusiast, tutor and continually falling in love with JavaScript. Currently exploring latest JS frameworks and Flutter.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store