Quantified Self
May 7, 2026 ยท View on GitHub
Quantified Self is a powerful platform for aggregating, analyzing, and visualizing your fitness data. It supports importing activity files (TCX, FIT, JSON) and synchronizing directly with major fitness services like Garmin, Suunto, Polar, and COROS.
Built on Firebase and Angular, it aims to provide real-time dashboards and deep activity analysis.
Check it out live at quantified-self.io.
๐ Features
- Multi-Source Import: Import
.fit,.tcx, and.gpxfiles manually. - Auto-Sync: Seamless integration with Garmin Connect, Suunto App, and COROS.
- Advanced Analysis: Deep dive into heart rate zones, power curves, and intensity distribution.
- Interactive Maps: Visualize routes using Leaflet.
- Financial & Usage Tracking: Monitor cloud function usage and costs (Admin only).
๐ Tech Stack
- Frontend: Angular v20+, Angular Material, RxJS.
- Backend: Firebase (Functions, Firestore, Hosting, Storage, Auth).
- Visualization: AmCharts 4, Chart.js, Leaflet.
- Parsing: Quantified Self Lib (Custom parser for FIT/TCX/GPX).
- Testing: Vitest.
๐ Prerequisites
Ensure you have the following installed:
- Node.js: v20 or higher.
- npm: Comes with Node.js.
- Firebase CLI:
npm install -g firebase-tools - Java: Required for running Firebase Emulators locally.
โก๏ธ Quick Start
1. Clone the Repository
git clone https://github.com/jimmykane/quantified-self.git
cd quantified-self
2. Install Dependencies
Root (Frontend):
npm install
Functions (Backend):
cd functions
npm install
cd ..
3. Run Locally (Frontend)
Starts the Angular development server.
npm start
# Access at http://localhost:4200/
Functions target toggle on localhost:
# Localhost app + Functions emulator (default)
npm run start:functions:emu
# Localhost app + production Cloud Functions
npm run start:functions:prod
Note: In emulator mode, callable requests target the local Functions emulator, but backend code can still reach real external APIs depending on functions/.env or bound secrets.
4. Run Locally (Backend Environment)
To run Cloud Functions and other Firebase services locally:
firebase emulators:start
๐งช Testing
We use Vitest for unit testing.
Run all tests:
npm test
Run tests with coverage:
npm run test-coverage
Run specific Firestore Rules tests:
npm run test:rules
๐ฆ Deployment
Deployment is handled via Firebase CLI. Common scripts:
- Deploy Beta (Hosting only):
npm run firebase-hosting-beta - Deploy Production (Build & Deploy):
npm run build-and-deploy-prod
๐ Data Retention & policies
To ensure data hygiene and compliance, we enforce Time-To-Live (TTL) policies on specific Firestore collections:
| Collection | TTL Duration | Field | Description |
|---|---|---|---|
mail | ~90 days | expireAt | Transactional emails logs |
aiInsightsPromptRepairs | ~90 days | expireAt | Server-owned backlog of AI-repaired prompts for deterministic parser improvements |
failed_jobs | 7 days | expireAt | Logs for failed background jobs |
*Queue | 7 days | expireAt | Temporary queue items for processing |
adminStats | ~1 hour | expireAt | Short-lived admin aggregate cache documents |
userDeletionTombstones | Account-deletion retention window | expireAt | Durable deletion guard tombstones with TTL fallback cleanup |
๐ค Contribution
Contributions are welcome! Please follow the code of conduct and submitting PRs.
This project uses eslint and prettier for code formatting.
Core Libraries: This project relies heavily on Quantified Self Lib for file parsing logics.
๐ License
See LICENSE for more details.
Icons by Alessandro