Skip to content

Roles · BFF

Ops dashboard

The browser never holds the keys

An ops team had outgrown a shared spreadsheet: conflicting edits, no audit trail, everyone could see everything, and numbers were refreshed by hand from billing, ops, and logs. Rebuilt as a Next.js app. Roles come from the server session. A backend-for-frontend is the only thing that talks to those three systems.

  • TypeScript
  • Next.js
  • React Query
  • PostgreSQL
  • Tailwind

VIEWS

Server-rendered reads; client for filters and tables

ACCESS

Role from the server session, not a hidden check

GATEWAY

BFF in front of billing, ops, and logs

HANDOFF

Audit log, components scoped to this dashboard

01The problem

The ops team ran on a spreadsheet and a few scripts. That held while it was two people. Past that, edits collided, nothing recorded who changed a row, and everyone could see everything. A spreadsheet has no permissions model.

The numbers in it came from billing, an ops system, and logs. Someone refreshed them by hand. The team needed an application they could maintain themselves, not a rebuild sized for a platform group.

02What we designed

A Next.js app. The pages people stare at all day render on the server. Filtering and live tables are the parts that run in the browser.

The role comes from the server session. A view the session does not allow is not rendered. Hiding a link in the client is not the check.

A backend-for-frontend sits between the browser and the three internal systems. It holds their credentials. Pagination and auth quirks get normalized there, once, and the browser sees one response shape.

Client state is whatever the server just returned. React Query holds that. There is no second store. The components cover this dashboard: a table, a filter, a section that only renders for a role. A new view is those pieces again, not another script.

03What I owned

The session-to-view rules, the BFF in front of billing, ops, and logs, the audit log, and the component set the team kept after handover.