Introduction
As a developer, I always wanted to build something that actually matters. Blood banks are critical, yet most of them still run on manual processes. So I built
LifeFlow, a full-stack Blood Bank Management System that connects donors, hospitals, and admins in one platform.
Here's how I built it, what I learned, and the mistakes I made along the way.
What Does LifeFlow Do?
- Donors can register, track their donation history, and download certificates
- Hospitals can request blood and track availability in real time
- Admins manage everything: inventory, camps, requests, and analytics
Three different roles. One unified system.
Tech Stack
- Backend: PHP 8.2, PDO
- Frontend: HTML, CSS, JavaScript
- Database: MySQL
- Analytics: Chart.js
- Server: Apache / XAMPP
Key Features I'm Proud Of
1. Role-Based Access Control
Each user type (Admin, Hospital, Donor) sees a completely different portal after login. Built using PHP Sessions with full access control on every page.
2. Secure Database Interaction
Used PDO with parameterized queries throughout no raw SQL,reduced SQL injection risk.
3. Analytics Dashboard
Integrated Chart.js to show live inventory trends
and donation statistics makes the admin panel feel like a real product.
4. PDF Certificate Generation
Donors get a unique certificate after each donation with a unique ID — generated dynamically from PHP.
Biggest Challenge
The PRG (Post/Redirect/Get) pattern. When I first built forms, refreshing the page was resubmitting data causing duplicate entries. Implementing PRG properly across 8 modules took time but completely
fixed it.
What I Learned
- How to design a normalized database with real relationships (8 tables)
- Modular architecture inspired by MVC concepts, though not strictly implemented
- That clean code matters more than clever code
- Security is not optional parameterized queries from day one
Final Thoughts
LifeFlow is not perfect, but it's real. It solves a real problem, handles real roles, and taught me
more than any tutorial ever could.
If you're a student wondering whether to build something "useful" or something "impressive" , build something useful. Impressiveness follows.
Thanks for reading! If you have questions about any part of the build, drop them in the comments 😊
📝 Note: The GitHub repo currently has a broken
folder structure due to an upload mistake working on fixing it soon!
🔗 GitHub Repository: View apeFlow on GitHub
Top comments (5)
Are you sure it works?
Looking at the index.php file, I don't see a pages directory. And using php files by name how it was done in the 2000's.
I'm not saying you need to follow all best practices, but the minimum for a current PHP project is the use of Composer.
While it is good you are using
PDOthe use of what need to be configurable variables scares me. At least use getenv.While you claim to use MVC there are multiple files that mix backend code with CSS and HTML.
To make home MVC you need a public/home.php as the controller. A model/donors.php, model/users.php, model/donations.php, model/donationCamps.php and a model/bloodInventory.php as your models. And a views/home.php as the view.
It is true you don't need a framework, but you need a lot more files.
There is nothing wrong with using PHP without dependencies, I recommend it when you want to learn what is happening behind the screens of libraries and frameworks. The problem is that the repo looks like something that works on your computer but nowhere else.
Thank you for the detailed feedback!
You're right about everything. The folder structure is broken because I uploaded files incorrectly fixing that soon.
I hadn't used Composer or getenv before didn't even know about getenv until your comment honestly.
I've also updated the post changed "MVC-style" to "modular architecture inspired by MVC" and toned down the SQL injection claim. More accurate now.
Still learning this kind of feedback helps more than any tutorial. Thank you! 🙏
Yes my comment is positive criticism. I don't want to force you to go into only best practices mode because then you don't experience why the best practises exist.
I gave you enough tips to make improvements, the rest is up to you.
Cool project, especially as a learning exercise. Building something with real-world purpose like this teaches you way more than tutorial projects. If you're thinking about next steps, adding a search filter by blood type and location would make it actually usable for hospitals. Nice work for a first build.
Thank you so much! That's exactly what motivated me to build it real purpose hits different than tutorial projects 😊
And yes! The search filter by blood type and location is actually already there in the system hospitals can filter available blood by type and donors by location. It was one of the first features I prioritized since it felt most critical for real use.
Really appreciate the feedback though it means a lot coming from someone who clearly understands what makes a project actually useful vs just functional! 🙌