Soroush Neyestani

Software Engineer

Application Architect

Enterprise Application Developer

Technical Author & Educator

Business REST API

Engineering a Secure, Multi-Tenant Business Backend with Spring Boot, PostgreSQL, Transactional Idempotency, and Automated Verification

An Open-Source Backend Engineering Case Study

Developed by: Soroush Neyestani
Release: v0.1.0 — November 23, 2026
Status: Released and Completed
License: MIT
Project Type: Open-Source Backend Reference Implementation
Technical Focus: REST API Engineering, Multi-Tenant Data Isolation, Access Control, Transactional Integrity, Idempotency, API Contracts, and Integration Testing

Technology Stack: Java 21, Spring Boot 4.2.0, PostgreSQL 18.7, Flyway, OpenAPI 3.1, GitHub Actions

Public Repository: Business REST API

Official Release: Business REST API v0.1.0


Executive Summary

Business REST API is an open-source Java backend reference implementation designed to demonstrate the engineering requirements behind a business API that must do more than expose basic CRUD operations.

The project implements customer and order management through a REST interface backed by PostgreSQL. Its central engineering concerns are data consistency, tenant isolation, operation-level authorization, concurrency-aware updates, and reliable handling of repeated write requests.

The application uses Java 21, Spring Boot 4.2.0, PostgreSQL 18.7, database migrations managed by Flyway, and a versioned OpenAPI 3.1 contract.

The initial release includes:

  • Customer and order CRUD operations.
  • Request validation, filtering, and offset-based pagination.
  • Bearer-token authentication.
  • Role-based authorization using VIEWER and OPERATOR roles.
  • Tenant-scoped resource access.
  • Database-enforced protection against cross-tenant order/customer relationships.
  • Version-aware update and delete operations.
  • Transactional idempotency for order creation.
  • A versioned OpenAPI 3.1 description.
  • Automated unit and PostgreSQL-backed HTTP integration tests.
  • A documented threat model and local performance baseline.
  • A reproducible public source release with GitHub Actions verification and SHA-256 integrity checks.

The most significant verification scenarios demonstrate how the backend behaves under invalid authorization, cross-tenant resource access, conflicting idempotency requests, and concurrent attempts to create the same order.

In one controlled test, eight concurrent requests attempting the same logical order creation resulted in exactly one persisted order and one associated idempotency receipt.

The project also passed all 16 automated tests, including seven unit tests and nine HTTP/PostgreSQL integration tests. Successful public GitHub Actions runs were recorded for both the main branch and the official v0.1.0 release tag.

Business REST API is intentionally presented as a tested reference implementation, not an unrestricted production-ready SaaS platform.

This distinction is important: security, reliability, and operational readiness depend on explicit guarantees, documented boundaries, and evidence—not merely on the choice of framework.


1. The Engineering Problem

CRUD Is Only the Beginning

A basic REST API can be implemented with relatively few endpoints.

A client submits a request, the application validates some input, the database stores or retrieves a record, and the server returns an HTTP response.

This model is sufficient for demonstrating request routing and database persistence.

However, real business systems introduce several questions that are easy to overlook in a minimal implementation:

  • What prevents one organization from accessing another organization's records?
  • How are read-only users prevented from modifying data?
  • What happens when two clients attempt to update the same record?
  • What happens when a network retry submits the same order twice?
  • Can a malicious or malformed request establish a relationship between records belonging to different tenants?
  • How can API consumers determine which behaviors and schemas are supported?
  • How do we verify that authorization and database constraints actually work?
  • Can another developer reproduce the build and test results from a clean source checkout?

These questions represent distinct engineering responsibilities.

An HTTP controller alone cannot guarantee tenant isolation.

A role check alone cannot guarantee relational integrity.

An API specification alone cannot establish that runtime behavior matches the documentation.

A green unit-test suite alone cannot demonstrate correct behavior across the HTTP boundary and a real database.

Business REST API was developed to address these concerns together within a manageable, explicitly defined business domain.

Primary Design Objective

The central objective was to create an independently reviewable backend implementation where important behaviors could be explained, tested, and reproduced.

The project therefore prioritizes correctness and evidence over an unnecessarily broad feature set.


2. Scope and Business Domain

The application models two business resource types:

Customers represent business entities managed within a tenant.

Orders represent business records associated with customers.

These resources provide enough structure to exercise several important backend engineering problems:

  • Entity lifecycle management.
  • Parent-child relationships.
  • Tenant ownership.
  • Validation and persistence constraints.
  • Concurrent modifications.
  • Authorization and resource visibility.
  • Idempotent creation workflows.
  • Pagination and filtering.

The domain deliberately avoids incorporating real customer information or employer-owned enterprise data.

Synthetic test data allows the project to demonstrate behavior without exposing operational or confidential records.

