Chat application developed using Nest framework and TypeScript.
In backend site, we use Mongoose, which is a Node.js-based Object Data Modeling (ODM) library for MongoDB. It is akin to an Object Relational Mapper (ORM) such as SQLAlchemy for traditional SQL databases.
Clone the code from This Repository using the commmand
$ git clone https://github.com/toseef-ahmd/chat-app-backendAfter you have cloned the repository, Navigate to chat-app-backend using
$ cd chat-app-backendRun
$ npm installThis will install the dependencies as defined in Package.json file.
As of now, we have only created the Database schema, so you do not need to run the entire application. We have provided a dbdump.js file which you can use to populate data into MongoDB.
In order to create the database and dump data into collections, you need following tools.
- MongoDB Client. (Installed when you run
npm install) - Docker. (Here)
- Docker Compose file. (Provided in the code repository.)
- dbdump.js file. (Provided in the root directory of the code repository.)
- MonngoDB Compass (Here) or Studio 3T (Here)
Once you are in the root directory of the project, run
$ docker-compose up -dThis will setup a database in the docker container.
Once it is created, run
$ node dbdump.jsOpen MongoDB Compass or Studio 3T (Whichever you have downloaded), and create a new connection using following parameters.
- Host: localhost
- PORT: 27017
- DB_NAME: chatapp
- username: rootuser
- password: rootpass
Here is the connection string that you may use in the connection manager.
$ mongodb://rootuser@localhost:27017/adminOnce you are logged in, you would be able to view the collections and data inside them.
Here is the ER diagrams of the database:

Nest is MIT licensed.