Project case study
Garmin Analysis Platform
A personal health and performance analytics platform using Garmin data, Spring Boot microservices, Python analysis services, and AI-generated insight summaries.
Overview
The Garmin Analysis Platform is an entirely personal software project designed to analyse health, fitness, sleep, recovery, and training data from Garmin Connect.
The project was triggered partly by Garmin placing more advanced AI-style insight functionality behind a paywall. Rather than treating that as a blocker, I saw it as an opportunity to build my own analysis platform, using my own data, my own rules, and my own architecture.
The aim is not simply to display raw Garmin data. Garmin already does that well.
The aim is to build a system that can:
- collect Garmin health and activity data
- store it in a structured format
- compare trends over time
- identify useful changes in training, recovery, and sleep
- generate plain-English insight summaries
- provide a foundation for future AI-driven coaching recommendations
This project also gives me a practical way to deepen my experience with Java, Spring Boot, Python microservices, data pipelines, and AI-assisted analysis.
Project Context
This is entirely a personal project.
It is not a commercial product, client project, or employer-sponsored initiative. I am building it to explore Garmin data analysis, AI-assisted insight generation, Spring Boot microservices, Python analytics, and the wider question of how personal health data can be turned into useful decision support.
The idea was partly triggered by Garmin moving more advanced AI-style insight functionality behind a paywall. Rather than simply accepting that limitation, I wanted to explore whether I could build my own analysis platform using my own data, my own rules, and my own architecture.
The aim is to build a personal experimentation platform that allows me to understand the data more deeply, test different analytical approaches, and eventually generate tailored recommendations across training, recovery, body composition, and nutrition.
The Problem
Garmin provides a significant amount of data, including details around sleep, training load , and recovery.
The issue is that this information is often fragmented and not linked to decision support
A user may be able to see individual charts, but it is harder to answer questions such as:
- Is my sleep improving compared with the previous period?
- Is my training load increasing too quickly?
- Are poor recovery scores linked to high training stress?
- Is resting heart rate trending in the right direction?
- Are running, strength training, and other training sessions balanced?
- What changed this week compared with last week?
- What should I adjust next?
The product opportunity is to turn health data into decision support.
Product Goal
The goal of the platform is to move from passive tracking to active interpretation.
Instead of simply showing numbers, the platform should help answer:
“What is my data telling me, and what should I do differently?”
This is especially useful for people who train across multiple domains, such as running and strength training as Garmin concentrates mostly on running or biking and does not accurately consider the effects of other training.
The system is intended to support evidence-led training decisions rather than generic fitness advice.
Current Scope
The current version is focused on the back-end architecture and data analysis pipeline.
At this stage, the platform does not have a polished user interface. The primary front end is API-driven, with Swagger used to test and inspect endpoints.
This is a deliberate product trade-off.
The early priority is to prove that the platform can:
- collect the right data
- store it correctly
- process it reliably
- compare date ranges
- produce meaningful analysis
- generate useful summaries
A richer interface can come later once the core domain model and analysis logic are stable.
Conceptual Architecture
flowchart TD
A[Garmin Connect] --> B[Python Garmin Data Collector]
B --> C[Spring Boot API]
C --> D[(Application Database)]
D --> E[Python Analysis Service]
E --> F[AI Summary Service]
F --> G[Swagger API Response]
F --> H[Future Email Report]
F --> I[Future Web Dashboard]
J[Future Weight Training App] --> C
K[Future Food Tracking App] --> C
The core idea is to collect structured data from Garmin first, then progressively combine it with other personal training and nutrition data sources.
Core Capabilities
1. Garmin Data Collection
The system is designed to connect to Garmin Connect and retrieve health and training data.
The intended approach is to use the unofficial Garmin Connect Python library to extract data such as:
- daily summaries
- sleep records
- activity data
- heart rate metrics
- stress
- body battery
- recovery indicators
- training-related values
This allows the platform to work with real personal fitness data rather than manually entered figures.
2. Spring Boot API Layer
Spring Boot is used as the main application layer.
Its responsibilities include:
- exposing REST APIs
- managing users
- managing date-range requests
- storing structured Garmin data
- orchestrating analysis requests
- providing a stable back-end foundation
- supporting future authentication and multi-user use cases
Spring Boot was chosen because it provides a strong enterprise-style architecture and is highly relevant to my wider software and product management experience.
3. Python Analysis Services
Python is used for the analytical parts of the platform.
This is a deliberate architectural decision.
Java and Spring Boot are well suited to API design, persistence, structure, and service orchestration. Python is better suited to data analysis, statistics, experimentation, and machine learning.
The long-term architecture separates these concerns:
| Layer | Technology | Purpose |
|---|---|---|
| API and orchestration | Spring Boot | Stable back-end services |
| Data extraction | Python | Garmin Connect integration |
| Analysis | Python | Statistical and trend analysis |
| Messaging | RabbitMQ | Service communication |
| Summaries | LLM / AI service | Plain-English insight generation |
| Persistence | Database | Structured health and activity history |
This keeps the system flexible and avoids forcing all analysis logic into the Java service layer.
Data Flow
sequenceDiagram
participant User
participant API as Spring Boot API
participant Collector as Python Garmin Collector
participant DB as Database
participant Analysis as Python Analysis Service
participant AI as AI Summary Service
User->>API: Request analysis for date range
API->>DB: Check existing Garmin data
alt Data missing
API->>Collector: Request Garmin data collection
Collector->>DB: Store Garmin health and activity data
end
API->>Analysis: Send structured date-range data
Analysis->>Analysis: Calculate trends and comparisons
Analysis->>AI: Send validated metrics
AI->>API: Return plain-English summary
API->>User: Return analysis response
This flow keeps the AI layer downstream of the data processing. The AI is not asked to guess from raw data. It receives calculated metrics and explains them.
Date Range Comparison
A key feature is the ability to compare one date range with the previous equivalent period.
For example:
- last 7 days vs previous 7 days
- last 30 days vs previous 30 days
- current training block vs previous training block
This supports more useful trend analysis than looking at single-day values.
Example comparisons include:
| Metric | Current Period | Previous Period | Interpretation |
|---|---|---|---|
| Average sleep score | 78 | 72 | Improved recovery |
| Resting heart rate | 55 bpm | 58 bpm | Positive trend |
| Average stress | 31 | 38 | Lower stress load |
| Training volume | 6 sessions | 4 sessions | Increased workload |
| Body battery average | 67 | 59 | Better readiness |
The aim is not to overreact to isolated data points, but to identify meaningful directional movement.
Comparison Logic
flowchart LR
A[Selected Date Range] --> B[Current Period]
A --> C[Previous Equivalent Period]
B --> D[Calculate Current Metrics]
C --> E[Calculate Previous Metrics]
D --> F[Compare Changes]
E --> F
F --> G[Trend Detection]
G --> H[Risk Indicators]
G --> I[Positive Indicators]
G --> J[Neutral Changes]
H --> K[AI Summary]
I --> K
J --> K
The comparison model is deliberately simple at first. The immediate value comes from reliable period-on-period analysis before adding more advanced machine learning.
AI Insight Generation
The platform is intended to generate AI-assisted insight summaries from processed data.
The AI layer should not replace the statistical analysis. Instead, it should explain the findings in clear language.
For example, the analysis service may identify:
- sleep duration has improved
- resting heart rate has decreased
- training volume has increased
- recovery has remained stable
- stress has reduced
The AI service can then turn this into a readable summary:
Your recovery indicators have improved over this period. Sleep score increased, resting heart rate reduced, and average stress fell compared with the previous period. Training volume also increased, but recovery has remained stable, suggesting the increase is currently manageable.
The important product decision is that AI should interpret validated metrics, not invent conclusions from raw data.
AI Boundary
flowchart TD
A[Raw Garmin Data] --> B[Validation]
B --> C[Structured Metrics]
C --> D[Trend Calculations]
D --> E[Risk and Recovery Rules]
E --> F[AI Explanation Layer]
F --> G[Human-Readable Insight]
A -. Not allowed .-> F
The AI layer should explain evidence. It should not be the first place where the data is interpreted.
Product Design Principles
1. Data First, AI Second
The system should not ask an AI model to guess based on unstructured data.
The data pipeline should first calculate reliable metrics, trends, and comparisons.
Only then should AI be used to explain the results.
This creates a safer and more useful system.
2. Explain the Trend, Not Just the Number
A single number is rarely useful on its own.
For example, a resting heart rate of 55 bpm may be good, bad, or neutral depending on the user, their baseline, recent illness, fatigue, training load, and sleep quality.
The platform should focus on:
- trend direction
- deviation from baseline
- relationship between metrics
- training context
- recovery context
3. Avoid Generic Fitness Advice
The platform should not simply produce vague advice such as:
“Get more sleep and train consistently.”
The goal is to produce specific, data-led observations, such as:
“Your sleep score improved by 8% compared with the previous 14-day period, but training volume increased by 30%. Recovery remains stable, so the current increase appears manageable, but the next period should be monitored for HRV or resting heart rate deterioration.”
4. Keep the Architecture Extensible
The platform is designed so that new analysis services can be added later.
Possible future services include:
- sleep analysis service
- training load analysis service
- recovery analysis service
- running performance analysis service
- strength progression analysis service
- injury risk indicator service
- AI coaching recommendation service
- email reporting service
This microservice-based approach allows the system to evolve without becoming a single monolithic analytics script.
Service Boundaries
flowchart TB
subgraph JavaSpringBoot["Spring Boot Layer"]
A[REST Controllers]
B[DTO Validation]
C[Domain Services]
D[JPA Repositories]
end
subgraph PythonServices["Python Services"]
E[Garmin Collector]
F[Trend Analysis]
G[Statistical Processing]
end
subgraph AIServices["AI Services"]
H[Insight Generator]
I[Recommendation Explainer]
end
subgraph Storage["Storage"]
J[(Health Data)]
K[(Activity Data)]
L[(Analysis Results)]
end
A --> B
B --> C
C --> D
D --> J
D --> K
D --> L
C --> E
C --> F
F --> G
G --> H
H --> I
I --> L
The service boundaries are designed to keep each part of the system focused. Spring Boot provides structure and orchestration, while Python handles the more analytical workloads.
Why Use Microservices?
For a personal project, microservices may appear excessive.
However, this project is partly intended as a learning platform.
The microservice approach allows me to practise:
- service boundaries
- API contracts
- message-driven architecture
- Docker-based deployment
- Python and Java interoperability
- asynchronous processing
- observability
- service-specific responsibilities
The architecture also reflects a realistic enterprise pattern, where different services are responsible for different parts of a wider product capability.
Key Trade-Offs
Trade-Off 1: Swagger Before UI
The early version uses Swagger rather than a full user interface.
This is not because the UI is unimportant. It is because the analysis model needs to be proven first.
Advantages of this approach:
- faster development
- easier endpoint testing
- clearer API contracts
- less wasted front-end work
- better focus on the domain model
- easier debugging during early development
Once the analysis outputs are useful, a user interface can be designed around proven data rather than assumptions.
Trade-Off 2: Java and Python Instead of One Language
Using both Java and Python adds complexity.
However, it creates a cleaner separation of responsibilities.
Java is used for:
- APIs
- persistence
- service orchestration
- validation
- structured domain modelling
Python is used for:
- Garmin data extraction
- data analysis
- statistical processing
- future machine learning experiments
This avoids using the wrong tool for the wrong job.
Trade-Off 3: Personal Data and Privacy
Health data is sensitive.
The platform is being designed with privacy in mind.
Important principles include:
- avoid unnecessary data sharing
- keep analysis local where possible
- store only useful data
- avoid exposing personal health information through logs
- use AI only on processed summaries where possible
- avoid sending raw personal data to external services unless explicitly required
This is particularly important if the system later becomes multi-user.
Trade-Off 4: Analysis Before Coaching
The first goal is analysis, not automated coaching.
Coaching recommendations are more complex because they can influence training behaviour and injury risk.
The platform should first become good at explaining what has happened.
Only after that should it suggest what to do next.
Example Analysis Output
A future analysis response may look like this:
{
"period": {
"startDate": "2026-05-01",
"endDate": "2026-05-14"
},
"comparisonPeriod": {
"startDate": "2026-04-17",
"endDate": "2026-04-30"
},
"summary": {
"sleepScoreChange": "+8%",
"restingHeartRateChange": "-3 bpm",
"trainingVolumeChange": "+22%",
"stressChange": "-11%",
"recoveryAssessment": "Improving"
},
"aiInsight": "Recovery markers improved during the current period. Sleep score increased, resting heart rate reduced, and average stress decreased. Training volume also increased, but recovery indicators remained stable, suggesting the current workload is manageable."
}
This is the type of output the platform is intended to produce: structured enough for software, but clear enough for a human.
Future Development
The future direction is to combine Garmin data with other personal health and training data sources.
The next major step is to bring in data from:
- my weight training app
- my food tracking app
- Garmin Connect
This would allow the platform to analyse the relationship between:
- strength training volume
- running and conditioning load
- sleep quality
- resting heart rate
- recovery indicators
- nutrition
- calorie intake
- protein intake
- body weight trends
- body composition goals
The long-term goal is to create AI-generated suggestions that are grounded in multiple data sources rather than a single fitness platform.
For example, the system could eventually identify patterns such as:
- poor sleep after high-volume training days
- strength performance dropping during calorie deficits
- recovery improving when protein intake is higher
- body weight changes compared with training load
- whether conditioning work is interfering with strength progression
- whether food intake supports the current training goal
The AI layer would then be able to make more useful suggestions, such as:
- when to reduce training intensity
- when to increase recovery
- when nutrition may be limiting performance
- when weight loss is too aggressive
- when strength training and running loads are becoming unbalanced
- when a deload week may be sensible
The key principle is that suggestions should be based on connected evidence, not generic fitness advice.
Future Data Model
erDiagram
USER ||--o{ GARMIN_DAILY_SUMMARY : owns
USER ||--o{ GARMIN_ACTIVITY : owns
USER ||--o{ WEIGHT_TRAINING_SESSION : owns
USER ||--o{ FOOD_LOG : owns
USER ||--o{ ANALYSIS_RESULT : receives
GARMIN_DAILY_SUMMARY {
date summaryDate
int sleepScore
int bodyBattery
int stressScore
float restingHeartRate
float hrv
}
GARMIN_ACTIVITY {
date activityDate
string activityType
int durationMinutes
int calories
float averageHeartRate
float trainingLoad
}
WEIGHT_TRAINING_SESSION {
date sessionDate
string programme
int totalSets
float totalVolume
string intensity
}
FOOD_LOG {
date logDate
int calories
int proteinGrams
int carbsGrams
int fatGrams
}
ANALYSIS_RESULT {
date startDate
date endDate
string recoveryStatus
string trainingLoadStatus
string nutritionStatus
string aiSummary
}
This future model would allow the system to connect training, recovery, nutrition, and body composition data into one analytical view.
Future Recommendation Flow
flowchart TD
A[Garmin Recovery Data] --> D[Combined Analysis Engine]
B[Weight Training Data] --> D
C[Food Tracking Data] --> D
D --> E[Detect Patterns]
E --> F[Apply Rules and Thresholds]
F --> G[Generate AI Explanation]
G --> H[Personal Suggestion]
H --> I[Training Adjustment]
H --> J[Nutrition Observation]
H --> K[Recovery Warning]
H --> L[Progress Summary]
The value of the future platform comes from combining multiple data sources. Garmin can show recovery and activity data, but it does not fully understand weight training intent, nutrition context, or personal body composition goals.
Future User Interface
The intention is not to add a specific UI rather details will be sent via an email answering the following questions:-
- Am I recovering?
- Am I improving?
- Am I overreaching?
- Is my food intake supporting my training?
- What changed this week?
- What should I watch next?
The email should be organised around decisions, not just data categories.
Potential Future Features
AI Fitness Coach
A later version could use the analysis data to suggest training adjustments.
For example:
- reduce intensity after poor recovery
- increase zone 2 volume when aerobic work is low
- flag poor sleep before high-intensity sessions
- recommend deload periods
- compare strength and cardio balance
- identify when fatigue is accumulating
This would require careful design because training advice needs to be safe, explainable, and personalised.
Email Insight Service
A separate email service could send weekly summaries.
Example email sections:
- weekly recovery score
- sleep summary
- training load trend
- nutrition summary
- strength training trend
- key risk indicators
- recommended focus for next week
- notable changes compared with last week
This would make the platform more useful without requiring the user to log in every day.
Machine Learning Layer
A future machine learning layer could be used to identify patterns such as:
- which training weeks lead to better sleep
- which sessions increase fatigue most
- which patterns precede poor recovery
- which combinations of training and sleep produce better performance
- whether certain behaviours improve resting heart rate or HRV
- how calorie intake and protein intake affect training performance
- whether weight loss is affecting strength output
The first version does not need complex machine learning. Good trend analysis and clear summaries are more valuable at this stage.
What This Project Demonstrates
This project demonstrates several important product and technical capabilities:
- turning a personal frustration into a structured product concept
- identifying useful user problems from personal data
- designing a multi-service architecture
- separating data collection, storage, analysis, and explanation
- using Spring Boot for robust back-end development
- using Python for data analysis
- thinking carefully about AI boundaries
- designing for future extensibility
- balancing technical ambition with practical delivery
It also shows how personal projects can be used to explore real product decisions rather than simply building technology for its own sake.
Product Management Reflection
The most important product decision in this project is the decision to focus on interpretation rather than collection.
Collecting Garmin data is useful, but not enough.
The real value comes from helping the user understand what has changed, why it might matter, and what they may want to monitor next.
This is a common product pattern: the data itself is not the product outcome. The decision support created from the data is the outcome.
The project also reflects an important principle in AI product design:
AI is most useful when it is grounded in structured data, clear rules, and a specific user problem.
The platform should not simply generate motivational fitness content. It should explain real trends using real data.
The future opportunity is to combine Garmin data, weight training data, and food tracking data into a more complete personal performance model. That is where AI suggestions become more useful: not because the model is clever, but because the context is richer.
Status
The project is currently in development.
Current focus areas include:
- Garmin data extraction
- Spring Boot API design
- structured health summary models
- JSON mapping with Jackson
- database persistence
- date-range comparison logic
- Python analysis service design
- AI-generated summary structure
- future reporting and email delivery
The next stage is to make the analysis outputs more useful, more visual, and easier to consume.
Longer-term development will focus on integrating data from my weight training app and food tracking app so the platform can make better AI-assisted suggestions across recovery, training, nutrition, and body composition.