How varunsardana004/blood-bank-and-donation-management-system works
Main Components
• User Interface (Frontend for Users): This includes pages such as home.php, about_us.php, contact_us.php, donate_blood.php, need_blood.php, search_blood_group.php, and others (e.g., slider.php, ticker.php, footer.php, head.php). These pages represent the site’s public-facing functionality.
• Admin Panel (Backend for Administrators): Located in the “admin” directory, with files like login.php, dashboard.php, add_donor.php, donor_list.php, change_password.php, and additional modules (header.php, sidebar.php, session.php, etc.). This portion handles donor data management, query processing, and page data management.
• Database: A MySQL database (importable from sql/blood_bank_database.sql) that stores all the blood donor profiles, queries from contact forms, and other data required by both the user and admin sections.
• Server and Connection Components: PHP files like conn.php (both in the root and in the admin directory) handle the database connections, while savedata.php, update_contact.php, and other scripts manage CRUD operations.
Relationships and Interactions
• End-User Interaction: Users access the frontend pages via web browsers; these pages send HTTP requests to the server (Apache provided by XAMPP/WAMPP) which then processes the PHP code.
• Admin Interaction: Administrators log in via admin/login.php, where a session management system verifies credentials (using session.php) and then allows navigation through secured modules like adding or viewing donors, updating contact information, and managing page content.
• Data Layer: Both the user and admin pages rely on PHP scripts to query and update the MySQL database. The connection scripts (conn.php) facilitate these interactions.
• Navigation/Layout Components: Common elements (e.g., header.php, footer.php, sidebar.php, head.php) are included in multiple pages providing a consistent layout and navigation scheme between user and admin interfaces.
Architectural Patterns and Design Principles
• Separation of Concerns: Notice how the project separates the admin functionalities from the user-facing pages into distinct directories. This supports maintainability and clear boundaries between administrative tasks and public content.
• Reuse Through Includes: Common files (like header, footer, sidebar, etc.) are included in multiple pages, which reflects a component-driven approach typical in many PHP projects.
• Simple Client-Server Model: The system relies on traditional HTTP request-response cycles with a PHP server engine working in coordination with a MySQL database.
Relevant Technologies
• PHP for server-side scripting.
• MySQL as the database system.
• Apache (via XAMPP/WAMPP) as the web server.
• HTML/CSS (embedded in the PHP files) for the user interface.
• JavaScript (e.g., nicedit.js in the admin area) for rich text editing and interactivity in the admin panel.
Elements
• Labels: Clearly mark each module (e.g., “User Home Page”, “Contact Us Page”, “Admin Dashboard”, “Add Donor Module”, “Donor List Module”, “MySQL Database”).
• Annotations: Add brief descriptions if needed, to highlight that common includes (head.php, footer.php) drive consistency across pages or that “conn.php” files enable data persistence.
Putting It All Together
• Distinct functionalities for blood donation management (data entry, query handling, donor listing, etc.) as separate modules or subcomponents within the broader admin and user sections.