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.
- 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).
- 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.
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.
git clone https://github.com/jimmykane/quantified-self.git
cd quantified-selfRoot (Frontend):
npm installFunctions (Backend):
cd functions
npm install
cd ..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:prodNote: 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.
To run Cloud Functions and other Firebase services locally:
firebase emulators:startWe use Vitest for unit testing.
Run all tests:
npm testRun tests with coverage:
npm run test-coverageRun specific Firestore Rules tests:
npm run test:rulesDeployment 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
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 |
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.
See LICENSE for more details.
Icons by Alessandro