How thisshonrobert/zapier works
Zapier-style workflow automation: users configure Zaps, external triggers create runs, and a queued worker executes ordered actions. The monorepo also includes a separate, read-only AI triage preview and backend investigation/replay capabilities. The main execution links are documented in the README; triage service wiring is supported by the sampled backend entry point and source index. Other unsampled implementation details are represented only where the tree or documentation supports them.
Main entry points: triage.ts Triage API routes · db.ts PostgreSQL · worker/index.ts Stage consumer · primary_backend/index.ts Primary API
Components 25
Dashboard and builder
- Dashboard and builder
apps/frontend/src/app - Triage screens
apps/frontend/src/app/triage/page.tsx
Zap execution
- Primary API
apps/primary_backend/index.ts - Zap CRUD routes
apps/primary_backend/route/zap.ts - Trigger routes
apps/primary_backend/route/trigger.ts - Webhook ingress
apps/webhook/index.ts - Outbox processor
apps/processor/index.ts - Stage consumer
apps/worker/index.ts - Stage orchestration
apps/worker/orchestration.ts - Execution state
apps/worker/execution-store.ts - Action handlers
apps/worker/actions/index.ts
Triage and recovery
- Triage API routes
apps/primary_backend/route/triage.ts - Evidence service
apps/primary_backend/services/triage-evidence.ts - Operator service
apps/primary_backend/services/triage-operator.ts - Investigation services
apps/primary_backend/services/investigation-authority.ts - Proposal services
apps/primary_backend/services/investigation-proposals.ts - Replay service
apps/primary_backend/services/replay.ts - AI agent client
apps/primary_backend/services/triage-agent.ts - Triage graph
apps/ai_agent/src/graph.ts - Runbook retrieval
apps/ai_agent/src/tools/search-runbooks.ts
Shared data
- Run outbox
- Kafka events
- PostgreSQL
packages/db/prisma/db.ts
Other components
- User
- Trigger source
Connections 30
- User → Dashboard and builder: configures Zaps
- Dashboard and builder → Primary API: creates workflows
- Primary API → Zap CRUD routes: routes requests
apps/primary_backend/index.ts - Primary API → Trigger routes: routes requests
apps/primary_backend/index.ts - Zap CRUD routes → PostgreSQL: reads and writes
- Trigger routes → PostgreSQL: reads and writes
- Trigger source → Webhook ingress: fires trigger
- Webhook ingress → PostgreSQL: creates run and outbox
apps/webhook/index.ts - PostgreSQL → Outbox processor: supplies outbox rows
apps/processor/index.ts - Outbox processor → Kafka events: publishes events
- Kafka events → Stage consumer: delivers events
- Stage consumer → Stage orchestration: executes stages
apps/worker/index.ts - Stage consumer → Execution state: creates and uses
apps/worker/index.ts - Stage consumer → Action handlers: selects handler
apps/worker/index.ts - Stage orchestration → Execution state: claims and finalizes
apps/worker/orchestration.ts - Stage consumer → PostgreSQL: loads Zap actions
apps/worker/index.ts - Action handlers → PostgreSQL: executes configured action
- Primary API → Triage API routes: mounts routes
apps/primary_backend/index.ts - Triage API routes → Evidence service: requests evidence
apps/primary_backend/route/triage.ts - Triage API routes → Operator service: requests operator cases
apps/primary_backend/index.ts - Triage API routes → Investigation services: authorizes decisions
apps/primary_backend/index.ts - Triage API routes → Proposal services: creates proposals
apps/primary_backend/index.ts - Triage API routes → Replay service: requests replay
apps/primary_backend/index.ts - Triage API routes → AI agent client: requests agent operations
apps/primary_backend/route/triage.ts - AI agent client → Triage graph: calls preview service
- Triage graph → Runbook retrieval: retrieves runbooks
apps/ai_agent/src/graph.ts - Triage screens → Triage API routes: views triage
- Evidence service → PostgreSQL: queries evidence
apps/primary_backend/services/triage-evidence.ts - Investigation services → PostgreSQL: checks authority
apps/primary_backend/services/investigation-authority.ts - Replay service → PostgreSQL: records replay state
apps/primary_backend/services/replay.ts