Supported Resource Operations

Both customer and order resources support CRUD functionality.

The API also includes filtering and pagination for resource collections.

Mutation operations account for record versioning, requiring the caller to supply the current version when performing updates or deletions.

This requirement makes modification behavior more explicit than unconditional overwrite semantics.

Why This Domain Was Selected

A customer/order model is intentionally familiar.

The domain itself does not require a complex explanation, allowing the engineering discussion to concentrate on access boundaries, database guarantees, transaction behavior, and API contracts.

The purpose of the application is not to compete with a commercial ERP or order-management system.

It is to demonstrate backend engineering decisions that apply across many enterprise applications.


3. Technology and Implementation Architecture

The project uses a conventional Java backend technology stack with a relational database.

Technology Responsibility
Java 21 Application implementation
Spring Boot 4.2.0 Backend application framework and HTTP infrastructure
PostgreSQL 18.7 Persistent relational data storage
Flyway Version-controlled database migrations
OpenAPI 3.1 Machine-readable API contract
Automated Java tests Unit and integration verification
GitHub Actions Continuous integration and release verification
SHA-256 Release artifact integrity verification

Request Processing Model

At a conceptual level, a protected API request passes through several responsibilities:

HTTP request → Authentication → Authorization → Request validation → Business operation → Persistence transaction → HTTP response

The exact behavior depends on the operation.

A read request primarily requires authenticated and authorized access to tenant-scoped data.

A write request may additionally require version validation, transaction management, relationship validation, or idempotency processing.

The architecture is built around these responsibilities rather than treating every endpoint as an isolated database operation.

Why Spring Boot?

Spring Boot provides an established application framework suitable for building Java HTTP services.

It integrates naturally with the Java ecosystem and supports the application-level organization, testing, and infrastructure concerns relevant to a database-backed API.

For this project, the framework is a means to implement and validate backend behavior—not the primary achievement.

A framework can simplify infrastructure code, but it does not automatically provide correct tenant isolation or idempotency.

Those guarantees require deliberate design and testing.

Why PostgreSQL?

PostgreSQL provides transactional persistence and relational constraints.

These characteristics are particularly valuable where the correctness of an operation depends on more than a single application-level validation step.

For example, validating that an order belongs to a customer in the same tenant must remain correct even when requests are concurrent or application code changes.

Database-level integrity constraints provide an additional enforcement boundary.

Why Flyway?

A database schema is part of the application contract.

Manual, undocumented schema changes undermine reproducibility and make automated deployment or testing more difficult.

Flyway allows schema modifications to be represented as versioned migrations, keeping the database structure aligned with the application's recorded evolution.

The project verifies migration behavior as part of its integration workflow.


4. Multi-Tenant Architecture and Data Isolation

The Importance of Tenant Boundaries

A multi-tenant application allows multiple organizations or logical customers to use the same backend while maintaining separation between their data.

This creates a security requirement that is stronger than merely displaying different records in the user interface.

Tenant ownership must influence which resources the API allows a caller to retrieve, modify, or delete.

A client must not gain access to another tenant's resource simply by changing an identifier in an HTTP request.

Tenant-Scoped Resource Access

Business REST API uses tenant-aware access behavior.

The reported verification scenarios establish that attempting to access an identifier belonging to another tenant results in an HTTP 404 Not Found response.

This behavior prevents the API from returning a foreign tenant's resource to the caller.

It also avoids exposing that resource's details through a successful response.

A 404 response is not, by itself, proof of complete protection against resource enumeration or information leakage. It is one part of the application's documented access-control behavior.

Database-Enforced Relational Isolation

One of the project's more important architectural decisions is enforcing tenant consistency at the database relationship level.

The database schema uses a composite foreign-key constraint to prevent an order from referencing a customer belonging to another tenant.

This creates a defense beyond ordinary request filtering.

Consider the underlying invariant:

An order associated with a customer must not cross the order's tenant boundary.

If the application validates tenant ownership only in a controller or service method, a later programming error could accidentally bypass that check.

A relational constraint can reject an invalid association even when an application-level path attempts to persist it.

This does not replace authorization.

It complements authorization by protecting a specific database invariant.

Defense in Depth

The project demonstrates two related but distinct protections:

Application-level access control determines whether a caller can perform an operation involving a resource.

Database-level integrity determines whether an invalid cross-tenant relationship can be persisted.

These mechanisms operate at different boundaries.

Using both is stronger than relying exclusively on a single request-level check.


5. Authentication and Role-Based Authorization

The initial release implements Bearer-token authentication and two roles:

VIEWER — intended for permitted read-oriented access.

OPERATOR — intended for operations that include authorized modifications.

The documented verification distinguishes different failure conditions through HTTP responses.

