What inspires the people who inspire you? inspiredby.social
README.md

Key decisions #

Why Inspired #

Who inspired the people who inspired me? Early twitter would help with that and it was fantastic but I think it's long gone. Personal website such as worrydream from Bret Victor are now the main source but not everyone share their inspirations. I wanted to build something for a while but I was worried about the chicken and egg problem. Nobody would use it if there are no inspirations yet.

How does it work #

As a user, you can add 3 people inspirations, 3 book inspirations and 3 talk/video inspirations. By linking people to people, books and video to people, we can build a nice graph for quick exploration.

Why cap at 3 #

Something about constraints, choice paralysis and creativity but also to not fall into the infinite feed trap. I really want to know what someone considers a must read, not their top 20. We could consider 5 or more categories but not infinite inspirations. Other apps can do that well.

Why Atproto #

I recently started learning more about atproto and it feels like a perfect fit. Public data and data ownership are great foundation. Natural social graph to link atmosphere accounts to other atmosphere accounts. Easy discovery of friends inspirations (using existing bluesky follows). Auth already built-in. Cross app integration with the likes of bluesky, popfeed.social, standard.site so we can easily explore beyond main inspirations.

Schema #

  • social.inspiredby.inspiration
    • category: person | book | video
    • subject: did | wikidataid | Open Library work URL | Google Books volume URL | YouTube URI
    • name: display name for the subject
    • subtitle: short description
    • image
    • note

If that's even possible, we could consider social.inspiredby.inspiration.book instead of category: book but it looks like it would make ingestion harder. The appview just has an entity table with category column so it maps better.

There also was an option to find a schema that forbid more than 3 inspirations using an array. I feel like it's unnecessary constraint and Inspired appview could keep the last 3 while another app could use more if needed. Let's play nice

metadata for name, subtitle and image. Those could be derived from the subject so we could argue it shouldn't be there. Benefit is that browsing a PDS allows to identify an inspiration quickly (the id only wouldn't be enough), it makes bootstraping the appview easier because there is enough data in records to render a useful UI. Cons: It can get out of date but we fix that by regularly updating metadata in the appview.

Why allow wikidata inspiration as well as atmosphere account #

I imagine most of the inspirations will be older people who do not have an atmosphere account. We still want to capture those even if it makes the app more complicated. Plan is to allow merging of wikidata/atmopshere account when possible to avoid split.

Why youtube only for video #

It's simple enough to start with and should stay around for a while.

Why not a graph visualiser/explorer #

I don't like those for the same reason I don't like free canvas. They feel too big, I get lost in them and I don't want to zoom/unzoom and look at tiny rectangles. They also don't work very well on mobile. I prefer to find ways to get a graph like navigation without showing the full graph with nodes and edges. Current implementation shows a session breadcrumb that helps with that without the other downsides. Could be revisited if there are interesting graph query and visualisation like shortest path between X and Y.

Dev #

Astro 7 application running on Cloudflare Workers with D1-backed ATProto OAuth sessions and a separate D1-backed AppView.

Run locally #

Copy .dev.vars.example to .dev.vars, set GOOGLE_BOOKS_API_KEY, and start the app:

cp .dev.vars.example .dev.vars
pnpm dev

Open the loopback address expected by the OAuth client metadata: http://127.0.0.1:4321 (not localhost). OAuth automatically uses the ATProto loopback client and callback in local development.

Deploy #

Store the Google Books key as a Worker secret once, then deploy:

pnpm exec wrangler secret put GOOGLE_BOOKS_API_KEY
pnpm deploy

Production OAuth derives its client ID and callback URL from the browser's request origin and publishes client metadata at /api/auth/client-metadata.json. Worker URLs and custom domains therefore use their matching OAuth callback automatically.

Current deployment: https://inspired-poc.jeremy-vuillermet.workers.dev

