Skip to main content

What is RealtimeChat?

RealtimeChat is a production-ready real-time chat API that enables instant messaging and collaboration in your applications. Built with modern technologies and best practices, it provides a robust foundation for implementing chat functionality with real-time updates, user authentication, and message management.

Architecture

RealtimeChat is built on a modern .NET stack with proven technologies:

ASP.NET Core 9

Latest .NET framework for high-performance web APIs

GraphQL with HotChocolate

Type-safe API with real-time subscriptions

PostgreSQL

Reliable relational database with advanced features

Entity Framework Core

Modern ORM for type-safe database operations

Technology Stack

  • Runtime: .NET 9.0 with C# 12
  • API Layer: Hybrid architecture with GraphQL (HotChocolate) for chat operations and REST endpoints for authentication
  • Database: PostgreSQL with Entity Framework Core for data persistence
  • Authentication: ASP.NET Core Identity with Google OAuth integration and REST API endpoints
  • Deployment: Docker support for containerized deployments
  • Mapping: AutoMapper for object-to-object mapping

Key Features

Real-time Messaging

GraphQL subscriptions deliver instant message updates to connected clients without polling

Chat Room Management

Create and manage chat rooms with participant tracking and room metadata

Message Operations

Send, edit, delete, and search messages with full-text search capabilities

OAuth Authentication

Secure user authentication with Google OAuth integration

PostgreSQL Storage

Reliable data persistence with Entity Framework Core migrations

Docker Ready

Pre-configured Docker setup for easy deployment and scaling

Real-time Subscriptions

The API uses GraphQL subscriptions to push message events to connected clients:
  • Message Added: Notified when new messages are sent
  • Message Updated: Notified when messages are edited
  • Message Deleted: Notified when messages are removed
Built-in full-text search using PostgreSQL’s trigram indexing allows users to quickly find messages across chat rooms, even with partial text matches.

Use Cases

RealtimeChat is ideal for applications that need:

Instant Messaging

Build chat applications with real-time message delivery

Team Collaboration

Enable team communication with organized chat rooms

Real-time Notifications

Push instant updates to users through WebSocket connections

Customer Support

Implement live chat support with message history

Social Platforms

Add chat features to social networking applications

Gaming Communities

Provide in-game chat and community messaging

API Architecture

RealtimeChat provides two complementary API surfaces:

GraphQL API

The GraphQL endpoint exposes chat functionality with:
  • Queries: Fetch chat rooms, messages, and filtered message results
  • Mutations: Send, edit, and delete messages
  • Subscriptions: Receive real-time updates for message events
All GraphQL operations are strongly typed and self-documenting through introspection.

REST Authentication Endpoints

Authentication is handled through ASP.NET Core Identity REST endpoints:
  • Registration: /account/register - Create new user accounts
  • Login: /account/login - Authenticate with email/password
  • OAuth: /auth/external-login/{provider} - OAuth authentication flow
  • User Management: /account/manage/* - Update user information
See the Authentication Overview for complete endpoint documentation.

Next Steps

Quick Start

Get RealtimeChat running in minutes

Installation

Detailed setup and configuration guide

API Reference

Explore the GraphQL API

Authentication

Configure OAuth and identity

Build docs developers (and LLMs) love