Situation Observed API behavior
Missing or invalid authentication 401 Unauthorized
Attempted write without the necessary role 403 Forbidden
Access to a resource belonging to another tenant 404 Not Found

These distinctions matter for both security and API design.

Authentication Versus Authorization

Authentication establishes whether the request provides an accepted identity or credential.

Authorization determines whether that authenticated caller is permitted to perform the requested operation.

Conflating the two creates ambiguous behavior and can allow overly broad access.

The project's tests include cases that exercise the relevant response boundaries.

Why Authorization Must Be Operation-Specific

A user who is permitted to retrieve orders should not automatically gain the ability to create, update, or delete them.

Role distinctions help make this separation explicit.

The implementation demonstrates this through its VIEWER and OPERATOR model.

Why Tenant Scope Still Matters

A caller's role is not sufficient to establish access to every record.

An OPERATOR belonging to one tenant must not be treated as an unrestricted operator across all tenants.

Role-based authorization and tenant ownership therefore address different dimensions of access.

Current Authentication Limitation

The initial version uses manually managed Bearer tokens.

It does not claim to provide a complete identity and access management platform.

Automatic token lifecycle management, credential rotation, advanced identity federation, and comparable production authentication capabilities are outside the demonstrated release scope.

This is a deliberate limitation that must be considered before adapting the application for a real multi-user environment.


6. Validation and Version-Aware Modifications

Validating Requests at the API Boundary

An API should reject requests that violate its supported input requirements rather than allowing invalid values to propagate into persistence or business logic.

Validation serves several purposes:

  • Preventing malformed operations.
  • Making error behavior predictable.
  • Protecting business invariants.
  • Improving the reliability of API consumers.
  • Reducing ambiguity between client errors and server failures.

Business REST API includes input validation as part of its supported operations and test coverage.

Concurrent Updates and Record Versions

A common concurrency problem occurs when two clients read the same record and later attempt to modify it independently.

Without an appropriate concurrency policy, the second update may silently overwrite the first.

The project requires the current record version when performing update and delete operations.

This creates an explicit version-precondition boundary for mutations.

The exact wire-level format and error mapping are defined by the implementation and its OpenAPI specification.

The broader engineering principle is straightforward:

A modification should not silently assume that the underlying record is unchanged since the client last observed it.

Version-aware mutations provide a way to detect or reject operations based on stale state.

This is particularly relevant to applications where multiple users or processes can modify the same business data.


7. Transactional Idempotency for Order Creation

Why Idempotency Matters

Network communication is not perfectly reliable.

A client may submit a request, the server may successfully complete the operation, and the connection may fail before the client receives the response.

The client is then left with uncertainty.

Did the server process the request, or did it fail before creating the resource?

Retrying an ordinary create request can cause duplicate effects.

For order creation, duplicate effects can lead to incorrect business records and downstream processing.

Idempotency Keys

The project's order-creation workflow supports an explicit idempotency mechanism.

The caller supplies a key associated with the intended logical operation.

The backend uses that key and the request information to determine whether the operation is new, a compatible repetition, or a conflicting reuse.

The recorded behavior distinguishes three cases.

Case Expected behavior
First valid request Create the order and record its idempotency receipt
Same key and same request data Return the original result without another order
Same key with different request data Reject the conflict with HTTP 409

These semantics are significant because a key must not simply become permission to reuse an unrelated successful response.

Reusing an existing key with different request content is a distinct error condition.

Atomic Persistence

The implementation persists the order and its idempotency receipt within the same transaction.

This aligns the business operation with the record used to recognize its successful processing.

Without suitable atomicity, a failure between creating the order and recording the receipt could leave the system unable to recognize a subsequent retry correctly.

A transaction helps protect against such partially completed database effects.

Concurrency Verification

The project tested eight concurrent requests attempting the same logical order creation.

The reported outcome was:

  • One persisted order.
  • One persisted idempotency receipt.
  • No duplicate business records from the tested concurrent submissions.

This test is more valuable than verifying only sequential retries.

Concurrent requests introduce race conditions that ordinary sequential tests may not expose.

The result provides evidence that the implemented workflow handles this particular concurrent duplicate-creation scenario.

It is not a mathematical guarantee covering every possible database failure, infrastructure interruption, or deployment configuration.

Conflict Verification

The project also checks reuse of the same idempotency key with different request data.

The documented response is HTTP 409 Conflict.

This prevents the API from silently treating semantically different requests as the same operation.

Known Limitation: Receipt Retention

Version v0.1.0 does not automatically expire idempotency receipts.

A practical production system would need an explicit retention policy, accounting for client retry behavior, data growth, operational requirements, and the consequences of key reuse after expiration.

The absence of automatic expiration is documented rather than hidden.


