Infrastructure & Integrations
Backend architecture: each rule in one place, behind every screen
Modules that own their data
Now, or after the reply
Before the reply
- What
- record J.H.'s approval and mark the extra work ready to start
- Why now
- the screen must only say “approved” once it's true
- How
- one save: approval, job status and history together, or none of them
- If it fails
- J.H. sees “not saved, try again”; nothing half-done
Just after the reply
- What
- notify T3's phone and the office board
- Why later
- J.H. shouldn't wait on a phone notification
- How
- a background job, started by the saved approval
- If it fails
- retried; T3's app also shows the new status the next time it loads
Later, retried until done
- What
- add the blower motor to the invoice draft and send it to accounting
- Why later
- accounting can be slow or unavailable; that's not J.H.'s problem
- How
- a queued job that's safe to run twice
- If it fails
- retried, then shown to the office if it still can't go
What a backend design decides
01
Boundaries
Divided by what the business does
Jobs, customers, scheduling, billing: modules that can change without breaking each other.
02
Who owns each record
One owner, everyone else asks
A record kept in two places will disagree. Each one has a home, and copies are labelled as copies.
03
States and the moves between them
Written as rules, checked on the server
Extra work goes from proposed to approved to done, and only the allowed moves are possible.
04
Now or later
Before the reply, or after
Only what the person needs to see happen waits in the request. The rest is queued.
05
What happens when something fails
Saved first, then the next step
Important steps are saved before anything else is triggered, so a failure is a retry, not a lost approval.
06
How screens ask
One way in
Every app, and every connected system, goes through the same checks.
Split later, when there's a reason
Separate services on day one
- 01A service per noun, each deployed on its own
- 02Network calls where a function call would do
- 03Records spread across services that must agree
- 04More to deploy, secure and watch
A small team spends its time keeping the pieces in step.
One well-divided backend
- 01Clear modules inside one application
- 02Each module owns its records
- 03One deployment, one place to look when something's wrong
- 04A module moved out when it needs to scale or change on its own
The boundaries are there from the start; the splitting waits for a reason.
What the backend sits between
In
Out
Worth designing when more than one screen shares the rules
Good fit
- Staff, customers and connected systems all work on the same records.
- Your apps disagree about what's allowed.
- The software will grow for years, with more people changing it.
Not the right fit
- A single form that sends an email. Ordinary code is enough.
- An off-the-shelf tool already does the job and you don't need to own the rules.
Questions about backend architecture
Should we use microservices?
Usually not at first. One backend divided into clear modules is simpler to run and change. A module moves out on its own when it needs to scale or be released separately, and the boundaries make that move straightforward.
Can rules live in the screens instead?
Screens can show and hide things for convenience, but the decision is made on the server. Otherwise each screen enforces its own version, and anything that calls the backend directly skips the check.
What database do you use?
A relational database is the usual starting point for business records. Other kinds of storage are added when something needs them, like search or large files, not by default.
Can you work with our existing backend?
Yes. We start by mapping where each rule and record lives today, then move them one at a time, with the current system running throughout.