PHPackages                             abduns/laravel-fit-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. abduns/laravel-fit-reader

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

abduns/laravel-fit-reader
=========================

A focused Laravel 12 package to read Garmin .fit activity files.

v1.2.3(1mo ago)1113MITPHPPHP ^8.2CI passing

Since Dec 7Pushed 1mo agoCompare

[ Source](https://github.com/abduns/laravel-fit-reader)[ Packagist](https://packagist.org/packages/abduns/laravel-fit-reader)[ Docs](https://github.com/abduns/laravel-fit-reader)[ RSS](/packages/abduns-laravel-fit-reader/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (10)Versions (8)Used By (0)

laravel-fit-reader
==================

[](#laravel-fit-reader)

A focused, developer-friendly Laravel package to read and parse Garmin `.fit` activity files.

[![Tests](https://github.com/abduns/laravel-fit-reader/actions/workflows/tests.yml/badge.svg)](https://github.com/abduns/laravel-fit-reader/actions)[![Version](https://camo.githubusercontent.com/c5262b31cd8066460f92e1374e818e6c5431eacefaf9367baa8a6c9cc2afbb75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616264756e732f6c61726176656c2d6669742d7265616465722e737667)](https://packagist.org/packages/abduns/laravel-fit-reader)[![Downloads](https://camo.githubusercontent.com/0cfefb3c9b81e1075569e3ac4b36ba43e084c00050335f49b50a809f66382844/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616264756e732f6c61726176656c2d6669742d7265616465722e737667)](https://packagist.org/packages/abduns/laravel-fit-reader)[![License](https://camo.githubusercontent.com/6ecd1c2e69213b242e5109dfc8894743383631ff3cd6c747990858518cceb9fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616264756e732f6c61726176656c2d6669742d7265616465722e737667)](LICENSE.md)

---

Features
--------

[](#features)

- Modern PHP support
- Lightweight and fast
- Typed API
- DTO Support
- Laravel Integration
- Extensible architecture

---

Installation
------------

[](#installation)

```
composer require abduns/laravel-fit-reader
php artisan vendor:publish --tag="fit-reader-config"
```

---

Quick Start
-----------

[](#quick-start)

```
use Dunn\FitReader\Facades\FitReader;

// Read from a local path
$activity = FitReader::fromPath(storage_path('app/activities/run.fit'));

echo "Total Distance: " . $activity->totalDistanceMeters . " meters";
```

Example output:

```
Total Distance: 5000.5 meters

```

---

Why This Package?
-----------------

[](#why-this-package)

- Existing solutions are outdated or rely on external binaries
- Missing modern PHP features
- Poor developer experience
- No standards compliance
- Not built specifically for Laravel 12+

This package provides a native PHP implementation for parsing FIT files, converting raw data into easy-to-use Data Transfer Objects (DTOs).

---

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Dunn\FitReader\Facades\FitReader;

$activity = FitReader::fromPath(storage_path('app/activities/run.fit'));

// Activity Summary
echo "Start Time: " . $activity->startTime->format('Y-m-d H:i:s');
echo "Sport: " . $activity->getSportName(); // e.g., "running", "cycling", "swimming"
```

### Advanced Usage

[](#advanced-usage)

```
use Illuminate\Http\Request;
use Dunn\FitReader\Facades\FitReader;

class ActivityController extends Controller
{
    public function store(Request $request)
    {
        $file = $request->file('activity_file');

        // Parse the uploaded file directly
        $activity = FitReader::fromUploadedFile($file);

        // Export entire activity as array
        $array = $activity->toArray();
        $json = $activity->toJson();

        return response()->json([
            'distance' => $activity->totalDistanceMeters,
            'duration' => $activity->totalDurationSeconds,
            'records_count' => $activity->records->count(),
        ]);
    }
}
```

### Configuration

[](#configuration)

```
return [
    'units' => [
        'raw_values' => false, // Set to true if you want raw values instead of converted units
    ],
];
```

---

Standards / Specifications
--------------------------

[](#standards--specifications)

References:

- Flexible and Interoperable Data Transfer (FIT) Protocol

---

Supported Features
------------------

[](#supported-features)

FeatureSupportActivity Parsing✅Records (Time Series Data)✅Laps Data✅Exporting Data✅Detecting Activity Type✅---

Compatibility
-------------

[](#compatibility)

PlatformSupportedPHP 8.2+✅Laravel 12.x✅---

Design Goals
------------

[](#design-goals)

- Developer experience first
- Predictable APIs
- Minimal dependencies
- Strong typing
- Extensibility
- Native PHP Implementation

---

Architecture
------------

[](#architecture)

- Decoded streams into typed DTOs (`FitActivity`, `FitRecord`, `FitLap`)
- Facade for ease of use
- Native file parsing without binary dependencies

---

Performance
-----------

[](#performance)

OperationTimeParse typical FIT file&lt; 50ms---

Testing
-------

[](#testing)

```
composer test
```

---

Roadmap
-------

[](#roadmap)

- Support writing/editing FIT files

---

Contributing
------------

[](#contributing)

Contributions, issues, and discussions are welcome.

---

Security
--------

[](#security)

If you discover security issues, please report them responsibly.

---

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Total

5

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28977075?v=4)[Abdun](/maintainers/abduns)[@abduns](https://github.com/abduns)

---

Top Contributors

[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (12 commits)")[![abduns](https://avatars.githubusercontent.com/u/28977075?v=4)](https://github.com/abduns "abduns (10 commits)")

---

Tags

laravelparseractivitygarminFittrainingfitnessworkoutfit-reader

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/abduns-laravel-fit-reader/health.svg)

```
[![Health](https://phpackages.com/badges/abduns-laravel-fit-reader/health.svg)](https://phpackages.com/packages/abduns-laravel-fit-reader)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
