Spring Boot Backend for Frontend

A production-minded gateway for React dashboards.

This portfolio project centralizes JWT security, aggregates user and product APIs, applies Resilience4j fallbacks, and publishes API and quality documentation from CI.

Architecture

Request path and resilience boundary

The React client sees one stable dashboard API while the BFF hides downstream contracts and failures.

API Contract

Generated documentation published from CI

CI starts the BFF, exports the OpenAPI contract, and publishes read-only static API documentation alongside the User Guide.

Local Swagger UI

Run the BFF with the local profile and open:

http://localhost:8080/swagger-ui.html

The Swagger UI Authorize button accepts the local Bearer JWT generated by the repository script.

Local Runtime

Run the stack locally

Docker Compose starts the BFF and two WireMock services for realistic local development.

Docker Compose

docker compose up --build

Published ports: BFF on 8080, user service on 8081, product service on 8082.

Authenticated Request

$token = powershell -ExecutionPolicy Bypass -File .\scripts\create-local-jwt.ps1
Invoke-WebRequest -Headers @{ Authorization = "Bearer $token" } http://localhost:8080/api/dashboard

Quality Gates

Tests, coverage, and generated docs

The pipeline runs one Maven verification path and deploys Pages only after success on main.

Behavior Tests

Security, aggregation, downstream HTTP, fallback behavior, DTO JSON, and architecture boundaries.

Coverage Gate

JaCoCo runs during mvn verify and fails the build when thresholds are missed.

Generated Documentation

Javadoc, coverage, OpenAPI, Swagger UI, and the User Guide are assembled under target/pages.

Published Resources

Project links