Tutorials ASP.NET Core Complete Tutorial (ShopNest)

Build a Real-Time Chat App with SignalR and ASP.NET Core

Learn Build a Real-Time Chat App with SignalR and ASP.NET Core in our free ASP.NET Core Complete Tutorial (ShopNest) series. Step-by-step explanations, examples, and interview tips on Toolliyo Academy.

On this page
Build a Real-Time Chat App with SignalR and ASP.NET Core — ShopNest Capstone
Article 70 of 75 · Module 9: Real-World Projects · ShopNest Team Collaboration Chat
Target keyword: signalr chat asp.net core · Read time: ~36 min · .NET: 8 / 9 · Project: ShopNest Team Collaboration Chat

Introduction

Capstone #6: ShopNest Teams Chat — Identity auth, DMs, channels, message history, online status, typing indicator, read receipts, file sharing, Bootstrap UI.

After this article you will

  • ChatHub with groups per channel
  • Private messages user-to-user
  • Persist messages in SQL Server
  • Typing + read receipts + presence
  • File upload in chat

Prerequisites

Architecture & design

public class ChatHub : Hub
{
    public async Task SendDirectMessage(string toUserId, string text) { ... }
    public async Task SendChannelMessage(string channelId, string text) { ... }
    public async Task Typing(string channelId) =>
        Clients.OthersInGroup(channelId).SendAsync("UserTyping", Context.UserIdentifier);
}

Hands-on build guide — ShopNest Team Collaboration Chat

  1. Entities: Channel, ChannelMember, Message, DirectMessage.
  2. Razor Pages chat UI + SignalR JS client.
  3. OnConnectedAsync sets user online in DB.
  4. Read receipt: mark Message.ReadAt when visible.
  5. File share: upload to blob; message contains URL.

Common pitfalls

  • Clients.All for channel message — leaks to wrong users; use Groups.
  • No message pagination — load last 50 on scroll up.

Interview & portfolio questions

Q: Scale chat?
A: Redis backplane (Article 43) + sticky sessions or Azure SignalR Service.

Summary

  • Real-time capstone using SignalR + Identity
  • DM + channels mirror Slack/Teams basics
  • Portfolio demo impresses in live coding rounds

Previous: Clean Architecture REST API
Next: Blazor Complete Guide

FAQ

Azure SignalR Service?

Managed scale-out when self-hosted Redis insufficient.

End-to-end encryption?

TLS in transit; app-level E2E is separate advanced topic.

Questions on this lesson 0

Sign in to ask a question or upvote helpful answers.

No questions yet — be the first to ask!

ASP.NET Core Complete Tutorial (ShopNest)
Course syllabus
Module 1: Foundations
Module 2: Entity Framework Core
Module 3: Dependency Injection & Middleware
Module 4: Authentication & Security
Module 5: Web API
Module 6: Advanced Architecture
Module 7: Testing
Module 8: Deployment & DevOps
Module 9: Real-World Projects
Module 10: Advanced Topics
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details