Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

488 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩸 Blood Bank Management System (BBMS)

A comprehensive full-stack Blood Bank Management System designed to streamline blood donation operations, inventory management, and user coordination across donors, hospitals, and administrators.


🌟 Project Overview

The Blood Bank Management System (BBMS) is a modern, secure, and efficient digital platform that revolutionizes how blood banks operate. Built with cutting-edge technologies, BBMS connects donors, hospitals, and administrators in a unified ecosystem to ensure optimal blood supply management and transparent donation processes.

🎯 Mission

To make blood donations more accessible, organized, and transparent while ensuring efficient blood inventory management across healthcare facilities.


πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    HTTP/REST API    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 │◄───────────────────►│                  β”‚
β”‚  React Frontend β”‚                     β”‚ Ballerina Backendβ”‚
β”‚  (Port: 5173)   β”‚                     β”‚  (Port: 9191)    β”‚
β”‚                 β”‚                     β”‚                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                                        β”‚
        β”‚ User Interface                         β”‚ Data Processing
        β”‚                                        β”‚
        β–Ό                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User Roles:    β”‚                     β”‚   MySQL Database β”‚
β”‚  β€’ Donors       β”‚                     β”‚   β€’ User Data    β”‚
β”‚  β€’ Hospitals    β”‚                     β”‚   β€’ Campaigns    β”‚
β”‚  β€’ Admins       β”‚                     β”‚   β€’ Blood Stock  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Key Features

πŸ‘₯ Multi-Role User Management

  • Donors: Register, participate in campaigns, track donation history
  • Hospitals: Manage campaigns, monitor blood stock, request blood units
  • Administrators: Oversee entire system, manage users and campaigns

πŸ₯ Campaign Management

  • Create and manage blood donation campaigns
  • Real-time campaign tracking and participation
  • Automated email notifications
  • Past campaign data and analytics

🩸 Blood Inventory System

  • Real-time blood stock monitoring (A+, A-, B+, B-, AB+, AB-, O+, O-)
  • Hospital-wise and district-wise inventory tracking
  • Automated stock updates
  • Campaign-linked blood collection tracking

πŸ” Security & Authentication

  • JWT-based secure authentication
  • Role-based access control
  • SHA-256 password encryption with salt
  • CORS-enabled API security

πŸ“± Modern User Experience

  • Responsive design for all devices
  • Dark/light theme support
  • Real-time notifications and feedback
  • Intuitive and accessible interface

πŸ› οΈ Technology Stack

Frontend

  • Framework: React 18+ with Vite
  • Styling: Tailwind CSS + Bootstrap + Regular CSS
  • Routing: React Router
  • State Management: React Context API
  • HTTP Client: Axios
  • Icons: React Icons + Lucide Icons

Backend

  • Framework: Ballerina Swan Lake
  • Database: MySQL
  • Authentication: JWT (JSON Web Tokens)
  • Email Service: SMTP Integration
  • Architecture: RESTful API

Development Tools

  • Version Control: Git & GitHub
  • Package Management: npm/yarn
  • Build Tools: Vite (Frontend), Ballerina (Backend)
  • Code Quality: ESLint, Prettier

πŸ“ Project Structure

BBMS/
β”œβ”€β”€ BBMS/                    # React Frontend Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ context/           # Global state management
β”‚   β”‚   β”œβ”€β”€ Pages/             # Main application pages
β”‚   β”‚   └── SharedData/        # Constants and utilities
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
β”œβ”€β”€ BBMS_backend/                     # Ballerina Backend API
β”‚   β”œβ”€β”€ main.bal               # Main service endpoints
β”‚   β”œβ”€β”€ database.bal           # Database configuration
β”‚   β”œβ”€β”€ types.bal              # Type definitions
β”‚   β”œβ”€β”€ utils.bal              # Utility functions
β”‚   β”œβ”€β”€ *_service.bal          # Service modules
β”‚   β”œβ”€β”€ Config.toml            # Configuration file
β”‚   └── README.md
β”‚
└── README.md                    # This file

πŸš€ Quick Start

Prerequisites

  • Node.js (v16+) for frontend
  • Ballerina Swan Lake for backend
  • MySQL Server for database
  • SMTP Account for email notifications

1. Clone the Repository

git clone https://github.com/nadilHesara/iwb25-203-code-drift.git
cd iwb25-203-code-drift

2. Setup Backend

cd BBMS_backend
# Create Config.toml with your database credentials
# Setup MySQL database and tables
bal build
bal run

Backend will run on http://localhost:9191

3. Setup Frontend

cd bbms
npm install
npm run dev

Frontend will run on http://localhost:5173

4. Access the Application

Open your browser and navigate to http://localhost:5173


🎯 Use Cases

For Donors

  • Register and maintain profile
  • Browse available donation campaigns
  • Track personal donation history
  • Complete eligibility assessments

For Hospitals

  • Manage blood donation campaigns
  • Monitor blood inventory levels
  • Request blood units from other facilities
  • Track campaign performance

For Administrators

  • Oversee entire system operations
  • Manage user accounts and permissions
  • Monitor system-wide blood inventory
  • Maintain system security

πŸ”œ Future Enhancements

  • 🌍 Multi-language Support (English, Sinhala, Tamil)
  • πŸ“± Mobile Application (React Native)
  • πŸ€– AI-Powered Demand Prediction
  • πŸ“Š Advanced Analytics Dashboard
  • πŸ”” SMS/Push Notifications
  • πŸ“± QR Code Integration
  • 🌐 PWA Support for offline functionality

🀝 Contributing

We welcome contributions from the community! Please see our individual component READMEs for specific contribution guidelines:

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“© Support & Contact

Development Team:

For technical support, bug reports, or feature requests, please:

  • Create an issue on GitHub
  • Contact the development team
  • Check the component-specific READMEs for detailed documentation

πŸ“„ License

This project is licensed under the MIT License.


πŸ™ Acknowledgments

  • Thanks to all contributors who have helped shape this project
  • Special appreciation to the healthcare community for their valuable feedback
  • Built with ❀️ for the greater good of society

🩸 BBMS - Making Blood Donation Accessible, Organized, and Transparent

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages