Inspiration

What it does

How we built it

The Story of medTrack: Bridging Technology and Healthcare Safety

The Inspiration

The journey of medTrack began with a simple observation: managing multiple medications is a high-stakes task that often relies on memory or messy paper logs. For elderly patients or those with complex chronic conditions, a missed dose or an accidental double dose isn't just an inconvenience—it's a significant health risk.

I was inspired to build a system that didn't just "remind" users but actually validated their regimen. I wanted to create a "digital safety net" that could catch dosage errors before they happened, providing both patients and caregivers with peace of mind.


How I Built It

Building medTrack was an exercise in creating a robust, secure, and scalable backend using Spring Boot 3.2.0. I chose a layered architecture to ensure the code remained maintainable and testable.

  • Security First: Given the sensitivity of medical data, I implemented Spring Security with JWT (JSON Web Tokens). This ensures that a patient's medication list is only accessible to them or their designated caregiver.
  • The Validation Engine: At the heart of the app is the dosage validation logic. When a user enters a dose, the system compares it against safety parameters:
    • Let $d$ be the user-inputted dosage.
    • Let $min$ and $max$ be the safe dosage boundaries.
    • The system flags a risk if: $d < min$ or $d > max$.
  • Automation: I used Spring’s @Scheduled tasks to create a heartbeat for the application, checking every minute for upcoming reminders so that no notification is ever missed.

Challenges Faced

One of the toughest hurdles was managing Role-Based Access Control (RBAC). Ensuring that an ADMIN could see system-wide statistics while a CAREGIVER could only see their specific patients' data required careful configuration of security filters and custom repository queries.

Another challenge was handling Database Integrity. Ensuring that the Medicine_Times collection stayed synced with the main Medicines table during rapid updates required a deep dive into JPA relationship mapping and transaction management.


What I Learned

Through this project, I gained a much deeper understanding of:

  1. JWT Lifecycle: Managing token expiration and secure stateless authentication.
  2. DTO Pattern: I learned the importance of using Data Transfer Objects to prevent exposing sensitive database entities directly to the API layer.
  3. Proactive Validation: I realized that software can play a literal life-saving role by implementing simple mathematical checks on user input.

Technical Summary

The project utilizes a modern stack to ensure reliability:

  • Java 17 & Maven: For a stable and high-performance runtime.
  • MySQL & Hibernate: To manage complex relational data between users, roles, and medications.
  • RESTful Design: To allow future expansion into mobile apps or web frontends.

Final Thought: medTrack taught me that the best software doesn't just solve a technical problem; it solves a human one. By combining data warehousing principles with real-time safety alerts, I've built a foundation for smarter personal health management.

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for MedTrack

Built With

Share this project:

Updates

Submission history