Dev Patel
Aug 2023 → Dec 2023Source

Customer POS System

A point-of-sale front end in React and Redux over a Node REST API, with Postgres and maps integration.

React UIRedux storeExpress API
Type
Artifact
Where
Texas A&M
When
Aug 2023 → Dec 2023
Duration
4 mo
Status
Complete
Source
GitHub
The problem

The problem

A point-of-sale system has an unforgiving requirement: it has to stay responsive while an order is being assembled, and it has to be exactly right about money.

What I built

What I built

React with Redux for order state — a POS order is the textbook case for a single predictable store, because every part of the screen needs to agree about the same running total.

A Node and Express REST API underneath, consumed with async/await and axios, backed by PostgreSQL through an ORM. Google Maps handles delivery addressing.

Containerised with Docker; endpoints exercised through Postman during development.

Results

Results

Reduxsingle order store
RESTasync/await + axios
Dockerreproducible
  • Order state stayed consistent across every panel of the interface.
  • REST layer fully exercised through Postman before wiring the client.
  • Dockerised for reproducible local runs.
Architecture

Architecture

React UIorder screenRedux storesingle source of truthExpress APIREST · asyncPostgreSQLORMMaps APIdelivery
One predictable store on the client; one transactional store on the server.
In hindsight

In hindsight

Money went through JavaScript numbers. It worked for the scale we ran at, but floating point and currency is a bug waiting for a big enough order — integer cents, or a decimal type, is the only defensible choice.

Stack

Stack

ReactReduxNode.jsExpressPostgreSQLGoogle Maps APIDockerPostman