← All work

Backend-for-frontend on GCP

A Java BFF layer between a React / Next.js frontend and [FILL: downstream services], deployed on GCP.

Status
Shipped
Role
[FILL]
Period
[FILL]

Problem

[FILL: what the frontend needed that the downstream services didn’t give it directly. Usual reasons for a BFF: one screen needs data from several services, payloads are too big or the wrong shape for the UI, or auth and secrets must stay server-side.]

My role

[FILL: did you write the Java layer, the frontend, or both? Say it plainly. “Frontend engineer who also wrote BFF endpoints in Java” is a fine and credible answer.]

Architecture

The Next.js app talks to one BFF, which aggregates and reshapes calls to downstream services.CLIENT: Next.js / React. Then BFF (GCP): Java BFF. Then DOWNSTREAM: [FILL: service A], [FILL: service B], [FILL: service C].CLIENTNext.js / ReactUIBFF (GCP)Java BFF[FILL: framework]DOWNSTREAM[FILL: service A][FILL: service B][FILL: service C]
The Next.js app talks to one BFF, which aggregates and reshapes calls to downstream services.

Key decisions and trade-offs

Why a BFF instead of calling services from the browser or from Next.js API routes

[FILL: the real reason in your project. Be ready for the follow-up: “why not do the aggregation in Next.js server code?”]

[FILL: second decision, e.g. caching, error contract, pagination shape]

[FILL]

Hard bug I fixed

[FILL: symptom → diagnosis → root cause → fix.]

Outcome / status

[FILL]

Stack

  • Java
  • React
  • Next.js
  • GCP
  • [FILL: GCP services, e.g. Cloud Run / GKE]