How prajexec/hookforge works
HookForge is a webhook platform: users manage tenant-scoped projects and endpoints, ingest events, then inspect and control asynchronous signed deliveries. The map includes the dashboard, API domain routes, durable PostgreSQL state, worker dispatch and retry, security, and the mock receiver. README-described capabilities are retained where the tree supports them; source excerpts are partial, so some subsystem links are documented rather than verified in sampled implementation.
Main entry points: app.ts Fastify API · store.ts Domain persistence · endpoints.ts Endpoint lifecycle · delivery.ts Delivery execution
Components 30
Dashboard
- Dashboard
apps/web/src/Dashboard.tsx - Endpoint controls
apps/web/src/EndpointsPanel.tsx - Sandbox panel
apps/web/src/SandboxPanel.tsx - API client
apps/web/src/api.ts
API and domain
- Fastify API
apps/api/src/app.ts - Authentication
apps/api/src/routes/auth.ts - Project management
apps/api/src/routes/projects.ts - Endpoint lifecycle
apps/api/src/routes/endpoints.ts - Event ingestion
apps/api/src/routes/events.ts - Delivery operations
apps/api/src/routes/deliveries.ts - Alert routing
apps/api/src/routes/alerts.ts - Sandbox API
apps/api/src/routes/sandbox.ts
Security
- Secret cryptography
apps/api/src/security/crypto.ts - Envelope encryption
apps/api/src/security/envelope.ts - URL validation
apps/api/src/security/url.ts
Delivery worker
- Worker loop
apps/worker/src/worker.ts - Delivery execution
apps/worker/src/delivery.ts - Leases and attempts
apps/worker/src/delivery-store.ts - Pinned networking
apps/worker/src/network.ts - HTTP client
apps/worker/src/http-client.ts - Retry policy
apps/worker/src/retry.ts
State and operations
- Domain persistence
apps/api/src/store.ts - Rate limiting
apps/api/src/rate-limit.ts - Metrics and telemetry
apps/api/src/metrics.ts - Mock receiver
apps/mock-receiver/src/server.ts - Captured requests
apps/mock-receiver/src/store.ts
Other components
- Platform user
- PostgreSQL
- Redis
- Vault Transit
Connections 39
- Platform user → Dashboard: uses
- Dashboard → API client: requests
apps/web/src/Dashboard.tsx - Endpoint controls → API client: requests
apps/web/src/EndpointsPanel.tsx - Sandbox panel → API client: requests
apps/web/src/SandboxPanel.tsx - API client → Fastify API: calls API
apps/web/src/api.ts - Fastify API → Authentication: registers
apps/api/src/app.ts - Fastify API → Project management: registers
apps/api/src/app.ts - Fastify API → Endpoint lifecycle: registers
apps/api/src/app.ts - Fastify API → Event ingestion: registers
apps/api/src/app.ts - Fastify API → Delivery operations: registers
apps/api/src/app.ts - Fastify API → Alert routing: registers
apps/api/src/app.ts - Fastify API → Sandbox API: registers
apps/api/src/app.ts - Authentication → Domain persistence: reads and writes
apps/api/src/routes/auth.ts - Authentication → Secret cryptography: hashes credentials
apps/api/src/routes/auth.ts - Authentication → Rate limiting: enforces limits
apps/api/src/routes/auth.ts - Project management → Domain persistence: manages projects
- Endpoint lifecycle → Domain persistence: manages endpoints
apps/api/src/routes/endpoints.ts - Endpoint lifecycle → Secret cryptography: creates secrets
apps/api/src/routes/endpoints.ts - Endpoint lifecycle → Envelope encryption: encrypts secrets
apps/api/src/routes/endpoints.ts - Endpoint lifecycle → URL validation: validates URLs
apps/api/src/routes/endpoints.ts - Event ingestion → Domain persistence: persists events
apps/api/src/routes/events.ts - Event ingestion → Rate limiting: enforces limits
apps/api/src/routes/events.ts - Delivery operations → Domain persistence: inspects and controls
apps/api/src/routes/deliveries.ts - Alert routing → Domain persistence: routes alerts
- Sandbox API → Domain persistence: manages sandbox
apps/api/src/routes/sandbox.ts - Sandbox API → Secret cryptography: creates secrets
apps/api/src/routes/sandbox.ts - Domain persistence → PostgreSQL: stores domain data
- Rate limiting → Redis: stores quotas
- Endpoint lifecycle → Vault Transit: wraps data keys
- Worker loop → Leases and attempts: claims and records
apps/worker/src/worker.ts - Worker loop → Delivery execution: dispatches jobs
apps/worker/src/worker.ts - Worker loop → Retry policy: schedules retries
apps/worker/src/worker.ts - Delivery execution → Pinned networking: resolves target
apps/worker/src/delivery.ts - Delivery execution → HTTP client: sends request
apps/worker/src/delivery.ts - Delivery execution → Retry policy: classifies failures
apps/worker/src/delivery.ts - Leases and attempts → PostgreSQL: leases and records
- Delivery execution → Mock receiver: delivers webhook
- Mock receiver → Captured requests: captures requests
apps/mock-receiver/src/server.ts - Captured requests → Platform user: shows captured requests