Skip to content

Edward-Yue-Peng/Tonpy

Repository files navigation

Tonpy - A Python Chat Application

Python Flet NYU

Tonpy is a python messaging program built with Flet. It allows you to chat with others, play Gomoku with others, and interact with an AI assistant.

About this Project

Authors: Tony Xia and Yue Peng from NYU Shanghai.

This project is the final project of the ICDS (Introduction to Computer and Data Science) course at NYU Shanghai.

Features

Screenshot

  • Chat: Connect with users in real time and form group chats.
  • Gomoku: Play a classic board game against others.
  • AI Assistant: Ask questions and get instant AI-generated responses.
  • Poem Finder: Retrieve poems stored in AllSonnets.txt by entering a chapter number.
  • Search: Look up past messages.
  • Session Management: Log in, log out, and keep your session active.

Installation

Requirements

  • Python 3.8+
  • Flet
  • Dependencies from requirements.txt

Setup

  1. Clone the repo:
    git clone https://github.com/Edward-Yue-Peng/Tonpy.git
    cd tonpy
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the server:
    cd chat_server
    python chat_server.py
  4. Run the client in new terminal:
    flet main.py

Project Structure

Tonpy/
├── assets/
├── chat_program/
│   ├── __init__.py
│   ├── chat_client_class.py
│   ├── chat_cmdl_client.py
│   ├── chat_utils.py
│   ├── client_state_machine.py
├── chat_server/
│   ├── AllSonnets.txt
│   ├── chat_group.py
│   ├── chat_server.py
│   ├── chat_utils.py
│   ├── indexer.py
│   ├── roman.txt
│   ├── roman.txt.pk
│   ├── roman2num.py
├── .gitignore
├── chat_ai.py
├── chat.py
├── gomoku.py
├── login.py
├── main.py
├── parser.py
├── README.md
├── requirements.txt

About

A python messaging program built with Flet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages