Skip to content

Developer architecture overview

Pullminder is a Turborepo pnpm monorepo with five apps:

App Stack Purpose
api Go, chi router REST API and webhook handler
dashboard React, Vite, TanStack Router/Query, Tailwind CSS Web UI for teams
cli Go, Cobra Offline analysis and platform commands
marketing Astro Public website at pullminder.com
docs Astro Starlight Documentation site

The API server is a single Go binary built around the chi router. Business logic lives in internal/ packages:

Package Responsibility
api HTTP handlers and middleware
auth GitHub OAuth, sessions, CSRF
billing Subscription management
config Environment and feature flags
crypto Field encryption, HMAC signing
evaluation Rule engine, risk scoring
github GitHub API client, webhook parsing
notify Email and Slack notifications
observe Logging, tracing, metrics
queue Task definitions and handlers
registry Rule pack fetching and caching
risk Risk model and score calculation
session Session store (PostgreSQL-backed)
store Database queries

PostgreSQL is the primary data store. The schema is managed through sequential migrations that run automatically when the API server starts. All queries use the database driver directly – there is no ORM.

Redis powers the task queue. Four task types flow through the queue:

Task Description
analyze_pr Fetch diff, run analyzers, post results
send_notification Deliver email or Slack message
fetch_coverage Pull coverage data from CI provider
baseline_scan Full-repo scan on initial install

The dashboard is a React SPA using TanStack Router for file-based routing and TanStack Query for server state. Styling uses Tailwind CSS. Charts are rendered with Recharts.

The CLI is a standalone Go binary built with Cobra. It runs the same analyzers as the platform but operates entirely offline against local diffs. Platform commands (sync, login) connect to the API.

The API and worker run as Docker containers. The dashboard, marketing site, and docs deploy to Cloudflare Pages with automatic builds from the main branch.

  • Logging – structured JSON via slog
  • Error tracking – Sentry-compatible service
  • Tracing – OpenTelemetry
  • Metrics – Prometheus endpoint (internal, token-authenticated)
  • Field encryption – with rotatable keys for sensitive data at rest
  • Badge signing – cryptographic signing to prevent badge URL tampering
  • CSRF – double-submit cookie pattern
  • Sessions – HttpOnly, Secure, SameSite cookies backed by PostgreSQL
  1. A pull request is opened or updated on GitHub.
  2. GitHub sends a webhook to the API server.
  3. The API validates the webhook signature, persists the event, and enqueues an analyze_pr task.
  4. The worker picks up the task, fetches the diff from GitHub, runs it through the rule engine, calculates a risk score, and stores the results.
  5. The worker posts a comment on the PR and sets a commit status check.
  6. The dashboard queries the API (backed by PostgreSQL) to display results to the team.