8. Pagination and Filtering

The customer and order APIs support filtering and offset-based pagination.

These capabilities are important for operational business applications because resource collections may grow beyond what can reasonably be returned in one response.

Offset Pagination

Offset pagination selects a portion of a result set based on a position within the ordered collection.

It is straightforward for clients to understand and is convenient for conventional data tables.

However, it introduces a consistency limitation when the underlying dataset changes between requests.

For example, if records are inserted or deleted while a client moves between pages, the relative position of existing records can shift.

Depending on ordering and query behavior, a client may encounter duplicated or skipped records across page requests.

This is why the project's documentation explicitly identifies offset-pagination consistency as a limitation.

Alternative Approaches

Cursor-based or keyset pagination can provide different consistency and performance characteristics for suitable workloads.

Such an approach would require additional API contract decisions, including stable ordering and cursor semantics.

Business REST API v0.1.0 does not claim to implement those alternatives.

The initial release uses offset pagination with the limitation clearly stated.

Filtering as Part of the Contract

Filtering is also part of API behavior.

It must be interpreted consistently alongside tenant scoping and authorization.

A filter must not become an alternative route to retrieve data that the caller is otherwise prohibited from accessing.

The project's tenant-isolation and authorization requirements remain relevant to collection operations as well as individual resources.


9. OpenAPI 3.1 as an Executable Design Reference

The project includes a versioned OpenAPI 3.1 document.

An API specification is valuable because it separates the public interface from implementation details.

It provides a structured description that developers and tools can inspect without reading every application class.

A versioned contract supports clearer communication about:

  • Available operations.
  • Accepted request structures.
  • Response formats.
  • Authentication requirements.
  • Expected error conditions.
  • Pagination and filtering parameters.
  • Supported version boundaries.

Documentation Must Match Runtime Behavior

An OpenAPI file is only useful if it accurately describes the application.

A contract that advertises unsupported functionality creates false expectations for clients.

The project's release workflow includes verification intended to keep the API description aligned with the actual implementation.

Why Versioning Matters

Versioning helps distinguish one published interface from a later evolution.

The project's initial release contains a versioned API description, allowing the exact public source revision and its associated contract to be identified together.

Versioning alone does not guarantee backward compatibility.

Compatibility still depends on the specific changes made to request and response behavior.

What OpenAPI Does Not Prove

An OpenAPI document does not automatically prove:

  • Correct authorization enforcement.
  • Transactional consistency.
  • Tenant isolation.
  • Idempotent behavior.
  • Absence of security vulnerabilities.
  • Performance under production load.

These properties require separate implementation mechanisms and tests.

The project therefore combines API documentation with executable verification.


10. Database Integrity and Schema Evolution

Data integrity is an essential part of the project's engineering scope.

The database is not treated merely as an opaque storage service.

Its relational guarantees are used to support business invariants.

Relational Relationships

Customer and order entities have a meaningful relationship.

That relationship is subject to tenant consistency.

The composite foreign-key constraint is an example of expressing a business rule through a database-enforced relationship.

Transaction Boundaries

Transaction behavior is especially important during order creation.

An operation may involve more than one persistent record, including the order and its idempotency receipt.

The implementation aligns these records transactionally.

Schema Migrations

Flyway migrations make schema evolution explicit and reproducible.

A developer checking out the repository should not need to reconstruct the database structure from undocumented manual steps.

The schema and the application must evolve together.

Integration Verification

The release test suite includes PostgreSQL-backed integration tests.

This is important because in-memory substitutes or mocked repositories cannot fully demonstrate database-specific constraint and transaction behavior.

The reported tests exercise application behavior across the HTTP and persistence boundaries.


11. Test Architecture and Verification Strategy

The project includes 16 automated tests divided into two groups:

Test category Count
Unit tests 7
HTTP/PostgreSQL integration tests 9
Total 16

All 16 tests passed in the reported verification workflows.

Unit Tests

Unit tests provide focused checks of behavior that can be verified without executing the complete HTTP and database integration path.

They are useful for identifying problems in small, isolated pieces of implementation logic.

HTTP Integration Tests

HTTP integration tests validate observable API behavior at the transport boundary.

They are particularly important for:

  • Request handling.
  • Authentication and authorization outcomes.
  • Error status mapping.
  • Input validation.
  • Resource operations.
  • API behavior involving persisted state.

PostgreSQL Integration Tests

Database-backed tests provide evidence that persistence behavior matches the application's expectations.

They are especially relevant to:

  • Schema migrations.
  • Referential integrity.
  • Tenant-specific relationships.
  • Transactional behavior.
  • Concurrent duplicate creation.

Negative Testing

A reliable backend must reject invalid operations correctly.

Successful CRUD requests alone are not sufficient evidence.

