A community based topic aggregation platform built on atproto

feat: Add did:web configuration for verification signing

Add DID document and environment configuration:
- did:web:coves.social for cryptographic signing
- P-256 EC keypair for ECDSA signatures
- Configurable for self-hosted instances

Third-party apps fetch public key from /.well-known/did.json
to verify verification signatures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Changed files
+81
.well-known
+46
.env.example
···
+
# Coves Environment Configuration
+
# Copy this file to .env and update values for your deployment
+
+
# === Database Configuration ===
+
DATABASE_URL=postgres://dev_user:dev_password@localhost:5433/coves_dev?sslmode=disable
+
+
# === PDS Configuration ===
+
PDS_URL=http://localhost:3001
+
+
# === Server Configuration ===
+
APPVIEW_PORT=8081
+
API_BASE_URL=https://api.coves.social
+
+
# === Identity Resolution ===
+
IDENTITY_PLC_URL=https://plc.directory
+
IDENTITY_CACHE_TTL=1h
+
+
# === Jetstream Configuration ===
+
JETSTREAM_URL=wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.actor.profile
+
JETSTREAM_PDS_FILTER= # Optional: filter to specific PDS
+
+
# === OAuth Configuration ===
+
OAUTH_COOKIE_SECRET= # Base64-encoded 32-byte secret (generate with: openssl rand -base64 32)
+
OAUTH_PRIVATE_JWK= # Private JWK for signing OAuth tokens (generate with: cmd/genjwks)
+
+
# === Verification Service (DID Configuration) ===
+
# DID for signing phone verifications (e.g., did:web:coves.social)
+
VERIFICATION_SERVICE_DID=did:web:coves.social
+
+
# Private key for signing verifications (PEM format, P-256 EC key)
+
# Generate with: openssl ecparam -name prime256v1 -genkey -noout
+
VERIFICATION_PRIVATE_KEY= # Base64-encoded PEM or plain PEM
+
+
# === SMS Provider (Telnyx) ===
+
TELNYX_API_KEY= # Your Telnyx API key
+
TELNYX_MESSAGING_PROFILE_ID= # Your Telnyx messaging profile ID
+
TELNYX_FROM_NUMBER= # Phone number to send SMS from (E.164 format)
+
+
# === Security Configuration ===
+
# Secret pepper for hashing phone numbers (generate with: openssl rand -base64 32)
+
PHONE_HASH_PEPPER= # NEVER change this after initial setup!
+
+
# === Rate Limiting ===
+
# Phone verification rate limits
+
PHONE_VERIFICATION_RATE_LIMIT_PER_PHONE=3 # Max requests per phone per hour
+
PHONE_VERIFICATION_RATE_LIMIT_PER_DID=5 # Max requests per user per day
+35
.well-known/did.json
···
+
{
+
"@context": [
+
"https://www.w3.org/ns/did/v1",
+
"https://w3id.org/security/suites/jws-2020/v1"
+
],
+
"id": "did:web:coves.social",
+
"verificationMethod": [
+
{
+
"id": "did:web:coves.social#verification-key-1",
+
"type": "JsonWebKey2020",
+
"controller": "did:web:coves.social",
+
"publicKeyJwk": {
+
"kty": "EC",
+
"crv": "P-256",
+
"x": "REPLACE_WITH_ACTUAL_X_COORDINATE",
+
"y": "REPLACE_WITH_ACTUAL_Y_COORDINATE",
+
"use": "sig",
+
"alg": "ES256"
+
}
+
}
+
],
+
"authentication": [
+
"did:web:coves.social#verification-key-1"
+
],
+
"assertionMethod": [
+
"did:web:coves.social#verification-key-1"
+
],
+
"service": [
+
{
+
"id": "did:web:coves.social#verification-service",
+
"type": "VerificationService",
+
"serviceEndpoint": "https://api.coves.social/xrpc/social.coves.verification"
+
}
+
]
+
}