whatisgithub

What is pgpulse?

7vignesh/pgpulse — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

A multi-tenant backend service that tracks API traffic, errors, and latency per customer, with PostgreSQL row-level security isolating each tenant's analytics.

Mindmap

mindmap
  root((repo))
    What it does
      Ingests API events
      Serves analytics queries
      Isolates tenants by RLS
    Tech stack
      Node.js and Fastify
      TypeScript
      PostgreSQL 16
      PgBouncer and pg_cron
    Use cases
      Track error rates
      Measure latency percentiles
      Alert on thresholds
    Audience
      Backend developers
      DevOps teams
      SaaS builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Report every API request from a backend app to PgPulse and track error rates per endpoint.

USE CASE 2

Query latency percentiles like p50, p95, and p99 to find which endpoints are slow.

USE CASE 3

Create a tenant and API key so a multi-customer product can keep each customer's analytics isolated.

USE CASE 4

Set up alert rules that fire a webhook when a metric crosses a threshold.

What is it built with?

TypeScriptNode.jsFastifyPostgreSQLPgBouncerDocker

How does it compare?

7vignesh/pgpulse0xradioac7iv/tempfsabboskhonov/hermium
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity4/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Docker Compose to run Postgres, a read replica, and PgBouncer together before the API is usable.

No license information is provided in the README.

So what is it?

PgPulse is a backend service that tracks how well the API endpoints of an application are performing: how much traffic they get, how many requests fail, and how slow they are. It is described as similar in spirit to Datadog, New Relic, or Stripe's dashboards, but scoped specifically to API request analytics, and built to serve many separate customers at once with each one's data kept fully isolated using PostgreSQL's row level security. It does not watch traffic on its own. Instead, a backend application reports each request to PgPulse over an HTTP call, for example noting that a checkout endpoint returned a success status in 42 milliseconds. PgPulse stores these events and then answers questions about them, such as total request counts, error rates, the slowest endpoints, and latency percentiles over time. Each customer using PgPulse is called a tenant and gets an API key. That key both authenticates the reporting calls and scopes every analytics query to that tenant's own data. Reporting traffic (writes) goes to the primary database, while analytics queries (reads) are served from a separate read replica, so a heavy analytics dashboard never slows down the ingestion of new events. There is no built in user interface. Everything happens over HTTP, so a team would build their own dashboard or script on top of it, or use the included curl examples directly. Using it in an existing app takes three steps: create a tenant to get an API key, add a small piece of code to the backend that reports each request after it finishes (with a batch endpoint available for high traffic setups), and then query the analytics endpoints for insight whenever needed. The README is explicit that the API key is a server side secret and should never be placed in browser code. Under the hood it is built with Node.js, the Fastify web framework, and TypeScript, backed by PostgreSQL 16 using partitioned tables, various index types, and a materialized view refreshed on a schedule by pg_cron. Connection pooling is handled by PgBouncer, and alerting is done with in-database threshold checks that deliver webhooks rather than a separate message queue. The project ships with a Docker Compose setup that starts the primary database, a replica, PgBouncer, a migration step, and the app itself, along with a health endpoint reporting pool and replication status.

Copy-paste prompts

Prompt 1
Write the Express middleware needed to report every request from my Node app to PgPulse's /v1/events endpoint, based on this repo's README example.
Prompt 2
Using this repo's API table, list the calls I'd need to create a tenant, ingest a batch of events, and fetch the error breakdown.
Prompt 3
Explain how this repo keeps each tenant's data isolated using PostgreSQL row-level security.
Prompt 4
Adapt the batch ingestion example in this repo's README so events are buffered client-side and sent every 5 seconds.

Frequently asked questions

What is pgpulse?

A multi-tenant backend service that tracks API traffic, errors, and latency per customer, with PostgreSQL row-level security isolating each tenant's analytics.

What language is pgpulse written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Fastify.

What license does pgpulse use?

No license information is provided in the README.

How hard is pgpulse to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pgpulse for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.