The reported project tests include negative scenarios involving authorization, tenant boundaries, and idempotency conflicts.

In these scenarios, an HTTP error is often the correct result.

For example, a test expecting 403 Forbidden should pass when the application refuses an unauthorized mutation.

Similarly, rejecting conflicting idempotency-key reuse with 409 Conflict is correct application behavior.

Why Database-Backed Integration Tests Matter

The distinction between an application's intended rules and the database's actual behavior is critical.

An implementation may appear correct under mocks but fail under real transactional or relational constraints.

Executing integration tests against PostgreSQL increases confidence that the supported behavior extends beyond an isolated service method.

It does not eliminate the need for further testing under different environments or production workloads.

Local and CI Evidence

Before publication, the candidate was verified on Windows and from an extracted source archive.

The private development workflow also recorded successful push and pull-request CI execution on Ubuntu.

The public distribution was independently built and verified in GitHub Actions.

This matters because the public release should not depend on untracked files or private development history to build successfully.


12. Continuous Integration and Public Verification

GitHub Actions provides the automated verification mechanism for the published source.

The public repository records successful test execution for both the main branch and the release tag.

Public Main Branch

GitHub Actions — Main Verification

Public Release Tag

GitHub Actions — v0.1.0 Verification

Both public runs reported all 16 tests passing on Ubuntu 24.04.

Why Release-Tag Verification Matters

A successful main-branch workflow shows that a particular branch revision passed verification.

A successful workflow against the release tag provides a more direct connection between the published version and its test evidence.

This helps distinguish the artifact being distributed from unrelated later development.

Reproducible Source Distribution

The public source package was created independently from the private development repository.

The reported public implementation, tests, OpenAPI document, and database migrations match the approved release candidate.

Publication-specific modifications were limited to documentation, packaging, and removal of public CI JAR uploading.

Source Archive Verification

The published source ZIP and checksum file were downloaded without authentication and successfully checked.

This demonstrates that the release does not depend on access to the private development repository.

Security Scanning

The publication process included a disclosure audit.

Gitleaks reported zero findings during the recorded scan.

That is useful evidence that the configured scanner did not identify secrets in the material it examined.

It is not a guarantee that no sensitive information or vulnerability could exist.

Security scanning complements, rather than replaces, architecture review, manual assessment, and runtime testing.


13. Performance Engineering: A Reproducible Historical Baseline

The project includes a documented local load-testing exercise.

The available measurement was collected before the final validation changes and is therefore preserved as a historical baseline, not a benchmark of the exact final public release.

Test Workload

The recorded scenario used:

  • 1,000 synthetic orders.
  • Eight concurrent users.
  • An order-list read workload.
  • Local loopback communication.
  • A controlled test environment.

The test did not evaluate all API operations.

It did not simulate a geographically distributed client population, a production network, or a general combination of read and write workloads.

Recorded Measurements

Metric Historical result
Successful requests 52,948
Throughput 5,294.231 requests/second
Reported errors 0
p50 latency 1.383 ms
p95 latency 2.695 ms
p99 latency 3.575 ms

How to Interpret These Results

The benchmark provides a measurable reference point for one particular local scenario.

It can help establish an initial testing method and facilitate comparisons if the same workload is executed again under controlled conditions.

However, several restrictions apply.

First, the workload covered reading the order collection, not the complete application.

Second, the test used loopback communication, which avoids many network costs present in real deployments.

Third, the dataset contained 1,000 synthetic orders rather than a production-sized or representative business dataset.

Fourth, the measurement preceded the final validation changes.

Therefore, these numbers must not be presented as guaranteed throughput or latency for the released application.

What a Production-Oriented Benchmark Would Require

A broader performance evaluation would need to define:

  • Hardware and runtime configuration.
  • Database resource limits.
  • Connection pool behavior.
  • Request distributions.
  • Realistic data volume and indexing.
  • Read/write workload proportions.
  • Concurrency and arrival rates.
  • Warm-up conditions.
  • Repeated measurement runs.
  • Resource saturation.
  • Error behavior under load.
  • Cross-host network conditions.

These requirements are discussed as engineering considerations, not as completed work in v0.1.0.

Why Preserving the Historical Baseline Is Valuable

Discarding a measurement because it predates the final source revision would remove potentially useful development evidence.

Presenting it as current release performance would be misleading.

The correct approach is to retain the measurement with precise scope, date relationship, environment, and limitations.

This preserves the technical value of the data without overstating what it proves.


14. Threat Modeling and Security Boundaries

The project includes a documented threat model.

The most relevant security concerns arise from the interaction between authenticated users, tenant-owned business records, persistence constraints, and API operations.

Assets and Security Objectives

The protected assets include customer and order information, authorization boundaries, and the integrity of business operations.

The principal objectives are:

