This project is a simple yet powerful real-time chat application built using Python's socket programming and threading. It supports both terminal-based clients and a desktop GUI made with Tkinter. The server can handle multiple clients chatting simultaneously in real time.
project:
name: Real-Time Chatbot
tech_stack:
- Python
- Socket Programming
- Threading
- Tkinter
interfaces:
- Terminal-based chat client
- GUI-based chat client
communication: TCP sockets
concurrency: Multithreaded server & client
version: 1.0
license: MITreal_time_chatbot/
│
├── realtime_chatbot/
│ ├── __init__.py
│ ├── server.py # Core server code
│ ├── clients.py # Terminal-based client
│ └── gui_client.py # GUI-based client using Tkinter
├── screenshots/ # Images of terminal and GUI chat
├── pyproject.toml # Poetry dependency manager config
└── README.md # Project documentation
- Python 3.x
- Poetry (for managing dependencies)
pip install poetrypoetry install| Library | Purpose |
|---|---|
| socket | Real-time communication between server & clients |
| threading | Handles multiple clients concurrently |
| tkinter | GUI interface for chat client |
| scrolledtext | Scrollable chat window in GUI |
| simpledialog | Prompt for username in GUI client |
| poetry | Dependency and virtual environment management |
poetry run python -m realtime_chatbot.serverExpected output:
Server started on port 5555
Open a new terminal and run:
poetry run python -m realtime_chatbot.clientsIn another terminal, run:
poetry run python -m realtime_chatbot.gui_clientEach client will be prompted to enter a username upon joining.
Durga’s Chat:
Akanksha’s Chat:
Desktop Chat Window:
📁 Make sure to store these images in the
screenshots/folder inside your GitHub repository.
- 💬 Real-time chat communication
- 👩💻 Terminal and desktop (GUI) chat options
- 🧑🤝🧑 Multi-client support with threads
- 🪟 Scrollable chat window in GUI
- 🧾 Clean and readable messages with usernames
- 🔗 Uses
socketandthreadingfor efficient real-time communication - 🧱 Clean folder structure for CLI and GUI components
- 🧪 Easy to extend into a production-grade chat server
- 🎯 Great learning project for Python networking and GUI design
- 🕒 Add timestamps to messages
- 🔐 Add encrypted messaging (SSL/TLS)
- 🌐 Build a web version (FastAPI + WebSockets)
- 🤖 Integrate ChatGPT or LLM chatbot
- 📊 Save chat history in SQLite or MongoDB
- 📦 Dockerize the full application
Durga Rani M.Tech in Data Science & AI | Passionate about Python, Analytics, and Communication Systems
This project is licensed under the MIT License. See the LICENSE file for details.
- 💾 Inspired by real-world chat systems and client-server architecture
- 🧠 Built as a hands-on networking + GUI programming project
This project provides a solid foundation in:
- Python network programming
- Multithreaded client-server architecture
- GUI interface design using Tkinter
Whether you're building a collaborative tool or learning real-time systems, this is a great starting point!
💬 “Code is like humor. When you have to explain it, it’s bad.” – Cory House
-
Save this file as
README.mdin your root project folder -
Create a
screenshots/folder -
Add the 3 images you captured and rename them to:
durga_terminal.pngakanksha_terminal.pnggui_client.png
-
Commit and push everything to GitHub!
Would you like the following files added to complete your project setup?
- ✅
LICENSEfile (MIT) - ✅
.gitignorefile (Python + Poetry support)
Let me know and I’ll generate them for you!
---
Let me know if you’d like this exported as a downloadable file or if you need me to generate the `LICENSE`, `.gitignore`, or `requirements.txt` as well!


