tangled
alpha
login
or
join now
stevedylan.dev
/
docs.surf
A fullstack app for indexing standard.site documents
2
fork
atom
overview
issues
pulls
pipelines
chore: updated readme
stevedylan.dev
3 weeks ago
2f1a56d7
152f49a3
-56
1 changed file
expand all
collapse all
unified
split
README.md
-56
README.md
···
4
4
5
5
A monorepo for indexing and displaying [Standard.site](https://standard.site) documents from the AT Protocol, powered by Cloudflare Workers, D1, and Queues.
6
6
7
7
-
## Architecture
8
8
-
9
9
-
```
10
10
-
┌─────────────────────────────────────────────────────────────┐
11
11
-
│ Cloudflare │
12
12
-
├─────────────────────────────────────────────────────────────┤
13
13
-
│ │
14
14
-
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │
15
15
-
│ │ Pages │────▶│ Worker │────▶│ D1 │ │
16
16
-
│ │ (Client) │ │ (API) │ │ (Database) │ │
17
17
-
│ └──────────────┘ └──────────────┘ └─────────────┘ │
18
18
-
│ ▲ ▲ │
19
19
-
│ │ │ │
20
20
-
│ ┌──────┴───────┐ ┌──────┴───────┐ │
21
21
-
│ │ Queue │ │ Cron │ │
22
22
-
│ │ (Resolver) │ │ (Refresh) │ │
23
23
-
│ └──────┬───────┘ └──────────────┘ │
24
24
-
│ │ │
25
25
-
└──────────────────────────────┼──────────────────────────────┘
26
26
-
│ POST /webhook/tap
27
27
-
┌──────────┴───────────┐
28
28
-
│ Tap Instance │
29
29
-
│ (External) │
30
30
-
└──────────────────────┘
31
31
-
```
32
32
-
33
7
**Components:**
34
8
35
9
1. **Tap Indexer** (External) - Subscribes to the AT Protocol firehose and sends webhook events
···
53
27
```
54
28
55
29
The client will run on `http://localhost:5173`.
56
56
-
57
57
-
## API Endpoints
58
58
-
59
59
-
### Health & Stats
60
60
-
61
61
-
| Endpoint | Method | Description |
62
62
-
|----------|--------|-------------|
63
63
-
| `/health` | GET | Health check |
64
64
-
| `/stats` | GET | Database statistics |
65
65
-
66
66
-
### Feed Endpoints
67
67
-
68
68
-
| Endpoint | Method | Description |
69
69
-
|----------|--------|-------------|
70
70
-
| `/feed` | GET | Pre-resolved documents (fast) |
71
71
-
| `/feed-raw` | GET | Raw record references (for client-side resolution) |
72
72
-
| `/records/:did` | GET | Records by DID |
73
73
-
74
74
-
### Webhook
75
75
-
76
76
-
| Endpoint | Method | Description |
77
77
-
|----------|--------|-------------|
78
78
-
| `/webhook/tap` | POST | Receives events from tap |
79
79
-
| `/webhook/tap/debug` | POST | Debug endpoint (echoes payload) |
80
80
-
81
81
-
### Admin
82
82
-
83
83
-
| Endpoint | Method | Description |
84
84
-
|----------|--------|-------------|
85
85
-
| `/admin/resolve-all` | POST | Queue unresolved records for processing |
86
30
87
31
## How It Works
88
32