Margin is an open annotation layer for the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
111
fork

Configure Feed

Select the types of activity you want to include in your feed.

JavaScript 46.3%
Go 35.6%
CSS 14.2%
HTML 3.8%
Dockerfile 0.1%
19 3 31

Clone this repository

https://tangled.org/margin.at/margin https://tangled.org/did:plc:rjqn3agdb74cszhqcpii4sne/margin
git@tangled.org:margin.at/margin git@tangled.org:did:plc:rjqn3agdb74cszhqcpii4sne/margin

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Margin#

Write in the margins of the web

A web comments layer built on AT Protocol that lets you annotate any URL on the internet.

Project Structure#

margin/
├── lexicons/           # AT Protocol lexicon schemas
│   └── at/margin/
│       ├── annotation.json
│       ├── bookmark.json
│       ├── collection.json
│       └── collectionItem.json
│       └── highlight.json
│       └── like.json
│       └── reply.json
├── backend/            # Go API server
│   ├── cmd/server/
│   └── internal/
├── web/                # React web app
│   └── src/
└── extension/          # Browser extension
    ├── popup/
    ├── content/
    └── background/

Getting Started#

Backend#

cd backend
go mod tidy
go run ./cmd/server

Server runs on http://localhost:8080

Run the full stack (Backend + Postgres) with Docker:

docker compose up -d --build

Web App#

cd web
npm install
npm run dev

App runs on http://localhost:3000

Browser Extension#

Chrome#

  1. Open Chrome → chrome://extensions
  2. Enable "Developer mode"
  3. Click "Load unpacked"
  4. Select the extension/ folder

Firefox#

  1. Open Firefox → about:debugging
  2. Click "This Firefox"
  3. Click "Load Temporary Add-on"
  4. Select the manifest.firefox.json file in the extension/ folder

Domain#

Domain: margin.at
Lexicon Namespace: at.margin.*

Tech Stack#

  • Backend: Go + Chi + SQLite / PostgreSQL
  • Frontend: React 18 + Vite
  • Extension: Manifest v3
  • Protocol: AT Protocol (Bluesky)

License#

MIT