Point of sale. Freelance, 2021. Two independent APIs, documented with Swagger.

Bioscenter

A point-of-sale system built as two independent APIs: centralised licensing on one side, local store operations for inventory, users and transactions on the other.

Role
Freelance
Year
2021
APIs
02
Docs
Swagger
GitHub profile Index

The problem

A shop that cannot sell when its connection drops is not a point of sale. But licensing that only lives on the till is not control either.

I designed the system as two independent APIs, centralised licensing and local operations covering inventory, users and transactions, and documented both with Swagger.

RESTSwaggerLicensingOffline-first

Selling continues when connectivity does not

Local operations do not depend on reaching the licensing service, so a dropped connection stops synchronisation rather than stopping the shop.

Licences stay centrally controlled

Splitting the two did not mean giving up central control. It meant deciding exactly how long a till is allowed to run on its own.

Decisions and the price I paid for them

Two APIs instead of one

Separating licensing from local operations let each store keep selling when connectivity dropped, without giving up central control of licences.

Trade-off accepted

Two services to deploy, document and version, and a reconciliation path to design for everything that happened while a till was offline.

Document both surfaces with Swagger

A freelance handover is only real if the next person can read the contract without reading the implementation.

Trade-off accepted

The spec is one more thing that goes stale unless it is kept honest alongside the code.