Confidentiality: A tenant must not obtain another tenant's protected business records through the supported API.

Integrity: Unauthorized or invalid operations must not modify protected data.

Consistency: Database relationships and transactional effects must remain valid.

Controlled retry behavior: Repeated order creation must not produce duplicate effects within the supported idempotency model.

Trust Boundaries

Client-supplied input is not inherently trustworthy.

Authentication credentials, resource identifiers, tenant context, request payloads, and idempotency keys must be interpreted through the application's validation and authorization rules.

The persistence boundary provides additional guarantees through relational constraints and transactions.

Important Abuse Cases

Relevant negative scenarios include:

  • Requests without valid credentials.
  • Write attempts by read-only users.
  • Access to records belonging to another tenant.
  • Attempts to create invalid cross-tenant relationships.
  • Reuse of idempotency keys with different request data.
  • Concurrent duplicate submissions.
  • Mutations based on outdated record versions.

These scenarios illustrate why security cannot be delegated exclusively to a frontend application.

The backend must enforce its own rules.

Scope of the Security Evidence

The release includes security-oriented tests, a threat model, repository disclosure review, and secret scanning.

These mechanisms provide concrete evidence of the supported controls.

They do not constitute an independent penetration test, comprehensive security certification, or guarantee against every vulnerability.

The project should not be deployed in a sensitive production environment without additional assessment and adaptation.


15. Release Engineering and Supply-Chain Integrity

The project follows a separation between private development history and public source distribution.

The original development repository remains private.

An independent public repository contains the approved release-eligible source and documentation.

This approach serves two purposes.

First, it avoids exposing unrelated internal development records.

Second, it provides a smaller and clearer public repository for external review.

Official Release

Version: v0.1.0

Public Git Commit:

9fda5e6603218d42025b30f3a897eab84b017a4e

GitHub Repository:

https://github.com/soroushneyestani/business-rest-api-reference

Official Release Page:

https://github.com/soroushneyestani/business-rest-api-reference/releases/tag/v0.1.0

Source Archive Integrity

The release includes a source ZIP and a SHA256SUMS.txt file.

Published Source ZIP SHA-256:

413c1019cf69fc66a96439ccc1361c0db22c3a9f61d91c0111cb3643a041c3f9

Download:

https://github.com/soroushneyestani/business-rest-api-reference/releases/download/v0.1.0/business-rest-api-v0.1.0-source.zip

Checksums:

https://github.com/soroushneyestani/business-rest-api-reference/releases/download/v0.1.0/SHA256SUMS.txt

The recorded publication workflow successfully downloaded the source archive without authentication and confirmed the published checksum.

Protected Git References

The public main branch is protected by repository rules requiring appropriate pull-request and CI verification.

The release tag is also protected against unintended modification or deletion.

Protecting published references makes accidental history changes less likely and supports a stable audit trail for the release.

License and Dependencies

The original source is distributed under the MIT License.

Third-party dependencies retain their respective licensing conditions.

The public package includes a license file and third-party notices.

The release deliberately avoids distributing a bundled executable JAR until any additional redistribution obligations associated with packaged dependencies have been reviewed.

A source-only release is an appropriate choice for the documented initial distribution scope.

What Checksums Actually Prove

A matching SHA-256 digest shows that the downloaded file corresponds to the published byte sequence.

It does not, by itself, prove that the source is free from vulnerabilities, that the publisher's environment was uncompromised, or that every dependency is trustworthy.

Artifact integrity is one component of a broader software supply-chain process.


16. Architectural Decisions and Trade-offs

The project demonstrates several design choices that are especially relevant to enterprise backend engineering.

16.1 Relational Constraints Instead of Application Validation Alone

Application validation offers useful error handling and expresses business intent.

Database constraints add an enforcement mechanism that survives some categories of application mistakes.

The composite tenant relationship is a concrete example.

Trade-off: More constraints require careful schema design and migration management, but they reduce dependence on every application path implementing the same invariant correctly.

16.2 Transactional Receipts Instead of Stateless Retry Detection

An in-memory set of processed keys would be simple but would not provide durable database-backed behavior.

Persisting an idempotency receipt with the order creates a more meaningful consistency boundary.

Trade-off: Persistent receipts require storage, conflict semantics, concurrency handling, and eventually a retention policy.

The initial release implements the persistence behavior but does not automatically expire receipts.

16.3 Version-Aware Mutation Instead of Unconditional Writes

Requiring a current record version makes concurrency expectations explicit.

Trade-off: Clients must track and supply the relevant version, and the API must explain what happens when the precondition is no longer satisfied.

This is more involved than unconditional updates, but it supports safer concurrent workflows.

16.4 Offset Pagination Instead of Cursor-Based Pagination

