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.1.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.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shanter-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6f20c92f9cdc374d3d2121646be945c70f1f2977ce3a6427ffe6d9c41236b5ce
MD5 0cca56413a7d5e78232e3710d61c67e5
BLAKE2b-256 3b18eda5aae100242e2243dc0710a86e2941c0693b330a4b37733aaa8bb7de80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shanter-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e183e609d2e2ac5e97752c3fd0286e0547c14ed0a5a58fe1ea6f9b87512186e9
MD5 13cbe8d8028e5e273ba6e03956ac42e7
BLAKE2b-256 47f0392c948cfd6b700ecad8cfaa7b9b579bce570eb3f0e5d9bf16220adcdb75

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