Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clarify webhook docs

+40 -6
+34
apps/webhook-service/Dockerfile
··· 1 + # Build from monorepo root: docker build -f apps/webhook-service/Dockerfile . 2 + 3 + # Stage 1: Install dependencies and compile binary 4 + FROM oven/bun:1-alpine AS builder 5 + 6 + WORKDIR /app 7 + 8 + # Copy workspace configuration files 9 + COPY package.json bun.lock tsconfig.json ./ 10 + 11 + # Copy all workspace packages (needed for workspace: dependencies) 12 + COPY packages ./packages 13 + COPY apps/webhook-service ./apps/webhook-service 14 + COPY apps/main-app/package.json ./apps/main-app/package.json 15 + COPY apps/hosting-service/package.json ./apps/hosting-service/package.json 16 + COPY apps/firehose-service/package.json ./apps/firehose-service/package.json 17 + COPY cli/package.json ./cli/package.json 18 + 19 + # Install dependencies 20 + RUN bun install --frozen-lockfile 21 + 22 + # Compile to a single binary 23 + RUN bun build --compile --minify apps/webhook-service/src/index.ts --outfile /app/webhook 24 + 25 + # Stage 2: Minimal runtime 26 + FROM alpine:3.22 27 + 28 + RUN apk add --no-cache libstdc++ libgcc 29 + 30 + COPY --from=builder /app/webhook /usr/local/bin/webhook 31 + 32 + ENV NODE_ENV=production 33 + 34 + CMD ["webhook"]
+6 -6
docs/src/content/docs/lexicons/place-wisp-wh.md
··· 5 5 6 6 Webhooks let you receive HTTP POST notifications when AT Protocol records are created, updated, or deleted. They're scoped to an AT-URI — you can watch a specific record, an entire collection, or everything from a DID. 7 7 8 - Webhooks are stored as `place.wisp.v2.wh` records in your AT Protocol repository. The webhook service watches the firehose and delivers payloads to your URL. 8 + Webhooks are stored as `place.wisp.v2.wh` records in your AT Protocol repository. The webhook service watches the firehose for `place.wisp.v2.wh` record changes, reads the full record back from your PDS (read-after-write), then begins delivering matching events to your URL. 9 9 10 10 ## Creating a Webhook 11 11 12 - Create and manage webhooks from the **Webhooks** tab in the editor, or via the [REST API](#rest-api). 12 + Create a webhook by writing a `place.wisp.v2.wh` record to your PDS, or by using the **Webhooks** tab in the editor. The record schema is [below](#record-schema). 13 13 14 14 **Scope** controls what you're watching: 15 15 ··· 91 91 } 92 92 ``` 93 93 94 - ## REST API 94 + ## API Convenience Routes 95 95 96 - Webhooks can also be managed via the main app API. All routes require the signed `did` cookie. 96 + The main app exposes API routes that wrap PDS record operations. All routes require the signed `did` cookie. 97 97 98 98 ### `GET /api/webhook` 99 99 ··· 101 101 102 102 ### `POST /api/webhook` 103 103 104 - Creates a new webhook. Body matches the `place.wisp.v2.wh` record shape. 104 + Creates a new webhook record. Body matches the `place.wisp.v2.wh` record shape. 105 105 106 106 ### `DELETE /api/webhook/:rkey` 107 107 108 - Deletes a webhook by its record key. 108 + Deletes a webhook record by its record key. 109 109 110 110 ### `GET /api/webhook/events` 111 111