Explore the margin.at codebase, lexicons, and more! margin.at
JavaScript 46.7%
Go 35.0%
CSS 14.1%
HTML 4.0%
Dockerfile 0.1%
11 1 2

Clone this repository

https://tangled.org/margin.at/margin
git@tangled.org:margin.at/margin

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

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