This comprehensive guide contains all the steps required to run the BloodConnect Portal locally.
This is an intermediate-level Blood Bank & Donor Management System built using Python Flask (backend) and MySQL (database). It supports full public search features and role-based protected dashboards for Donors, Blood Bank Staff, and System Administrators.
Ensure you have the following tools installed on your system:
- Python 3.8+
- MySQL Server (or MySQL Workbench/equivalent client)
- Git (for cloning the repository)
# Clone the repository
git clone <repository_url>
cd <repository_name>
# Create a virtual environment (Recommended)
python -m venv .venv
# Activate the environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Install required Python packages
pip install flask mysql-connector-python- Create a file named
.envin the project root with the following content:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_root_password
DB_NAME=bloodbanks
- Update the values according to your local MySQL setup.
- IMPORTANT: Add
.envto your.gitignorefile to prevent exposing sensitive credentials.
- Open your MySQL Workbench or command line client
- Open a new SQL tab and paste the entire contents of the project's
schema.sqlfile - Execute the entire script to create the
bloodbanksdatabase and all tables
# Ensure your virtual environment is active
# Run the application
python app.pyThe application should now be accessible at: http://127.0.0.1:5000
| Role | Password | |
|---|---|---|
| System Admin | admin@bloodconnect.org |
(See secure note below) |
| Blood Bank Staff | bbank_mumbai@example.com |
(See secure note below) |
| Donor | priya.sharma@example.com |
(See secure note below) |
- Public Portal: Verify Stock Search (with State/District filter and aggregated results)
- Donor Flow: Register a new user and log in with the new account to check profile and eligibility status
- Bank Staff Flow: Update stock quantities and register new camps (requires bank staff credentials)
- Admin Flow: Navigate the management console to see live statistics and toggle bank/donor statuses (requires admin credentials)
- Never commit sensitive credentials to version control
- Use environment variables or secure configuration management for sensitive data
- Consider implementing password hashing in production
- Regularly rotate passwords and access credentials
- Implement proper session management and CSRF protection
- Enable HTTPS in production deployments
Contact the project administrator for:
- Test account credentials
- Database setup assistance
- Deployment questions