# farahchannir/farah_channir_chatserver architecture

> Architecture diagram of the GitHub repository farahchannir/farah_channir_chatserver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/farahchannir/farah_channir_chatserver
- Repository: https://github.com/farahchannir/farah_channir_chatserver

## Overview

This is a minimal console chat client paired with an ASP.NET Core WebSocket server. A user enters a message in the client and ends it with “xx”; the client sends it to `/send`. The server receives it, displays it in its console, waits for a server-operator reply ending with “xx”, and sends that reply to the client. The sampled code shows one connected client handled at a time; no persistence or broadcast subsystem is evident.

Main entry points: [`Farah_Channir_ChatServer/Startup.cs`](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Startup.cs) (WebSocket route), [`Farah_Channir_Client/Program.cs`](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_Client/Program.cs) (Client loop), [`Farah_Channir_ChatServer/Program.cs`](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Program.cs) (Host startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Console Client"]
  node_client_program["Client loop<br/>[Program.cs]"]
end

subgraph group_server["WebSocket Server"]
  node_server_host["Host startup<br/>[Program.cs]"]
  node_server_pipeline["WebSocket route<br/>[Startup.cs]"]
end

node_client_user(("Chat user"))
node_server_operator(("Server operator"))

node_client_user -->|"enters messages"| node_client_program
node_client_program -->|"connects and sends"| node_server_pipeline
node_server_host -->|"configures app"| node_server_pipeline
node_server_pipeline -->|"displays message"| node_server_operator
node_server_operator -->|"enters reply"| node_server_pipeline
node_server_pipeline -->|"sends reply"| node_client_program

click node_client_program "https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_Client/Program.cs"
click node_server_host "https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Program.cs"
click node_server_pipeline "https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Startup.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_program,node_client_user toneBlue
class node_server_host,node_server_pipeline toneAmber
class node_server_operator toneMint
```

## Components

### Console Client

- [Client loop](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_Client/Program.cs): `Farah_Channir_Client/Program.cs`

### WebSocket Server

- [Host startup](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Program.cs): `Farah_Channir_ChatServer/Program.cs`
- [WebSocket route](https://github.com/farahchannir/farah_channir_chatserver/blob/master/Farah_Channir_ChatServer/Startup.cs): `Farah_Channir_ChatServer/Startup.cs`

### Other components

- **Chat user**
- **Server operator**

## Connections

- Chat user → Client loop: enters messages
- Client loop → WebSocket route: connects and sends
- Host startup → WebSocket route: configures app
- WebSocket route → Server operator: displays message
- Server operator → WebSocket route: enters reply
- WebSocket route → Client loop: sends reply
