Patchgrid
Multi-tenant IT service management, built the way a production SaaS has to be.
Incidents, service requests, problems and changes for IT and security teams. Every company gets its own subdomain, and its data is isolated by the database itself.
Tour · Run it · Architecture · Engineering · Documentation · Decisions

Every screenshot is generated from the seeded demo and follows your GitHub theme: switch it between light and dark to see the other.
Why Patchgrid
Patchgrid is a ticketing and operations platform for internal IT desks: a scoped-down Freshservice or Jira Service Management. It is a portfolio project, built as if it were going to production. It has three deployables, a tenant per subdomain, and isolation enforced by the schema, the application and Postgres row-level security. Every significant design choice has a written decision record.
Three ideas run through the whole system:
An incident is not a change. Four ITIL record types, each with its own lifecycle, rather than one generic "ticket" with a status dropdown.
Nobody types a priority. Priority is computed from impact × urgency, and the SLA deadlines follow from it. A client that sends a priority gets a
400.Isolation is a property of the schema, not a habit. A reference from one tenant's data to another's cannot be written down, and the application's database role cannot bypass row-level security.
| Record types | Incident · Service request · Problem · Change, each with its own state machine |
| Deployables | Marketing site (Next.js) · Tenant workspace (Next.js) · API and workers (NestJS) |
| Isolation | Five layers, from composite foreign keys to FORCE ROW LEVEL SECURITY, gated by a dedicated suite |
| Authorization | Four cumulative roles, team leads as a scoped capability, a 400-test authorization suite in CI |
| Tests | 2,300+ automated: unit, integration on real Postgres and Redis, tenancy, authorization, browser |
| Deployment | A production rehearsal on emulated AWS (ECS, ALB, RDS, ElastiCache, S3, SES), deployed from nothing in CI |
A tour of the product
Forty screens across the five ways people use Patchgrid: as an agent, as a requester, as a workspace
owner, as someone who belongs to two companies, and as one of Patchgrid's own operators. All of it is the
seeded demo you get from pnpm local:up, and none of it is mocked.
The service desk
An agent's day: queues that count down, four record types with four lifecycles, and changes that need a second pair of eyes.
![]() Bulk actions Up to two hundred tickets at once. Each is authorized on its own, and the result is reported per ticket. |
![]() Awaiting my approval A team lead's queue of changes to decide. A change's author is never offered its approval. |
![]() A problem Root cause, workaround and a known-error state, linked to the incidents it explains. |
![]() A change A plan, a window, a risk and a rollback, decided by someone other than whoever wrote it. |
![]() An incident, as the agent sees it Only the transitions its state allows are offered. The internal note is set visibly apart. |
![]() The same incident, as the requester sees it The reply is there. The internal note is not, because the API never sent it. |
The requester's side
People who raise tickets get a portal, not a console, and can raise them by email just as well.
![]() The portal Everything a requester raised, on the web or by mail, with the priority computed for them. |
![]() Raising a ticket There is no priority field. Impact and urgency decide it, and matching articles are suggested while typing. |
![]() Notification mail Sent at least once from a transactional outbox. A reply above the line threads onto the ticket. |
![]() Inbound mail Mail to the workspace's address becomes a ticket only if the sender passes DMARC. Each message says what became of it. |
Knowledge and assets
The context a ticket needs, in the same workspace and under the same isolation.
![]() The knowledge base Published answers, internal runbooks and drafts, with every edit versioned. |
![]() An article Requesters see published articles only; the server decides, never the page. |
![]() The asset register Laptops to licences: who holds what, its state and its warranty. |
![]() An asset With every ticket that has been about it. |
Running a workspace
Everything an owner configures, under Settings. An agent who opens one gets “Nothing here”.
![]() Reports SLA compliance, median and p90 time to resolve, backlog by age, CSV export. Read from a reporting model of their own. |
![]() SLA targets Response and resolution targets per priority, running 24×7 and paused while waiting on the requester. |
![]() Members Invitations and roles. A role lives on the membership, never on the user. |
![]() Teams An agent can be in several teams. Team lead is a scoped capability, not a role. |
![]() Categories A taxonomy that routes tickets to a team, with names unique per parent. |
![]() Workspace settings Agent visibility, external requesters, and the workspace's address. |
![]() The audit log Every change, written in the same transaction as the change itself. |
![]() Event delivery Notifications, webhooks and reports each read the event log. An event that keeps failing is parked here to replay. |
![]() API tokens Each token is its own service account, and its scopes can never exceed its role. |
![]() A webhook Standard Webhooks signatures, retries with backoff, a circuit breaker and a replayable delivery log. |
![]() Single sign-on Prove the email domain over DNS, then connect the workspace's own OpenID Connect provider. |
![]() Support access Operators get in only when an owner grants it: read-only, time-boxed and in the customer's audit log. |
Identity, tenancy and the platform
One person can belong to many companies. Each workspace is its own tenant, and the operators who run Patchgrid see none of their content.


























