Skip to content

willvelida/biotrackr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

biotrackr

License .NET Azure

biotrackr is a personal health platform that integrates with the Fitbit API to collect, analyze, and provide insights on health and fitness data. The application follows a microservices architecture deployed on Azure, with comprehensive CI/CD pipelines and infrastructure as code.

πŸ“‹ Table of Contents

πŸ—οΈ Architecture

The application follows a microservices architecture with separate services for different health domains:

  • Activity Service: Processes and stores physical activity data from Fitbit
  • Sleep Service: Manages sleep tracking and analysis
  • Weight Service: Handles weight measurements and trends
  • Food Service: Tracks nutrition and food logging data from Fitbit
  • Auth Service: Manages authentication and authorization with Fitbit API

Each service consists of:

  • API Layer: RESTful endpoints for data access
  • Service Layer: Business logic and integration with Fitbit API
  • Data Layer: Azure Cosmos DB for persistence

✨ Features

  • πŸƒ Activity Tracking: Comprehensive workout and activity data collection
  • 😴 Sleep Analysis: Sleep patterns, stages, and quality metrics
  • βš–οΈ Weight Management: Weight tracking and trend visualization
  • 🍎 Food Logging: Nutrition tracking and food diary management
  • πŸ” Secure Authentication: OAuth integration with Fitbit
  • πŸ“Š Data Insights: Analysis and reporting on health metrics
  • ☁️ Cloud-Native: Fully deployed on Azure with auto-scaling
  • πŸš€ CI/CD: Automated testing, deployment, and infrastructure management

πŸ› οΈ Tech Stack

Backend

  • .NET 9.0: Modern C# microservices
  • Azure Functions: Serverless compute for background processing
  • Azure Cosmos DB: NoSQL database for scalable data storage
  • Azure App Configuration: Centralized configuration management
  • Azure Key Vault: Secure secrets management

Infrastructure

  • Bicep: Infrastructure as Code (IaC) for Azure resources
  • GitHub Actions: CI/CD pipelines and workflow automation
  • Docker: Containerization for consistent environments
  • Azure API Management: API gateway with JWT validation for secure managed identity authentication

Testing

  • xUnit: Unit and integration testing framework
  • FluentAssertions: Readable test assertions
  • Moq: Mocking framework for unit tests
  • Cosmos DB Emulator: Local database testing

πŸš€ Getting Started

Prerequisites

Local Development Setup

  1. Clone the repository

    git clone https://github.com/willvelida/biotrackr.git
    cd biotrackr
  2. Start Cosmos DB Emulator

    Windows (PowerShell):

    .\cosmos-emulator.ps1 start

    macOS/Linux:

    docker-compose -f docker-compose.cosmos.yml up -d
  3. Install SSL Certificate (Required for local testing)

    Follow the Cosmos DB Emulator Setup Guide for platform-specific instructions.

  4. Build a service

    cd src/Biotrackr.Activity.Api
    dotnet build
  5. Run tests

    # Unit tests only
    dotnet test --filter "FullyQualifiedName~UnitTests"
    
    # All tests (requires Cosmos DB Emulator)
    dotnet test

For more detailed setup instructions, see the Cosmos DB Emulator Setup Guide.

πŸ“Š Build Status

Component Deployment Status Unit Test Coverage Integration Test Coverage
Infrastructure Deploy Core Biotrackr Infrastructure N/A N/A
Auth Service Deploy Auth Service Code Coverage Integration Tests
Activity Service Deploy Activity Service Code Coverage Integration Tests
Activity API Deploy Activity Api Code Coverage Integration Tests
Sleep API Deploy Sleep Api Code Coverage Integration Tests
Sleep Service Deploy Sleep Service Code Coverage Integration Tests
Weight API Deploy Weight Api Code Coverage Integration Tests
Weight Service Deploy Weight Service Code Coverage Integration Tests
Food API Deploy Food Api Code Coverage Integration Tests
Food Service Deploy Food Service Code Coverage Integration Tests

πŸ“š Documentation

Architecture & Design

Development Guides

Key Decision Records

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Author: willvelida

For questions or feedback, please open an issue on this repository.

About

My personal health platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •