๐Ÿ“š Agora node [[@neil/txt]] (empty) โ˜†
This Agora node is empty. Be the first to ๐ŸŒฑ Write a contribution, ๐Ÿงญ Wander to a connected node, or ๐ŸŽฎ play a minigame.
๐Ÿ“š Agora node [[20261126 Learning Erlang by building a Discovery Node for PublicTxt]] (pulled by the Agora)
๐Ÿ“œ File blog/2026/20261126-Learning Erlang by building a Discovery Node for PublicTxt.md by @jaysen โ˜† ๐Ÿ“Ž ๏ธ๐Ÿ”—

Why Erlang, why nowยง

PublicTxt v1 (personal storage and publishing) is now working for me day to day, through my Obsidian Plugins for PublicTxt and PublicTxt-Pages for publishing. Community aggregation has already started: the Obsidian-PublicTxt-Remotes Plugin pulls in content from subscribed repos on one machine, and community features in PublicTxt-Pages are coming along. The next step is a hosted aggregator that follows repos at scale.

That’s also my excuse to learn Erlang properly, not through toy exercises but through a project that needs what Erlang is good at: lots of small, independent, long-lived things that sometimes fail. I started PublicTxt in .NET because it was the tool at hand. The aggregator’s shape is very Erlang.

The problemยง

PublicTxt is a decentralised, Git-backed knowledge platform. Each person keeps their notes and bookmarks as plain Markdown in their own Git repo. CuratedCommons is the curation layer on top: social bookmarking across many repos.

The stack is free. But following hundreds or thousands of repos, keeping an index fresh and pushing updates to readers is work someone has to run. That’s where PublicTxt-Web comes in: a hosted service that aggregates, indexes and, potentially, offers convenient paid hosting, without locking anyone in.

The shape of the solutionยง

In Erlang, every followed repo gets its own process. Each one wakes on a timer, fetches, parses what changed and reports back. If a repo is broken, slow or gone, only its own process crashes, and a supervisor restarts it. Everything else carries on. In most stacks you’d hand-build that isolation; in Erlang it’s the default.

The pieces:

  • Followers, one per repo, under a supervisor that restarts them independently.
  • An index process: the only writer to a fast in-memory table. Readers query the table directly; only writes queue.
  • A committer that periodically snapshots the index into a public Git repo.
  • An API and feed layer for queries and live updates.

Lessons along the wayยง

A few ideas clicked while designing this:

  • Crashes stay local. Processes share no memory. Links tie fates together on purpose; monitors just let you watch. A room shouldn’t die because one user did.
  • Single writer beats locks. One process owning the index means updates are applied one at a time, so they can’t conflict. And because an in-memory table dies with its owner, you give it to a stable process, never a fragile one.
  • Duplicates are a key choice. Keying bookmarks on a hash of the normalised URL makes repeat updates harmless overwrites, and merging the same resource from many repos is exactly where shared tags start to emerge.
  • Mailboxes have no ceiling. If followers fire and forget, a busy index drowns. Making them wait for a reply caps each follower at one message in flight. That’s backpressure: slowness flows back to the producers.

The twist: the index as a discovery nodeยง

The in-memory index is for speed. But committing a snapshot to a public Git repo turns it into something more: a free, persistent discovery layer. Anyone can clone it and find PublicTxt repos without my server existing at all.

That makes each server just one node. Nodes can follow each other’s index repos and trust lists, and discovery spreads without a central registry.

Inclusion is opt-in, plus a list of already-public repos I trust. Public isn’t quite the same as consent to aggregation, so nodes should honour an opt-out flag and respect licences. Indexing links and tags is a lighter touch than republishing content.

The trust list itself lives in Git, so others can follow my curation, which makes it CuratedCommons for repos. To stop trust from sprawling, following is limited to a hop or two.

What’s nextยง

Theory’s done. The first piece of code is a single follower: one gen_server polling one repo on a timer. Small, but it’s the seed of the whole thing.

