MackeeMail is a Flask-based messaging web application that allows users to communicate through private messages and a public message board.
- User authentication (registration, login, logout)
- Private messaging between users
- Public message board
- Message deletion functionality
- Secure password storage using hashing
- Clone the repository:
git clone https://github.com/yourusername/MackeeMail.git
cd MackeeMail- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate- Install the dependencies:
pip install -r requirements.txtThe application can use either SQLite (development) or PostgreSQL (production), controlled by the ENV variable in app.py:
ENV = 'dev': Uses SQLite (default for local development)ENV = 'prod': Uses PostgreSQL (for production deployment)
To initialize the database tables:
python3 create_db.pyIf you need to clear all data and reset the database:
python3 clear_db.py- Make sure your virtual environment is activated:
source venv/bin/activate- Run the application:
python3 app.pyThe application will be accessible at:
- http://127.0.0.1:5001/ (locally)
- http://your-ip-address:5001/ (on your network)
app.py: Main application file with all routes and modelscreate_db.py: Script to initialize the database tablesclear_db.py: Script to clear all data from the databasetemplates/: HTML templates for the web interfacebase.html: Main layout templatehome.html: Private messaging interfacelogin.html: User login formsignup.html: User registration formmessageboard.html: Public message board interface
static/: Static files (JavaScript, CSS)index.js: JavaScript for message deletion functionality
To switch between development and production environments:
-
Edit the
ENVvariable inapp.py:- For development (SQLite):
ENV = 'dev' - For production (PostgreSQL):
ENV = 'prod'
- For development (SQLite):
-
In production, update the PostgreSQL connection string in
app.py.