About the Project
Inspiration
LifeTwin AI was inspired by a simple question: what if a person could have a digital version of their health that continuously learns from their real health information?
People often have their health data scattered across medical reports, fitness devices, personal records, and different applications. We wanted to bring these sources together into one personalized platform that helps users understand their health more clearly and proactively.
This led us to the idea of creating a Digital Health Twin, a personalized digital representation of a user's health based on their own information and available real-time measurements.
What We Built
LifeTwin AI is an AI-powered personal health monitoring platform designed around an individual user's health profile.
The system allows users to create an account and securely provide information such as:
- Age
- Gender
- Height and weight
- Medical history
- Allergies
- Family medical history
The platform is designed to connect compatible wearable devices through Bluetooth and receive supported real-time health measurements such as heart rate.
Users can also upload medical reports. These reports can be processed to extract relevant health information, which can then contribute to the user's personalized health profile and Digital Twin.
The platform brings these different sources together to provide health insights, trends, risk indicators, and an AI-powered health assistant.
How We Built It
We developed LifeTwin AI as a full-stack application.
The frontend was built using Next.js, TypeScript, and Tailwind CSS, while the backend was developed using Python and FastAPI.
For persistent storage, we used PostgreSQL, with database migrations managed through Alembic.
The complete application was containerized using Docker and Docker Compose, allowing the frontend, backend, and database to run together in a consistent development environment.
The overall architecture follows:
User
↓
Next.js Frontend
↓
FastAPI Backend
↓
PostgreSQL Database
↓
Health Data / Wearables / Reports / AI
↓
Personalized Digital Twin
Authentication and user-specific data access were designed so that health information belongs to the authenticated user rather than being stored as frontend demo data.
What We Learned
Building LifeTwin AI taught us that creating an AI-powered application is much more than connecting a model to a frontend.
We learned how different layers of a real application need to work together:
- Frontend user experience
- Backend APIs
- Database design
- Authentication and authorization
- Docker-based deployment
- Real-time data handling
- Wearable device integration
- Medical report processing
- AI-assisted analysis
We also learned the importance of making the backend and database the source of truth, rather than relying on hardcoded frontend values.
Challenges We Faced
One of the biggest challenges was moving from a visual prototype to a genuine full-stack system. A feature can look complete on a screen while still requiring authentication, database models, APIs, validation, and external integrations behind it.
We also faced challenges with Docker networking, PostgreSQL initialization, database migrations, container conflicts, and dependency installation.
Another major challenge was wearable integration. Real Bluetooth data cannot simply be simulated if the goal is a genuine health-monitoring application. Device compatibility, browser capabilities, supported BLE services, and user permissions all have to be considered.
Medical data introduced another important challenge: the system must distinguish between health monitoring and medical diagnosis. Therefore, health indicators and disease-risk outputs are treated as screening or informational support rather than definitive medical diagnoses.
The Goal
Our goal with LifeTwin AI is to build a system where a user's own data continuously contributes to a personalized health representation.
In simple terms:
[ \text{Personal Data} + \text{Real Health Data} + \text{Medical Reports} + \text{AI} \rightarrow \text{Personalized Digital Health Twin} ]
LifeTwin AI is an ongoing exploration of how AI, connected devices, and intelligent software can work together to make personal health information more understandable, connected, and actionable.
Built With
- alembic
- artificialintelligence
- bluetoothle
- digitaltwin
- docker
- dockercompose
- fastapi
- gemini
- generativeai
- healthcareai
- healthmonitoring
- jwt
- machine-learning
- medicalreportanalysis
- nextjs
- postgresql
- python
- realtimedata
- restapi
- smartwatch
- tailwindcss
- twilio
- typescript
- webbluetooth
Log in or sign up for Devpost to join the conversation.