POC architecture #

  • Astro renders the discovery and profile/data-entry pages.
  • OAuth state, DPoP keys, access/refresh tokens, and hashed browser-session mappings are persisted in the dedicated inspired-auth D1 database.
  • Authentication requests run directly in the Worker; no global Durable Object coordinates them.
  • Sessions survive local server restarts. Browser sessions expire after 14 days; disconnecting revokes the OAuth session.
  • OAuth requests create, update, and delete access for social.inspiredby.inspiration; public profile and repository reads do not require an OAuth permission.
  • Inspiration records are written to the connected PDS, which remains authoritative.
  • The inspired-appview D1 database is disposable and can be rebuilt from public repositories and external metadata. The separate auth database is not part of that rebuild lifecycle.
  • Entity and alias UUIDs are deterministically derived from normalized portable identifiers. Entity URLs expose a stable 26-character encoding of the entity UUID using ATProto's lowercase base32-sortable alphabet, so rebuilding D1 does not change them.
  • The original bootstrap script enumerates repositories with com.atproto.sync.listReposByCollection. The Jetstream bootstrap instead folds a bounded Jetstream network snapshot into the current collection state. Both resolve public actor profiles and rebuild D1 from every valid record; every discovered actor is materialized as a person entity, so actor lists and person pages use the same preferred-alias metadata.
  • Successful writes and deletions are projected immediately. Page-session reads use only the Auth Durable Object and D1; they do not reconcile against the PDS. A future Jetstream consumer will keep externally changed records in sync.
  • Collection NSID: social.inspiredby.inspiration.
  • External lookup sources: ATProto, Wikidata, Google Books, Open Library, and YouTube oEmbed.
  • The maximum of three records per category is enforced only by the UI.

The collection Lexicon is stored at lexicons/social/inspiredby/inspiration.json. Publishing it to the ATProto network is a separate step and requires a _lexicon.inspiredby.social TXT record with the value did=<publishing-account-DID>.

Commands #

pnpm dev          # migrate local auth D1, then start the local workerd server
pnpm build        # production build
pnpm preview      # migrate local auth D1, then run a local production preview
pnpm deploy       # migrate remote auth D1, build, and deploy
pnpm generate-types
pnpm auth:migrate:local
pnpm auth:migrate:remote
pnpm appview:bootstrap --local
pnpm appview:bootstrap-jetstream --local
pnpm appview:seed --local
pnpm appview:clear --local
pnpm appview:delete --local

appview:seed adds an idempotent fixture set of synthetic curators, entities, notes, credits, and overlapping selections to the selected AppView. It is useful for exercising dense discovery and entity-detail screens. Running it again replaces only the synthetic fixture set; running bootstrap or clear removes it.

Both bootstrap commands fetch and validate all source records before replacing AppView data. appview:bootstrap-jetstream uses the Jetstream SDK's bounded snapshot() API, folds creates, updates, deletes, account deletions, and sync markers, then exits without starting a live tail. Set BLUESKY_API_KEY in .env, or pass --api-key <key> to override it. The key is passed directly to the SDK and is required only for the metered snapshot HTTP calls.

Remote mode must be selected explicitly:

pnpm appview:bootstrap --remote
pnpm appview:bootstrap-jetstream --remote
pnpm appview:seed --remote
pnpm appview:clear --remote

appview:clear deletes AppView data while preserving the schema and Wrangler migration history. Bootstrap, seed, and clear require exactly one explicit --local or --remote argument.

appview:delete --local is local-only. It drops the local AppView schema and migration history without touching the separate local auth database, and refuses to run while the Astro dev server is active. Recreate it with pnpm appview:bootstrap --local.

Optional overrides are available for rebuilding after a database or record namespace change:

pnpm appview:bootstrap --local \
  --database inspired-appview \
  --collection social.inspiredby.inspiration \
  --relay https://relay1.us-east.bsky.network

pnpm appview:bootstrap-jetstream --local \
  --database inspired-appview \
  --collection social.inspiredby.inspiration \
  --service https://jetstream.us-west.bsky.network/

The original static design is preserved as design-prototype.html.