Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Logic Dynamics Chat

Real-time β€’ Secure β€’ Fast
A full-stack chat application built with .NET 10, SignalR, and .NET MAUI β€” deployed to a live VPS with HTTPS.

Logic Dynamics .NET 10 SignalR MAUI License


πŸš€ Live Demo

Service URL
🌐 API (Production) https://chat-api.logicdynamics.net
πŸ“‘ SignalR Hub https://chat-api.logicdynamics.net/hubs/chat
πŸ“„ API Schema https://chat-api.logicdynamics.net/openapi/v1.json

✨ Features

  • ⚑ Real-time messaging via SignalR WebSockets
  • πŸ’¬ Chat bubbles β€” sent (right, blue) vs received (left, dark)
  • 🏠 Room-based chat β€” join any named room
  • πŸ’Ύ Message persistence β€” EF Core + SQLite
  • πŸ”’ HTTPS β€” SSL via Let's Encrypt
  • 🌍 Cross-platform β€” Windows, Android, iOS, macOS
  • 🎨 Logic Dynamics branded UI β€” deep navy, cyber cyan, signal red
  • πŸ‘₯ Multi-user β€” unlimited users per room
  • πŸ”„ Auto-reconnect β€” SignalR handles dropped connections

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              .NET MAUI Client                        β”‚
β”‚   ChatPage ──► ChatViewModel ──► ChatService         β”‚
β”‚                                      β”‚               β”‚
β”‚                   SignalR Client SDK β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚ WebSocket (WSS)
                                β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                β”‚   ASP.NET Core       β”‚
                                β”‚   Web API (.NET 10)  β”‚
                                β”‚                      β”‚
                                β”‚  /hubs/chat          β”‚
                                β”‚       β–Ό              β”‚
                                β”‚   ChatHub            β”‚
                                β”‚       β–Ό              β”‚
                                β”‚  /api/messages       β”‚
                                β”‚       β–Ό              β”‚
                                β”‚   EF Core            β”‚
                                β”‚       β–Ό              β”‚
                                β”‚   SQLite DB          β”‚
                                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
                                β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                β”‚   Ubuntu 24 VPS      β”‚
                                β”‚   Nginx (reverse     β”‚
                                β”‚   proxy + SSL)       β”‚
                                β”‚   systemd service    β”‚
                                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—‚οΈ Solution Structure

ChatApp.sln
β”œβ”€β”€ ChatApp.API/              β†’ ASP.NET Core Web API (.NET 10)
β”‚   β”œβ”€β”€ Data/
β”‚   β”‚   └── ChatDbContext.cs
β”‚   β”œβ”€β”€ Hubs/
β”‚   β”‚   └── ChatHub.cs
β”‚   β”œβ”€β”€ Repositories/
β”‚   β”‚   β”œβ”€β”€ IMessageRepository.cs
β”‚   β”‚   └── MessageRepository.cs
β”‚   β”œβ”€β”€ Endpoints/
β”‚   β”‚   └── MessageEndpoints.cs
β”‚   └── Program.cs
β”‚
β”œβ”€β”€ ChatApp.MAUI/             β†’ .NET MAUI Cross-Platform Client
β”‚   β”œβ”€β”€ Services/
β”‚   β”‚   └── ChatService.cs
β”‚   β”œβ”€β”€ ViewModels/
β”‚   β”‚   └── ChatViewModel.cs
β”‚   β”œβ”€β”€ Views/
β”‚   β”‚   └── ChatPage.xaml
β”‚   └── Resources/
β”‚       └── Images/
β”‚           └── ld_logo.png
β”‚
└── ChatApp.Shared/           β†’ Shared Models & DTOs
    β”œβ”€β”€ Models/
    β”‚   └── ChatMessage.cs
    └── DTOs/
        └── MessageDtos.cs

πŸ› οΈ Tech Stack

Layer Technology
Runtime .NET 10
Backend ASP.NET Core Web API
Real-time SignalR (WebSockets)
Database SQLite + Entity Framework Core
Client .NET MAUI
Pattern MVVM + Repository
Server Ubuntu 24 VPS (Hostinger)
Proxy Nginx
SSL Let's Encrypt (Certbot)
Process systemd

⚑ Quick Start

Prerequisites

dotnet workload install maui

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/chatapp-logicdynamics.git
cd chatapp-logicdynamics

2. Add project references

dotnet add ChatApp.API reference ChatApp.Shared
dotnet add ChatApp.MAUI reference ChatApp.Shared

3. Run the API

cd ChatApp.API
dotnet run
# API running at http://localhost:5246

4. Run the MAUI App

Open a new terminal:

cd ChatApp.MAUI
dotnet run -f net10.0-windows10.0.19041.0

5. Chat!

  • Enter your name
  • Enter a Room ID (e.g. general)
  • Click ⚑ JOIN ROOM
  • Open a second instance with a different name β€” real-time chat! πŸ”₯

🌐 Deploying to VPS

Publish the API

cd ChatApp.API
dotnet publish -c Release -o ./publish

Upload to server

scp -r ./publish/* root@YOUR_VPS_IP:/var/www/chatapp-api/

systemd Service

Create /etc/systemd/system/chatapp-api.service:

[Unit]
Description=Logic Dynamics Chat API
After=network.target

[Service]
WorkingDirectory=/var/www/chatapp-api
ExecStart=/root/.dotnet/dotnet ChatApp.API.dll --urls "http://0.0.0.0:5246"
Restart=always
RestartSec=10
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_ROOT=/root/.dotnet

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable chatapp-api
systemctl start chatapp-api

Nginx Config

server {
    listen 80;
    server_name chat-api.yourdomain.com;

    location / {
        proxy_pass http://localhost:5246;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

SSL Certificate

certbot --nginx -d chat-api.yourdomain.com

πŸ“‘ API Reference

SignalR Hub β€” /hubs/chat

Method Parameters Description
JoinRoom roomId, userName Join a chat room
SendMessage roomId, senderName, content Send a message
LeaveRoom roomId Leave a chat room

Client listener:

connection.On<ChatMessage>("ReceiveMessage", msg => {
    // Handle incoming message
});

REST Endpoints

Method Endpoint Description
GET /api/messages/{roomId} Get room message history

🎨 Design System

Token Color Usage
Deep Navy #0A0F1E Background
LD Blue #0057FF Primary / Sent bubbles
Cyber Cyan #00D4FF Accents / Headers
Signal Red #FF003C Logo / Alerts
Dark Card #0D1B3E Received bubbles

πŸ”‘ Key Learnings

Building this project covers:

  • SignalR β€” WebSocket hub, groups, connection lifecycle
  • Entity Framework Core β€” SQLite, migrations, repository pattern
  • Minimal APIs β€” endpoint mapping, OpenAPI
  • MAUI MVVM β€” data binding, ObservableCollection, ICommand
  • Linux DevOps β€” systemd, Nginx, SSL, VPS deployment
  • Clean Architecture β€” Shared contracts, separation of concerns

πŸ“ Related Projects

Check out more Logic Dynamics projects at logicdynamics.net


πŸ“„ License

MIT License β€” see LICENSE for details.


Built with πŸ”₯ by Logic Dynamics

Code. Build. Innovate.

About

Real-time chat app built with .NET 10, SignalR & MAUI

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages