A comprehensive blood donor management system for Bangladesh University of Professionals (BUP) with user authentication, secure password management, and advanced search capabilities.
Live Website: https://bupblood.org/ (Mirror: https://bupblood.vercel.app/)
Purpose: Blood donor registry and management system
Institution: Bangladesh University of Professionals (BUP)
Admin Contact: refayat.connect@gmail.com
Current Users: 500+ registered donors
- Backend: Flask 3.1.3 (Python)
- Database: SQLite (local) β Supabase PostgreSQL (production)
- Image Storage: Local static files β Supabase Storage (production)
- Frontend: Tailwind CSS + DaisyUI
- Server: Gunicorn (local), Vercel (production)
- Authentication: Flask-Login with secure password hashing
- β Secure Registration - Password-protected accounts with strength validation
- β User Authentication - Login/logout system with session management
- β Personal Dashboard - Update profile, availability, last donation date, and profile picture
- β Password Management - Change password and secure reset functionality
- β Self-Service Password Reset - Multi-factor verification (Student ID + Mobile + Dept + Blood Group)
- β Email Verification - Required for password resets (with one-time exception for legacy users)
- β Availability Status - Toggle between Available/Unavailable with visual badges
- β Profile Image Upload - Custom profile pictures with automatic resizing
- β BUP Program Integration - Faculty and program-based filtering using official structure
- β Admin Panel - Approve/reject new donor registrations
- β User Management - View all pending and approved donors
- β Secure Admin Login - Hardcoded credentials (admin/adminpassword)
- β Blood Group Search - Filter by all 8 blood types (A+, A-, B+, B-, AB+, AB-, O+, O-)
- β Faculty/Program Filter - Search by BUP faculties and programs
- β Donor Cards - Visual cards showing availability status
- β Direct Contact - Call donors via tel: links
- β Responsive Design - Mobile-optimized interface
- User clicks "Forgot Password?" on login page
- Identity Verification - Enter Student ID, Mobile, Department, Blood Group
- Email Verification (for users with email):
- System shows masked email (e.g.,
r***t@gmail.com) - User confirms full email address
- Password reset allowed upon confirmation
- System shows masked email (e.g.,
- One-Time Reset (for legacy users without email):
- System allows single password reset using verified identity
- Subsequent resets require email verification
- Users encouraged to add email to profile
- New Users (registered after updates): Full email verification required
- Legacy Users (441 existing): One-time password reset without email, then email required
BloodBank/
βββ app.py # Main Flask application with routes
βββ models.py # SQLAlchemy database models
βββ forms.py # WTForms (registration, login, password reset)
βββ config.py # Color palette configuration
βββ requirements.txt # Python dependencies
βββ vercel.json # Vercel deployment config
βββ .env.example # Environment variables template
βββ PROJECT_MEMORY.md # Detailed project documentation
βββ instance/
β βββ bup_blood_bank.db # SQLite database (local development)
βββ migrations/ # Flask-Migrate database migrations
βββ static/
β βββ css/ # Tailwind CSS (compiled)
β βββ images/ # User profile images (local)
βββ templates/
β βββ base.html # Base template with navigation
β βββ home.html # Homepage with donor search
β βββ register.html # User registration form
β βββ user_login.html # User login form
β βββ dashboard.html # User dashboard
β βββ forgot_password.html # Password reset - identity verification
β βββ verify_email.html # Password reset - email confirmation
β βββ reset_password.html # Password reset - new password entry
β βββ change_password.html # Change password (logged in users)
β βββ admin_panel.html # Admin approval panel
β βββ [other templates]
βββ utils/
βββ color_palettes.json # UI color scheme
# Navigate to project directory
cd f:\BloodBank
# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activate # Windows
# or
source venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r requirements.txtnpm installnpm run build# Run migrations (if needed)
flask db upgrade
# Database will be created at instance/bup_blood_bank.dbDevelopment Mode:
python app.py
# or
flask run --host=0.0.0.0 --port=5000Production Mode (local):
gunicorn app:app -b 0.0.0.0:8086 --workers=4- Homepage: http://localhost:5000
- User Login: http://localhost:5000/user/login
- User Register: http://localhost:5000/register
- User Dashboard: http://localhost:5000/dashboard
- Admin Login: http://localhost:5000/login
- Admin Panel: http://localhost:5000/admin
- URL:
/adminor/login - Username:
admin - Password:
adminpassword
β οΈ IMPORTANT: Change these credentials before production deployment!
id- Primary keystudent_id- Unique identifier (username)name- Full namedepartment- Department namebatch- Batch year/numberblood_group- Blood type (A+, A-, B+, B-, AB+, AB-, O+, O-)mobile- Contact numberaddress- Residential addressemail- Email address (optional for legacy users)image- Profile picture URL (500 chars for Supabase)password_hash- Bcrypt hashed password (128 chars)is_approved- Admin approval status (Boolean)is_available- Donor availability (Boolean)last_donation_date- Last donation date (Date, nullable)password_reset_count- Tracks password reset without email (Integer)created_at- Registration timestamp (DateTime, Asia/Dhaka)
- Supabase Account - Create project at supabase.com
- Vercel Account - Sign up at vercel.com
- GitHub Repository - Code must be in Git repo
# 1. Create new project on Supabase
# 2. Get Database connection string from Settings > Database
# 3. Create Storage bucket named 'images' (set to Public)
# 4. Copy Project URL and anon key from Settings > APICreate .env file (NEVER commit this):
SECRET_KEY=your-super-secret-key-here
SQLALCHEMY_DATABASE_URI=postgresql://postgres:[PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres
SUPABASE_URL=https://[PROJECT-REF].supabase.co
SUPABASE_KEY=[YOUR-ANON-KEY]- Push code to GitHub
- Import repository in Vercel
- Add environment variables from
.env - Deploy
temp_passwords.txt- Contains all user passwords.env- Contains API keys and secretsinstance/bup_blood_bank.db- Contains user datavenv/- Virtual environment
temp_passwords.txt
.env
instance/
venv/
__pycache__/
*.pyc
*.pyo
*.db
.DS_Store
node_modules/- Total Registered Users: 500+
- All users have secure passwords: β Yes
- Email verification enabled: β Yes
- Password reset available: β Yes (with email verification)
- Implement rate limiting for password reset attempts
- Add "Remember Me" option on login
- Improve error messages and user feedback
- Add donation history tracking
- Add blood request system
- Add notification system for urgent requests
- Mobile app (React Native/Flutter)
- β Full Supabase Migration - SQLite data and images moved to Supabase
- β Triple-Soft Architecture - Soft-delete for users (hide/delete without data loss)
- β SweetAlert2 UI - Enhanced confirmation dialogs and UI interactions
- β Admin Panel Upgrades - Improved user management, filtering, and activity logs
- β Dynamic Availability - Mathematical 120-day cooldown logic for donors
- β Official Program Integration - Standardized BUP program hierarchy mapped for 500+ users
- β Email Notifications - Added email notifications for password resets and registrations
- β User Authentication System - Full login/logout with session management
- β Password Reset with Email Verification - Multi-step secure reset process
- β BUP Program Integration - Faculty and program-based filtering
- β Enhanced Security - Limited one-time resets for users without email
- β Profile Management - Dashboard for updating availability, images, contact info
- β Password Strength Indicator - Visual feedback during password creation
- β Mobile-Responsive Navigation - Auth state-aware mobile menu
- Basic donor registration
- Blood group search
- Admin approval system
- Admin Email: refayat.connect@gmail.com
- Project Type: Humanitarian - Blood Donation Management
- Institution: Bangladesh University of Professionals (BUP)
Internal use for BUP Blood Bank project.
Last Updated: May 2026
Version: 3.4
Status: Active Development