πŸ“œ Contributions by @ at [[publictxt]]
Agora nodes contain community contributions with titles or topics that match your search. x

Loading pushes...

πŸ“š 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Β§