Offset pagination is familiar and straightforward to consume.

Trade-off: Data changes can shift page boundaries, making the result inconsistent across sequential requests.

The limitation is documented rather than ignored.

16.5 Manual Bearer Tokens Instead of a Complete Identity Platform

Manually managed credentials allow the reference implementation to focus on authorization boundaries.

Trade-off: A production system would require stronger identity lifecycle management and operational controls.

The initial release demonstrates access-control semantics without pretending to be a complete authentication platform.

16.6 Focused Domain Scope Instead of a General ERP

Customers and orders are sufficient to demonstrate relationships, mutations, and access rules.

Trade-off: The project does not include pricing engines, payments, inventory, billing, reporting, or other enterprise modules.

Those additional domains are not required to prove the initial architectural objectives.

16.7 Source Release Instead of Binary Distribution

A verified source package gives reviewers access to implementation and tests.

Trade-off: Users must build and configure the application themselves.

It also avoids prematurely distributing a bundled binary before its dependency-redistribution requirements have been fully reviewed.


17. How to Evaluate the Project

The public repository is intended to be inspected and tested, not merely viewed as a demonstration screenshot.

A technical review should consider the following sequence.

Step 1 — Read the Project Contract

Begin with the README, the versioned OpenAPI document, and the technical documentation.

Determine the exact operations, supported request formats, expected status codes, and documented limitations.

Step 2 — Inspect Database Migrations

Review how customer and order persistence is structured.

Pay particular attention to tenant ownership and the composite relational constraint that prevents invalid cross-tenant relationships.

Step 3 — Review Access-Control Behavior

Examine how the supported Bearer-token and role model affects resource operations.

Verify the documented distinctions between unauthenticated, forbidden, and foreign-tenant requests.

Step 4 — Examine Version-Aware Mutations

Review how update and delete operations require the current resource version.

Inspect the tests and API specification for the exact precondition and error semantics.

Step 5 — Inspect Order Idempotency

Review how idempotency keys and request information are handled.

Determine how the receipt is persisted, how same-key retries return the original result, and how conflicting reuse is rejected.

Step 6 — Review Concurrent Request Tests

Examine the evidence for eight concurrent duplicate submissions.

Confirm that the expected persistent result is one order and one receipt.

Step 7 — Execute the Automated Tests

Use the repository's documented setup instructions and required PostgreSQL environment.

The public release records 16 passing automated tests.

Step 8 — Inspect CI Evidence

Review both the main-branch and release-tag workflows.

Confirm that the public source can be built and tested independently of the private development environment.

Step 9 — Verify the Release Archive

Download the official source ZIP and compare its SHA-256 digest with the published checksum.

Step 10 — Review Known Limitations

Evaluate whether manually managed tokens, offset pagination, and unlimited receipt retention are appropriate for any intended adaptation of the project.

The repository's technical documentation is the authoritative source for exact commands, configuration keys, and wire-level request examples.


18. Known Limitations of v0.1.0

An engineering case study should explicitly distinguish implemented behavior from unsupported assumptions.

Area Current implementation or limitation
Business domain Customers and orders
REST operations CRUD
Filtering Supported
Pagination Offset-based
Authentication Manually managed Bearer tokens
Roles VIEWER and OPERATOR
Tenant isolation Enforced and tested for supported operations
Cross-tenant relationship protection Composite database foreign-key constraint
Mutation concurrency Current record version required
Order creation idempotency Transactional and persistent
Conflicting key reuse HTTP 409
Concurrent duplicate requests Eight-request test verified
Automatic receipt expiration Not implemented
Database migrations Flyway
API contract OpenAPI 3.1
Automated tests 16
Public CI environment Ubuntu 24.04
Local verification Windows
Performance evidence Historical loopback read baseline
Public license MIT
Bundled executable JAR Not distributed in the initial public release

Operational Consequences

The manually managed Bearer-token model should not be treated as a substitute for complete production identity management.

Offset pagination can produce inconsistent page traversal when data changes.

Persisted idempotency receipts require a retention strategy if the application is adapted to long-running operational use.

The available benchmark does not establish the final release's production throughput or latency.

These are not hidden defects.

They are documented scope and maturity boundaries.


19. Potential Future Development

The current version is complete within its approved initial scope.

Possible future improvements could include:

Authentication and identity management: More mature token issuance, rotation, expiration, revocation, and integration with external identity providers.

Pagination: Cursor-based pagination for workloads requiring different consistency and performance characteristics.

Idempotency lifecycle: Configurable receipt retention and cleanup policies with explicitly defined key-reuse semantics.

Operational observability: Structured tracing, metrics, and diagnostic information suitable for deployed environments.

Broader testing: Additional concurrency, failure-injection, authentication, and database-recovery scenarios.

