Welcome to our Donation Website! This project is a platform designed to connect donors with meaningful causes across 4 cities. With robust backend support, seamless email integrations, and user-friendly features, this project showcases the power of Flask, MySQL 🚀
- Secure login and logout sessions.
- OTP-based verification for password changes and other sensitive actions.
- Automated booking confirmations and OTP emails using:
- Flask-Mail for SMTP-based email functionality.
- SMTP2GO for reliable and scalable email delivery.
- Covers 4 cities, each with its own donation database and tracking.
- Backend powered by MySQL, with efficient table structures for managing donors, donations, and user data.
- Built with Flask and Flask-MySQLdb for database integration.
- Email functionalities powered by Flask-Mail and SMTP2GO SMTP.
The backend is designed with MySQL, featuring well-structured tables for:
- Users: Storing user login credentials and profiles.
- Donations: Tracking donation records for the 4 cities.
- OTP Requests: Managing OTPs for password resets and verification.
- Bookings: Storing and confirming donation bookings.
Follow these steps to set up the project locally:
- Python 3.x 🐍
- MySQL installed and configured.
- Flask dependencies (listed in
requirements.txt).
Create a MySQL database and import the schema provided in finaldb.sql file.
Update your database credentials in app.py:
app.config['MYSQL_USER'] = 'your-username'
app.config['MYSQL_PASSWORD'] = 'your-password'
app.config['MYSQL_DB'] = 'your-database-name'
app.config['MYSQL_HOST'] = 'localhost'
Add your SMTP2GO API Key and domain to the environment variables or directly in the app:
SMTP2GO_API_KEY = 'your-api-key'
SMTP2GO_DOMAIN = 'your-domain.com'
Configure your SMTP settings for Flask-Mail.
Run the app.py file
Visit http://127.0.0.1:5000 to access the website.
- Full-stack integration with Flask and MySQL.
- Demonstrates secure user authentication and session management.
- Real-world implementation of email automation using Flask-Mail and SMTP2GO.
- A scalable database design tailored for real-world applications.
To keep sensitive information secure and the codebase clean, this project uses a .env file for configuration.
# Flask secret key
SECRET_KEY=Dustbin
# MySQL Database Configuration
MYSQL_HOST=localhost
MYSQL_USER=your-mysql-username
MYSQL_PASSWORD=your-mysql-password
MYSQL_DB=finaldb
# SMTP (SMTP2GO) Mail Configuration
MAIL_SERVER=mail.smtp2go.com
MAIL_PORT=2525
MAIL_USE_TLS=True
MAIL_USE_SSL=False
MAIL_USERNAME=your-smtp2go-username
MAIL_PASSWORD=your-smtp2go-password
pip install python-dotenv.env