Jump to content

Personal APIs: Difference between revisions

From Archive
Created page with "= Personal APIs = ''Data aggregation system for self-quantification and AI context enhancement'' == Architecture Overview == Built on [https://nuxt.com/ Nuxt] / [https://nitro.unjs.io/ Nitro] with basic caching layer. All endpoints return JSON and support CORS for cross-origin requests from mobile apps and AI assistants. Base URL: `https://ejfox.com/api/` === Core Philosophy === * '''AI Context Enhancement''' - Provide rich personal data to language models * '''Self..."
 
Fixed duplicate navbox, added Building Tools for Yourself link
 
(4 intermediate revisions by 2 users not shown)
Line 7: Line 7:
Built on [https://nuxt.com/ Nuxt] / [https://nitro.unjs.io/ Nitro] with basic caching layer. All endpoints return JSON and support CORS for cross-origin requests from mobile apps and AI assistants.
Built on [https://nuxt.com/ Nuxt] / [https://nitro.unjs.io/ Nitro] with basic caching layer. All endpoints return JSON and support CORS for cross-origin requests from mobile apps and AI assistants.


Base URL: `https://ejfox.com/api/`
Base URL: <code>https://ejfox.com/api/</code>


=== Core Philosophy ===
=== Core Philosophy ===
* '''AI Context Enhancement''' - Provide rich personal data to language models
* '''AI Context Enhancement''' - Provide rich personal data to language models
* '''Self-Quantification''' - Track KPIs aligned with personal improvement goals
* '''Self-Quantification''' - Track KPIs aligned with personal improvement goals
* '''Data Sovereignty''' - Own your data instead of just feeding the surveillance machine
* '''Data Sovereignty''' - Own your data instead of just feeding the surveillance machine
* '''API-First Design''' - Choose services that offer data egress and avoid data silos
* '''API-First Design''' - Choose services that offer data egress and avoid data silos
Line 24: Line 24:


=== Productivity & Learning ===
=== Productivity & Learning ===
* [https://mastodon-posts.ejfox.tools/ mastodon-posts.ejfox.tools] most recent posts from @[email protected]
* '''[https://ejfox.com/api/rescuetime /api/rescuetime]''' - [https://www.rescuetime.com/ RescueTime] productivity analytics
* '''[https://ejfox.com/api/rescuetime /api/rescuetime]''' - [https://www.rescuetime.com/ RescueTime] productivity analytics
* '''[https://ejfox.com/api/leetcode /api/leetcode]''' - [https://leetcode.com/ LeetCode] problem-solving progress
* '''[https://ejfox.com/api/leetcode /api/leetcode]''' - [https://leetcode.com/ LeetCode] problem-solving progress
Line 61: Line 62:
=== Response Format ===
=== Response Format ===
All endpoints return JSON with consistent structure:
All endpoints return JSON with consistent structure:
```json
<pre>
{
{
   "data": { /* endpoint-specific data */ },
   "data": { /* endpoint-specific data */ },
Line 70: Line 71:
   }
   }
}
}
</pre>
== Same Data, Many Interfaces ==
The personal API enables [[Same Data Many Interfaces|multi-modal access]] - same underlying data, different interfaces for different contexts.
=== The Pattern ===
<pre>
[Data Layer] (APIs aggregate from multiple sources)
    ↓
[API Layer] (consistent JSON, unified caching)
    ↓
[Interface Layer] (multiple, context-specific)
├─ AI assistants (Claude, Coach Artie get full context)
├─ Website widgets (live stats display)
├─ Mobile apps (health dashboard)
└─ CLI tools (terminal queries)
</pre>
Data stays useless until something accesses it. The API makes personal data queryable by any interface.
=== Context-Driven Access ===
{| class="wikitable"
|-
! Context !! Interface !! Example
|-
| AI conversation || Claude/Coach Artie || "How much did I code today?" → API provides actual data
|-
| Morning review || Website dashboard || Visual stats, charts, trends
|-
| Quick check || Alfred/CLI || One-line query, instant answer
|-
| Deep analysis || Python/SQL || Full data export, custom analysis
|}
=== Why This Matters ===
'''For AI context:''' Language models with access to actual behavioral data give more relevant, personalized responses. "You haven't committed in 3 days" beats generic advice.
'''For [[Quantified Self|self-understanding]]:''' Same data viewed through different lenses reveals different patterns. The dashboard shows trends; the CLI answers specific questions.
'''For [[Building Tools for Yourself|dogfooding]]:''' You are the user. The interface that's fastest for you is the one that matters.
== Related ==
* [[Quantified Self]] - Philosophy of tracking
* [[Scrapbook-core]] - Another multi-interface system
* [[Coach Artie]] - AI that consumes these APIs
* [[Same Data Many Interfaces]] - The design pattern
* [[Building Tools for Yourself]] - Why personal tools work
[[Category:Technical]]
[[Category:Personal Data]]
[[Category:API Development]]
{{Navbox Technical}}

Latest revision as of 14:49, 18 January 2026

Personal APIs

Data aggregation system for self-quantification and AI context enhancement

Architecture Overview

Built on Nuxt / Nitro with basic caching layer. All endpoints return JSON and support CORS for cross-origin requests from mobile apps and AI assistants.

Base URL: https://ejfox.com/api/

Core Philosophy

  • AI Context Enhancement - Provide rich personal data to language models
  • Self-Quantification - Track KPIs aligned with personal improvement goals
  • Data Sovereignty - Own your data instead of just feeding the surveillance machine
  • API-First Design - Choose services that offer data egress and avoid data silos

Active Endpoints

Health & Fitness

Tracks: daily steps, exercise minutes, stand hours, distance, heart rate variability

Productivity & Learning

Development

Creative & Content

Predictions & Analysis

Technical Implementation

Data Sources

  • Apple Health - via HealthKit exports and processing
  • GitHub API - commit patterns, repo activity, contribution graphs
  • RescueTime API - time tracking and productivity metrics
  • Chess.com API - game history and ratings
  • Last.fm API - scrobbling data going back 10+ years
  • LeetCode scraping - problem completion and difficulty tracking
  • MonkeyType - typing test results and WPM progression

Caching Strategy

Most endpoints implement intelligent caching:

  • Health data - Updates every 4 hours
  • GitHub activity - Updates every hour
  • Music listening - Updates every 30 minutes
  • Static metrics - Cached for 24 hours

Response Format

All endpoints return JSON with consistent structure:

{
  "data": { /* endpoint-specific data */ },
  "meta": {
    "cached_at": "2025-05-28T10:30:00Z",
    "source": "api_name",
    "updated": "recent" | "stale"
  }
}

Same Data, Many Interfaces

The personal API enables multi-modal access - same underlying data, different interfaces for different contexts.

The Pattern

[Data Layer] (APIs aggregate from multiple sources)
     ↓
[API Layer] (consistent JSON, unified caching)
     ↓
[Interface Layer] (multiple, context-specific)
├─ AI assistants (Claude, Coach Artie get full context)
├─ Website widgets (live stats display)
├─ Mobile apps (health dashboard)
└─ CLI tools (terminal queries)

Data stays useless until something accesses it. The API makes personal data queryable by any interface.

Context-Driven Access

Context Interface Example
AI conversation Claude/Coach Artie "How much did I code today?" → API provides actual data
Morning review Website dashboard Visual stats, charts, trends
Quick check Alfred/CLI One-line query, instant answer
Deep analysis Python/SQL Full data export, custom analysis

Why This Matters

For AI context: Language models with access to actual behavioral data give more relevant, personalized responses. "You haven't committed in 3 days" beats generic advice.

For self-understanding: Same data viewed through different lenses reveals different patterns. The dashboard shows trends; the CLI answers specific questions.

For dogfooding: You are the user. The interface that's fastest for you is the one that matters.


Technical
Core Technical · CLI · Dotfiles · Nvim · SSH · VPS
Tools Sketchybar · ArchiveBox · ThinkPad Linux
Systems Automation · Personal APIs · Quantified Self
Reference Runbooks · New Computer Runbook · Syntax guide