You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ermin Bronja 6dd08446e2 Added README file and seeding functionality 3 yıl önce
.vs Online status for user 3 yıl önce
Backend Added README file and seeding functionality 3 yıl önce
Frontend before presenting application 3 yıl önce
README.md Added README file and seeding functionality 3 yıl önce

README.md

SignalR and React chat


Welcome to our SignalR and React chat app. In next sections we will walk you through our project, setting it up on your computer, running tests and last but not the least walk you through tools that we used:

  • Description
  • Setup
  • Testing

Description


This is an internal Chat app project that was done by Diligent. Our project is hosted on our local git

Tech stack


Backend was done using ASP.NET Core 6. For database we used MongoDb, which is a NoSql database. Frontend was done using React with Redux Toolkit for state management

Development environment


  • Visual Studio 2022 - Used as the primary code editor for backend development
  • Visual Studio Code - Used as the primary code editor for frontend development
  • Compass - GUI for MongoDb
  • Postman
  • Swagger
  • git

Setup


Here we will show you how to set up project and run it in localhost.

  • Database setup
  • Project setup
  • Backend setup
  • Frontend setup
  • Database initialization

Database setup


Please follow the official tutorial on installing and running the latest Mongo database which can be found on this link:

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

Project setup


In order to run our project, you need to clone it from git first. Open terminal (cmd and powershell work as well) in folder that you want this project to be and run command

git clone http://git.dilig.net/stefan.stamenovic/WebAPISignalRChat.git 

Backend setup


To run backend run command:

dotnet run 

Congratulations! You now ran backend api for chat app. You can see swagger documentation in the browser with the url

https://localhost:5116

Frontend setup


To run frontend first you have to install required packages, run command:

npm install 

Then you have to start frontend locally, run command:

npm start 

Congratulations! You now ran frontend for chat app. App url

https://localhost:3000

Database initialization


When you run backend first time, it will add some records in database which is required to test app. Database should be initialized with

  • Users
  • Roles
  • Rooms
  • Requests

Testing


Here we will show you how to run tests and see code coverage

Run tests


To run tests, you have to select dropdown Test > Run All Test, or press shortcut Ctrl + R, A

Code Coverlet Setup


Please follow tutorial to setup and run code coverlet library which can be found on this link:

https://www.code4it.dev/blog/code-coverage-vs-2019-coverlet