Summary
Create a GitHub App that installs into a user's account and generates a profiles-sh repository with GitHub Actions for self-hosted profile generation, caching, and rendering.
Motivation
Currently, profiles.sh fetches and computes everything server-side on each visit (with caching). A GitHub App approach would:
- Reduce API pressure: GitHub Actions run authenticated as the user's installation, with higher rate limits
- Enable offline/self-hosted: Users own their generated profile data in their own repo
- Allow deeper customization: Users can edit generated config files directly
- Support CI/CD: Profiles regenerate on a schedule or on push via GitHub Actions
Proposed Architecture
GitHub App Installation Flow
- User clicks "Install" on profiles.sh
- GitHub App requests permissions:
read:user, read:repos, read:stars, write:contents (for the generated repo)
- On installation, the App creates a
profiles-sh repo in the user's account
- Populates it with:
profile.json — computed persona data (same output as the engine)
.github/workflows/refresh.yml — scheduled Action to re-compute
config.yml — user-editable customization (featured repos, topics, etc.)
README.md — rendered profile card in markdown
GitHub Actions Workflow
name: Refresh Profile
on:
schedule:
- cron: '0 6 * * 1' # Weekly Monday 6am
push:
paths: ['config.yml']
workflow_dispatch:
The Action would:
- Fetch user's repos, stars, orgs via GitHub API (authenticated via App token)
- Run the persona engine (published as an npm package or bundled in the repo)
- Write updated
profile.json and README.md
- Optionally push rendered OG image to the repo
profiles.sh Integration
When a user with the App installed visits username.profiles.sh:
- Check if
profiles-sh repo exists for the user
- If yes, fetch
profile.json from the repo (cached in R2)
- Render from pre-computed data — no API calls needed
- Fall back to server-side computation if repo is stale or missing
Sub-tasks
Dependencies
- Persona engine must be extractable as a standalone module (currently tightly coupled to Astro/CF)
- GitHub App registration requires a public URL for webhooks
Labels
enhancement, github-app, milestone:future
Summary
Create a GitHub App that installs into a user's account and generates a
profiles-shrepository with GitHub Actions for self-hosted profile generation, caching, and rendering.Motivation
Currently, profiles.sh fetches and computes everything server-side on each visit (with caching). A GitHub App approach would:
Proposed Architecture
GitHub App Installation Flow
read:user,read:repos,read:stars,write:contents(for the generated repo)profiles-shrepo in the user's accountprofile.json— computed persona data (same output as the engine).github/workflows/refresh.yml— scheduled Action to re-computeconfig.yml— user-editable customization (featured repos, topics, etc.)README.md— rendered profile card in markdownGitHub Actions Workflow
The Action would:
profile.jsonandREADME.mdprofiles.sh Integration
When a user with the App installed visits
username.profiles.sh:profiles-shrepo exists for the userprofile.jsonfrom the repo (cached in R2)Sub-tasks
config.ymlschema and parserDependencies
Labels
enhancement,github-app,milestone:future