Skip to main content

A cross-platform terminal-based real-time chat application built with Python.

Project description

SHANTER

   _____ _    _          _   _ _______ ______ _____
  / ____| |  | |   /\   | \ | |__   __|  ____|  __ \
 | (___ | |__| |  /  \  |  \| |  | |  | |__  | |__) |
  \___ \|  __  | / /\ \ | . ` |  | |  |  __| |  _  /
  ____) | |  | |/ ____ \| |\  |  | |  | |____| | \ \
 |_____/|_|  |_/_/    \_\_| \_|  |_|  |______|_|  \_\

A cross-platform terminal-based real-time chat application for developers, built with Python.

Python Platform License

GitHub
https://github.com/shreyash9999/shanter

PyPI
https://pypi.org/project/shanter/


Overview

SHANTER is a terminal-first real-time chat application designed for developers who prefer working from the command line. It provides a lightweight, cross-platform chat experience with user authentication, private messaging, group conversations, and file transfer through a central server.

The project focuses on clean architecture, maintainability, and simplicity while demonstrating practical networking concepts such as TCP sockets, framed JSON protocols, concurrent client handling, and persistent user management.


Features

Authentication

  • User registration
  • Secure password hashing
  • Login / Logout

Messaging

  • Private one-to-one messaging
  • Online user discovery
  • User search

Groups

  • Create groups
  • Join groups
  • Leave groups
  • Delete groups
  • Group messaging

File Transfer

  • Send files directly to online users
  • Automatic download location
  • Duplicate filename protection

Engineering

  • Cross-platform support
  • Structured JSON protocol
  • SQLite persistence
  • Multi-threaded server
  • Logging
  • Unit tests
  • Ruff linting
  • Packaged on PyPI

Installation

Install from PyPI

pip install shanter

Requirements

  • Python 3.11+
  • Developed and tested using Python 3.11.5

Quick Start

Start the server

python -m server.main

Start the client

shanter shell

Available Commands

register

shell

version

Inside the interactive shell:

online

chat <username>

group create <name>
group join <name>
group leave <name>
group delete <name>
group list
group chat <name>

send <filepath> <username>

help

exit

Architecture

               SHANTER

     +-----------------------+
     |      CLI Client       |
     +-----------------------+
                |
          TCP + JSON Protocol
                |
     +-----------------------+
     |    SHANTER Server     |
     +-----------------------+
       |        |         |
 Authentication Groups Messaging
                |
            SQLite Database

Project Structure

shanter/
│
├── client/        Client application
├── server/        Server implementation
├── common/        Shared utilities and protocol
├── tests/         Unit tests
├── data/          SQLite database
├── README.md
├── pyproject.toml
└── LICENSE

Development

Clone the repository:

git clone https://github.com/shreyash9999/shanter.git
cd shanter

Create a virtual environment:

python -m venv .venv

Activate it:

macOS / Linux

source .venv/bin/activate

Windows

.venv\Scripts\activate

Install dependencies:

pip install -e .

Run the server:

python -m server.main

Run the client:

shanter shell

Testing

Run the complete test suite:

pytest

Run Ruff:

ruff check .

Technologies

  • Python
  • TCP Sockets
  • SQLite
  • Typer
  • Pytest
  • Ruff

Roadmap

Version 2.x

  • Authentication
  • Interactive CLI
  • Private messaging
  • Group management
  • Group chat
  • File transfer
  • Logging
  • Automated tests

Future

  • Invite code system
  • Message history
  • End-to-end encryption
  • Typing indicators
  • Read receipts
  • User profiles

Contributing

Contributions are welcome.

If you discover a bug or have an idea for an improvement, please open an issue before submitting a pull request.


License

This project is licensed under the MIT License.

See the LICENSE file for the complete license text.


Author

Shreyash Dongare


If you found SHANTER useful, consider giving the repository a ⭐ on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shanter-2.0.2.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shanter-2.0.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file shanter-2.0.2.tar.gz.

File metadata

  • Download URL: shanter-2.0.2.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for shanter-2.0.2.tar.gz
Algorithm Hash digest
SHA256 1fd6a6becbc83cbe76b0a456336e829935f89e9f89c6c72af68483bd047af8de
MD5 c04b4ab0fdff93ac58b1140f2cfb77dd
BLAKE2b-256 c973b72e3ac032278ef0db673f47fa1f838ea3f7334fd51e625f13d3fe318d7c

See more details on using hashes here.

File details

Details for the file shanter-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: shanter-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for shanter-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a58ac7748d9cdbda58e250be4bd78a9091f6e9a0a5ef4deb6dc8cb7efeb7ad9a
MD5 0d490931b2bd19897581a2fd14401c12
BLAKE2b-256 fa0615417086df67268974192f49e0d34a09d3e19f71cce1219d0eb7642191ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page