๐Ÿ“š Agora node [[obsidian plugins for publictxt]] (pulled by the Agora)
๐Ÿ“œ File community/publictext/wiki/publictxt/projects/obsidian-plugins/Obsidian Plugins for PublicTxt.md by @jaysen โ˜† ๐Ÿ“Ž ๏ธ๐Ÿ”—
๐Ÿ“œ File wiki/Projects/PublicTxt/Projects/PublicTxt-Obsidian/Obsidian Plugins for PublicTxt.md by @jaysen โ˜† ๐Ÿ“Ž ๏ธ๐Ÿ”—

community pluginsยง

my plugin projectsยง

๐Ÿ“š Agora node [[project publictxt]] (pulled by the Agora)
๐Ÿ“œ File wiki/Projects/PublicTxt/Project PublicTxt.md by @jaysen โ˜† ๐Ÿ“Ž ๏ธ๐Ÿ”—

see the repo here https://github.com/publictxt/publictext

Project PublicTxtยง

Overviewยง

PublicTxt is an experiment in using Git repositories as an interoperability layer and online storage for public and community knowledge. By leveraging free Git hosting services and plain text markdown files, it enables individuals and communities to share, curate, and collaborate on content without relying on centralized platforms or paid infrastructure.

The core idea is simple: Desktop and Web applications that sync between local and multiple Git repositories to store and share knowledge, subscribe to repositories and aggregate content from different sources, collaborate through user friendly abstractions over Git’s branching and merging workflows, and publish everything to the web using static site generation.

The experiment is in early stages. Links to software repositories for tooling that works with these plain-text repositories to follow.

Linked Repositoriesยง

  • PublicTxt-Pages Static-site generator with dynamic client-side layer - Python preprocessing, Hugo build, Pagefind search & JS faceted browse for PublicTxt/Obsidian repos.
    • Uses Hugo for static site generation
    • Pagefind for search - Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your usersโ€™ bandwidth as possible, and without hosting any infrastructure.
    • Python for pre-processing
  • WikiTool In-progress. Multiplatform .NET Tool for handling multiple wikis
    • Core Wiki Libraries
    • Converts between Wiki formats and Wiki-Syntax
    • Copy between wikis based on search, tag expressions (tag1 + tag2 - tag3), attributes.
    • see WikiTool
  • PublicTxt.net An in-progress .NET implementation with:
    • Core libraries, and feature based services
    • Git and Database Infrastructure projects
    • Avalonia Desktop & Blazor Web Apps
  • Obsidian Plugins for PublicTxt

Core Featuresยง

  • Zero Cost Online Storage and Web Hosting: Leverages free Git hosting (GitHub, GitLab, etc.) for all storage and distribution, and for static websites.
  • Static Website Generation: Simple publish to web flow requiring zero/minimal setup.
  • Plain text: Using Markdown for simple, flexible content creation and editing. Tags and more complex metadata is stored using plaintext syntax.
  • Compatibility Plaintext PublicTxt Syntax should be consistent with Obsidian and Obsidian DataView Plugin links and attributes
  • Desktop UI: Native applications that sync with Git repositories and pull repository data into local database for fast searching and browsing. User interfaces for content creation, organisation, discovery, search, aggregation, and community engagement.
  • User Friendly Git Operations: Desktop and web applications hide the complexity of Git operations
  • Selective Syncing with Multiple Repositories: The possibility to aggregate from and sync to multiple repos - with syncing rules per topic/repo/type.
  • Feature Rich UI Making all the other features easy to use, while storing as much data as possible in plaintext with PublicTxt Syntax, synced and transferred to database for use by applications.
  • Fluid Community Controls: Flexibility with public, semi-public, and private content settings.
  • Social Bookmarking and Annotation: A standard for storing MetaWeb (SideWiki like) data about web resources, using W3C Annotation standards.
  • GIT Topic Branches: Using different branches to allow following certain aspects of a repo. These use shared naming standards.

Use Casesยง

  • Personal and Community Knowledge Management: Maintain your own markdown-based knowledge base with version control
  • Community Wikis and Content Management: Collaborative knowledge bases maintained by multiple contributors
  • Social Bookmarking: Share and annotate web resources with commentary and discussion
  • Distributed Blogging: Publish blog posts that others can subscribe to and aggregate
  • Research Collaboration: Share research notes and findings with selective access control
  • Learning Communities: Build shared knowledge bases around specific topics or fields

