Skip to content

Sam3360/simple-chat-email-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Simple Console-Based Messaging and Chat Application This is a basic, console-based Python application that simulates an internal messaging (email) system and a public chat room. It's designed for educational or "fun" purposes to demonstrate fundamental Python concepts like dictionaries, lists, functions, and user interaction in a terminal environment.

CRITICAL WARNINGS: READ BEFORE USE!

⚠️ NOT SECURE:

Passwords are stored in plain text in memory. DO NOT USE THIS CODE FOR ANY REAL-WORLD APPLICATION OR WITH SENSITIVE INFORMATION. It is purely for demonstration and learning basic programming concepts.

⚠️ NO DATA PERSISTENCE:

All user data, emails, and chat messages are stored in your computer's memory (RAM). This means ALL DATA WILL BE PERMANENTLY LOST every time the application is closed. There is no saving mechanism.

Features User Registration: Create new user accounts with unique usernames and passwords.

User Login/Logout: Log in and out of user accounts.

Internal Email System:

Compose and send messages to other registered users.

View your personal inbox (messages sent to you).

View messages you have sent.

Clearly displays the sender and recipient for all messages.

Public Chat Room:

Send messages to a shared chat history visible to all logged-in users.

View the complete chat history, with each message attributed to its sender.

How to Run the Application Save the Code:

Copy the entire Python code provided previously (the one with register() and login() functions).

Save it into a file named messaging_app.py (or any other name ending with .py).

Open Your Terminal/Command Prompt:

Navigate to the directory where you saved messaging_app.py using the cd command.

Example (Windows): cd C:\Users\YourUser\Documents\my_projects

Example (macOS/Linux): cd ~/Documents/my_projects

Run the Script:

Execute the Python script using the command:

python messaging_app.py

Getting Started After Running Register: When the application starts, you'll see a menu. Choose option 1 to Register a new username and password. Repeat this for each user you want to create (e.g., alice, bob, charlie).

Login: After registering, choose option 2 to Login using one of the usernames and passwords you just created.

Explore: Once logged in, you can use the menu options to compose emails, view your inbox, check sent emails, send chat messages, and view the chat history. To switch users, you'll need to Logout and then Login as a different user.

Future Ideas (for more advanced learning) Add Persistence: Implement saving/loading data to a file (e.g., JSON, CSV) or a simple database (e.g., SQLite) so data isn't lost on exit.

Improve UI: Explore libraries like curses (for terminal-based UI) or build a simple GUI with Tkinter or PyQt.

Basic Networking: (Significantly more complex) Learn about Python's socket module to enable communication between two instances of the app on different computers on a local network.

Web Application: (Most complex, but powerful) Learn a web framework like Flask or Django to turn this into a real web application accessible via a browser.

Password Hashing: For any real-world scenario, passwords should never be stored in plain text. Learn about hashing libraries like bcrypt or passlib.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages