1# Margin
2
3*Write in the margins of the web*
4
5A web comments layer built on [AT Protocol](https://atproto.com) that lets you annotate any URL on the internet.
6
7## Project Structure
8
9```
10margin/
11├── lexicons/ # AT Protocol lexicon schemas
12│ └── at/margin/
13│ ├── annotation.json
14│ ├── bookmark.json
15│ ├── collection.json
16│ └── collectionItem.json
17│ └── highlight.json
18│ └── like.json
19│ └── reply.json
20├── backend/ # Go API server
21│ ├── cmd/server/
22│ └── internal/
23├── web/ # React web app
24│ └── src/
25└── extension/ # Browser extension
26 ├── popup/
27 ├── content/
28 └── background/
29```
30
31## Getting Started
32
33### Backend
34
35```bash
36cd backend
37go mod tidy
38go run ./cmd/server
39```
40
41Server runs on http://localhost:8080
42
43### Docker (Recommended)
44
45Run the full stack (Backend + Postgres) with Docker:
46
47```bash
48docker compose up -d --build
49```
50
51### Web App
52
53```bash
54cd web
55npm install
56npm run dev
57```
58
59App runs on http://localhost:3000
60
61### Browser Extension
62
63#### Chrome
64
651. Open Chrome → `chrome://extensions`
662. Enable "Developer mode"
673. Click "Load unpacked"
684. Select the `extension/` folder
69
70#### Firefox
71
721. Open Firefox → `about:debugging`
732. Click "This Firefox"
743. Click "Load Temporary Add-on"
754. Select the `manifest.firefox.json` file in the `extension/` folder
76
77## Domain
78
79**Domain**: `margin.at`
80**Lexicon Namespace**: `at.margin.*`
81
82## Tech Stack
83
84- **Backend**: Go + Chi + SQLite / PostgreSQL
85- **Frontend**: React 18 + Vite
86- **Extension**: Manifest v3
87- **Protocol**: AT Protocol (Bluesky)
88
89## License
90
91MIT