Table of Contents
Chat-Server-Terminal is a terminal-based client-server chat system written in C++, featuring an interactive TUI(Text User Interface) built with FTXUI, presistent user management using SQLite, and a modular architecture designed with real-world system principles.
The project focuses on engineering clarity, separation of concerns, and Linux-first development, rather than begin a simple demo chat app.
-
Client-Server Architecture (TCP sockets)
-
Interactive Terminal UI (FTXUI)
-
User Authentication System
- Login
- Registration
- Password validation
-
SQLite Database Integration
- Persistent user storage
- Unique usernames
-
Post-Login Menu System
- Enter Chat
- Settings
- Server Info
- Logout
-
Settings Panel
- Account settings
- Network info
-
Server Information Panel
- Local IPs
- Active port
-
Keyboard + Mouse Navigation
-
Modular, Extensible Codebase
These instructions will help you build and run chat-server-termianl.
Make sure you have the following installed on you system:
-
g++ version 11 or higher
-
cmake version 3.21 or higher
-
FTXUI version 2.0 or higher
-
Linux-based system (Arch, Debian, Ubuntu, WSL)
Clone the repository and build the project using the provided Makefile.
$ git clone https://github.com/zoldyck13/chat-server-terminal.git
$ cd chat-server-terminal
Build using MakeFile:
$ make
The compiled binaries will be generated in the build directory.
chat-server-terminal/
├── include/
│ ├── client/
│ │ ├── ChatState.hpp
│ │ ├── ChatUI.hpp
│ │ ├── ClienSocket.hpp
│ │ ├── Login.hpp
│ │ ├── Menu.hpp
│ │ ├── Register.hpp
│ │
│ ├── server/
│ ├── Dbserver.hpp
│ ├── Launch.hpp
│ ├── login.hpp
│ ├── Menu.hpp
│ ├── Register.hpp
│ ├── Settings.hpp
│ ├── User.hpp
│ ├──utility.hpp
│ ├── handelclient.hpp
│ └── Server.hpp
│
├── src/
│ ├── client/
│ │ ├── client_ftxui.cpp
│ │ ├── ClientSocket.cpp
│ │
│ ├── server/
│ ├── Dbserver.cpp
│ ├── mainServer.cpp
│ ├── Server.cpp
│
│
├── assets/
├── Makefile
├── README.md
├── LICENSE
└── admin.db
1. Start the server:
$ ./server.out
2. Start the client:
$ ./clientui.out
3. Register or log in
4. Navigate using keyboard or mouse
5. Ente chat or manage settings
- Real-time multi-client chat
- Message history presistence
- Scrollbale chat view
- User roled(admin / user)
- Encryption (TLS)
- headless server mode
- Configuration file support
-
Designing client–server systems in C++
-
Managing stateful TUIs without blocking render loops
-
Integrating SQLite safely
-
Handling event-driven UI with FTXUI
-
Thinking beyond “it works” → toward maintainable systems
This project is licensed under the MIT License - see the LICENSE file for details.
