···11+# ATProto Golinks Worker
22+33+A [golinks](https://golinks.io) server running on Cloudflare Workers, backed by [ATProto](https://atproto.com). Manage your links at [atpr.to](https://atpr.to), and this worker serves them as short redirects from your own domain.
44+55+## How it works
66+77+- Requests to `yourdomain.com/slug` redirect to the URL stored in your ATProto PDS
88+- Links are cached in a Durable Object for fast lookups and synced in the background
99+- The homepage at `yourdomain.com/` shows your site name
1010+1111+## Setup
1212+1313+### 1. Install dependencies
1414+1515+```sh
1616+npm install
1717+```
1818+1919+### 2. Configure
2020+2121+Edit `wrangler.toml` and fill in the `[vars]` section:
2222+2323+| Variable | Description | Example |
2424+|---|---|---|
2525+| `DID` | Your AT Protocol DID | `did:plc:abc123...` |
2626+| `PDS` | Your PDS URL | `https://bsky.social` |
2727+| `SITE_NAME` | Name shown on homepage | `go.example.com` |
2828+| `COLLECTION` | Link collection lexicon (usually leave as default) | `to.atpr.link` |
2929+3030+To find your DID: look up your handle at [web.plc.directory](https://web.plc.directory).
3131+3232+### 3. Create your links
3333+3434+Head to [atpr.to](https://atpr.to) to create and manage your golinks.
3535+3636+### 4. Deploy
3737+3838+```sh
3939+npm run deploy
4040+```
4141+4242+### 5. Add a custom domain (optional)
4343+4444+In the Cloudflare dashboard, go to your Worker's settings and add a Custom Domain (e.g. `go.example.com`).
4545+4646+## Development
4747+4848+```sh
4949+npm run dev
5050+```
5151+5252+## License
5353+5454+MIT