Skip to content

MGSE97/SignalR-Chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SignalR Chat

SignalR Chat demo with authorization using Identity Server. Written in ASP.NET Core 3.1, MVC and JS. Based on Tutorial: Get started with ASP.NET Core SignalR and extended with user management and private messages.

Getting Started

Clone this repository, and open solution using Visual Studio 2019 or later. Then Build and Run the SignalR project.

Prerequisites

  • Visual Studio 2019
  • ASP.NET Core 3.1

Solution

Projects:

  • ChatCore - Complete chat logic
  • SignalR - Website presentation

Chat

All chat logic has moved to ChatCore project. This way is simpler to change Presentation Layer (Website). It`s bit more complicated, but all methods and classes are documented.

Still uses simplest in memory storage methods for users.

Interesting paths:

~/Startup.cs
~/Hubs/ChatHub.cs
~/Services/ChatService.cs
~/Services/MessageHandlers

Website

Website is simple MVC template with In-application Authorization.

To use chat log-in as user, then Chat tab will appear at main menu. Navigate to Chat view and send messages.

It's probably better to have multiple clients connected, you can use privacy mode or other browsers.

Interesting files:

~/Startup.cs
~/wwwroot/js/chat.js
~/wwwroot/lib/microsoft/signalr
~/Views/Home/Chat.cshtml

Features

  • User accounts
  • SignalR chat
    • Private messages /pm: username message
    • User list /users
    • Connect messages

Built With

Author

License

This project is licensed under the MIT License - see the LICENSE.txt file for details

Donate

Found this project useful or want to buy me a 🍺, ☕, 🍵. Consider donating using buttons bellow.

Donate PayPal Donate Crypto

About

SignalR Chat demo with Identity authorization. ASP.NET Core 3.1

Resources

License

Stars

Watchers

Forks

Packages

No packages published