Future Ideas/Possibilitiesยง

  • MetaWeb Commons Functionality: A browser extension that integrates Git repositories that contain discussion and notes about web pages with the web browsing experience.
  • ActivityPub: integration with the decentralized social networking protocol.
  • Immutable Public Records: Leveraging Git commits - possibly in combination with other forms of distributed ledgers - for transparent and reliable record-keeping.
  • Rich Semantic Syntax: Using RDF Semantic Edges and Weighted Attributes and Weighted Links/Edges
  • TerminusDb Backend: Use richly featured, collaboration focused, versioned Graph Database like TerminusDb to store the Knowledge Graph in memory for faster use of the graph in ecosystem applications
  • Consensus and Reputation Mechanisms: Empowering community-driven content management and peer review.

Directory Structureยง

The directory structure for a Public Text repository is as follows:

  • blog: Contains blog posts
    • year (eg 2023)
  • wiki: Contains wiki pages
  • notes: Contains notes
  • media: Contains media files
  • metaweb: Contains bookmarks, annotations and notes about web pages
    • sites: (eg www.example.com.md) folder containing all web pages with data for that site
    • bookmarks
    • notes
    • annotations
    • indexes: Contains indexes for web pages
    • tags: tag indexes for metaweb content
  • tags: Contains tag indexes for the entire repository
  • indexes: Contains indexes for the entire repository
  • community: Contains community content
    • discussion: Contains discussion threads
    • profiles: Contains user profiles
    • groups: Contains group profiles
    • settings: Contains settings files
    • indexes: Contains indexes for community content
    • tags: Contains tag indexes for community content
  • settings: Contains settings files

Licenseยง

Contributingยง

๐Ÿ“š Agora node [[publictxt]] (pulled by the Agora)
๐Ÿ“œ File community/publictext/wiki/publictxt/PublicTxt.md by @jaysen โ˜† ๐Ÿ“Ž ๏ธ๐Ÿ”—

PublicTxt overviewยง

PublicTxt is an experiment in using Git repositories as an interoperability layer and online storage for public and community knowledge. By using free Git hosting and plain-text Markdown, individuals and communities can share, curate and collaborate on content without a centralised platform or paid infrastructure.

Desktop and web tools sync between local working copies and one or more Git repositories, selectively aggregate content from other people’s repositories, and publish to the web with static site generation โ€” all on plain Markdown that outlives the tooling.

What it is, for nowยง

The differentiator is selective aggregation across many Git-hosted repositories: subscribing to other people’s PublicTxt repositories and pulling chosen subsets (by tag, path or filter) into a local aggregate view. Markdown in Git, published as a static site, is the substrate; aggregation is the value.

v1 success looks like:

I can keep my notes and writing in a Git repository, publish them to the web for free via GitHub Pages or similar, and pull selected pages from other people’s PublicTxt repos into a local aggregate view I can browse and search.

Community features, browser extensions, federation and graph-database backends may come later. They aren’t v1. See the roadmap.

Core ideasยง

  • Plain text first โ€” Markdown with standard [text](page.md) links, readable by any static-site host with no conversion. Tags are front matter tags: or inline #hashtags.
  • Zero-cost storage and hosting โ€” free Git hosting for storage, distribution and static sites.
  • Static website generation โ€” PublicTxt-Pages: push and you’re live, with full-text search and facets. See Publishing.
  • Selective aggregation โ€” pull chosen content from other repositories into a local aggregate. In progress: Obsidian PublicTxt Remotes follows repos and forks their pages.
  • Obsidian compatible โ€” a PublicTxt repository is an Obsidian vault. Obsidian PublicTxt Facets brings the site’s browsing into the editor.

Use casesยง

  • Personal knowledge management, with version control and free hosting
  • Distributed blogging others can subscribe to and aggregate
  • Research and learning: pull peers’ content into a local view
  • Lightweight community wikis, using Git’s own collaboration (pull requests, branches, forks)

Licence and contributingยง

GPLv3 โ€” see LICENSE. Contributing: CONTRIBUTING.md.