Performance engineering: Updated benchmarks against the final source revision and more representative datasets, mixed workloads, and deployment topologies.

Deployment: Reproducible application packaging, environment configuration, and operational documentation for supported deployment targets.

API evolution: Documented compatibility policies and automated verification for future API revisions.

These are potential development directions rather than commitments or capabilities claimed by v0.1.0.


20. Engineering Lessons

Business REST API demonstrates several principles that extend beyond the specific framework and domain used in the project.

20.1 Data Isolation Requires Multiple Boundaries

A tenant identifier in a request is not a security guarantee.

Authorization rules and relational integrity must be considered together.

20.2 A Successful Response Does Not Prove a Safe Mutation

Correct handling of repeated and concurrent requests is essential where one logical operation must not produce multiple persistent effects.

20.3 Concurrency Must Be Tested Explicitly

Sequential tests cannot establish that an implementation behaves correctly under simultaneous submissions.

The eight-request idempotency scenario exercises a failure mode that ordinary CRUD testing would not expose.

20.4 Database Constraints Are Architectural Decisions

Schema constraints should reflect meaningful business invariants.

They are not merely implementation details.

20.5 Authentication and Authorization Are Different Responsibilities

Proving that a token is accepted does not establish that the caller may perform every operation or access every tenant's records.

20.6 Documentation Is Part of the Product

A versioned API contract helps consumers understand expected behavior, but it must remain consistent with the implementation.

20.7 Evidence Must Be Tied to an Exact Source Revision

A passing development test does not automatically validate an independently packaged public release.

The project's public main and release-tag CI runs establish a clearer relationship between the distributed source and its verification evidence.

20.8 Performance Numbers Need Context

A fast local benchmark is useful engineering data when accompanied by workload, environment, and revision information.

Without that context, numbers can become misleading marketing claims.

20.9 A Completed Reference Implementation Is Not the Same as a Production Platform

The project's first release is complete because its defined objectives have been implemented, documented, tested, and published.

That completion does not imply that every operational requirement of a production environment has been addressed.


Conclusion

Business REST API v0.1.0 demonstrates a structured approach to building and verifying a business-oriented Java backend.

Its value is not simply the implementation of customer and order endpoints.

The project brings together several backend engineering concerns that frequently determine whether an API can be trusted as part of a larger system:

Tenant-aware data access, role-based authorization, database-enforced integrity, version-aware modifications, transactional idempotency, explicit API contracts, and reproducible integration testing.

The eight-request concurrency scenario provides concrete evidence of the implemented duplicate-creation protection.

The 16 automated tests, PostgreSQL integration coverage, verified GitHub Actions runs, documented threat model, and source archive checksums provide an inspectable release trail.

The project also makes its operational boundaries explicit: manually managed tokens, offset-pagination consistency, receipt retention, and the historical nature of its performance baseline.

These distinctions are fundamental to credible engineering.

Reliable backend systems are not defined by how quickly they expose endpoints. They are defined by how consistently they protect data, enforce invariants, handle failures, and demonstrate that their guarantees hold under the conditions they claim to support.

Business REST API is a focused, open-source example of those principles.


Source Code and Verification Resources

Public GitHub Repository
https://github.com/soroushneyestani/business-rest-api-reference

Official Release v0.1.0
https://github.com/soroushneyestani/business-rest-api-reference/releases/tag/v0.1.0

Released Source Archive
https://github.com/soroushneyestani/business-rest-api-reference/releases/download/v0.1.0/business-rest-api-v0.1.0-source.zip

SHA-256 Checksum File
https://github.com/soroushneyestani/business-rest-api-reference/releases/download/v0.1.0/SHA256SUMS.txt

Main Branch CI Evidence
https://github.com/soroushneyestani/business-rest-api-reference/actions/runs/45216458594

Release Tag CI Evidence
https://github.com/soroushneyestani/business-rest-api-reference/actions/runs/45216953974

Historical Performance Baseline
https://github.com/soroushneyestani/business-rest-api-reference/blob/v0.1.0/docs/LOAD_BASELINE.md

MIT License
https://github.com/soroushneyestani/business-rest-api-reference/blob/v0.1.0/LICENSE

Third-Party Notices
https://github.com/soroushneyestani/business-rest-api-reference/blob/v0.1.0/THIRD_PARTY_NOTICES.md


Developed by Soroush Neyestani
Business REST API — v0.1.0
November 2026 | MIT License | Open Source

Technical Keywords: Java 21, Spring Boot 4.2, PostgreSQL 18, REST API, Multi-Tenancy, Tenant Isolation, Transactional Idempotency, Database Integrity, OpenAPI 3.1, Flyway, Authentication, Authorization, HTTP Integration Testing, GitHub Actions, Software Architecture, Backend Engineering.