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
Docker (Recommended)#
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#
- Open Chrome →
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extension/folder
Firefox#
- Open Firefox →
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on"
- Select the
manifest.firefox.jsonfile in theextension/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