AWS Builder Center
SETU: Building an Offline-First Crisis Logistics Grid on AWS

SETU: Building an Offline-First Crisis Logistics Grid on AWS

How I built SETU, an offline-first crisis logistics system that keeps relief teams working through connectivity failures, synchronizes field events with AWS, uses deterministic logic for critical decisions, and Amazon Bedrock to explain them.

When the Network Breaks, Relief Shouldn't — Building SETU

Building an offline-first crisis logistics grid with AWS, deterministic decision-making, and Amazon Bedrock

There is a particular kind of failure that feels different during a disaster.
It is not necessarily that there is no water. Or no food. Or no vehicle available to move supplies.
Sometimes the resource exists. The people who need it exist. The people coordinating it exist.
What breaks is the connection between them.
A field team may be trying to report a shortage while the command centre is looking at yesterday's information. One relief camp may have excess inventory while another is approaching a critical shortage. A worker may have the information needed to act, but no reliable way to get that information into the system.
That was the problem I wanted to explore when I started building SETU.
The idea behind SETU is simple: if connectivity is unreliable during a crisis, the software should not become unreliable with it.

SETU Command Centre showing the live operational picture across relief locations.

The problem I wanted to solve

Disaster logistics is fundamentally a coordination problem.
Imagine three relief camps and a warehouse supporting a flood-affected area. Supplies are moving between locations, field teams are submitting requests, and the central team is trying to understand where the next delivery should go.
Under normal connectivity, this can be handled by a centralized system.
But disasters are rarely normal operating conditions.
Connectivity can become intermittent. A device can go offline. A field worker can create an update while the command centre is temporarily unreachable. When the connection returns, that information still has to be reconciled with everything that happened while the device was disconnected.
At that point, simply having a cloud dashboard is not enough.
The system needs to understand that an event happened before it reached the cloud.
That led me to a different design question:
What if offline wasn't an exception that the application had to survive, but a state the application was designed for from the beginning?
That became the foundation of SETU.

Building SETU around one real scenario

I wanted the project to be more than an architecture diagram, so I built the system around a concrete relief scenario.
Camp Alpha has 400 litres of water available and consumes approximately 100 litres per hour. That gives the camp a four-hour survival window. SETU uses a six-hour safety threshold, so the system identifies Alpha as a critical shortage.
The field team needs another 2,000 litres.
They create the request.
Then the network goes down.
This is the moment where the product has to prove its reason for existing.
The worker should not have to stop working because the connection disappeared. SETU stores the event locally using IndexedDB and keeps the request in a pending queue.
The worker can continue with the field operation.
When connectivity returns, SETU synchronizes the pending event with AWS. The backend processes it against the current operational state, checks for conflicts, calculates the appropriate redistribution and pushes the resulting state back to the command centre.
The important part is not that the system eventually reconnects.
The important part is that the work did not stop while it was disconnected.

The Field Terminal continues operating in offline mode and queues the 2,000-litre request locally.

From a field event to a coordinated decision

Once I had the scenario, I could work backwards from what needed to happen.
A field action creates an event.
That event needs to reach the backend when connectivity is available.
The event needs to be stored reliably.
It may trigger additional processing.
The resulting state needs to be reflected at the command centre.
And the system needs to be able to explain why a particular operational recommendation was produced.
This naturally led to an event-driven AWS architecture.
The field terminal communicates through Amazon API Gateway. AWS Lambda processes incoming events, while Amazon DynamoDB stores the operational state, events, conflicts, recommendations and connection information.
Amazon EventBridge triggers the reconciliation workflow, and AWS Step Functions orchestrates the different stages of processing. Once the state changes, API Gateway WebSockets allow the command centre to receive live updates.
The frontend is hosted using AWS Amplify, and the infrastructure itself is defined using AWS CDK.
At a high level, the system looks like this:
Field Terminal → API Gateway → Lambda → DynamoDB → EventBridge → Step Functions → Reconciliation → WebSockets → Command Centre

SETU uses an event-driven AWS architecture to connect offline field activity with centralized reconciliation and live operational updates.
The architecture is intentionally composed of managed services rather than one large application server. That separation became useful not only for deployment, but also for debugging. Each part had a clear responsibility, which made it easier to identify where something had actually gone wrong.
And things did go wrong.

The architecture looked good on paper. Then I had to make it work.

One of the biggest lessons from building SETU was that a distributed architecture can look perfectly reasonable as a diagram and still fail at the boundaries between components.
The first major issue appeared in synchronization.
The  /sync  workflow was failing because the application and deployed infrastructure were using different EventBridge event bus names. Each individual component existed, but the contract connecting them was wrong.
It was a small configuration mismatch with a large consequence: the event could be created, but the workflow that depended on it was not being triggered correctly.
Fixing it changed how I thought about serverless architecture. The difficult part is not always building the individual services. Often, it is making sure that every service agrees with the next one about what is supposed to happen.
I encountered another smaller but important integration problem when some POST requests were missing the expected JSON  Content-Type . The API route was correct and the frontend was calling it, but the request contract was incomplete.
Then there was a problem that had nothing to do with AWS.
During testing, stale DynamoDB data from previous experiments remained in the system. At one point, the dashboard was showing inventory values in the millions of litres.
The algorithm was processing the data it had been given.
The data was wrong.
That led me to add a controlled reset path for the demo environment and made me much more careful about separating test state from the actual scenario I was trying to demonstrate.
I also removed a simulated success timer from the UI. The interface had been able to show a success state after a delay even though the underlying operation might not have completed successfully.
That was not good enough for a system where synchronization status actually matters.
The interface now derives its status from the real request result.
These were not glamorous problems, but they were some of the most valuable things I learned during the build.

The most important design decision: AI doesn't make the critical allocation

There was another architectural question I had to answer.
Where should AI actually be used?
It would have been easy to put an LLM in the middle of the allocation process and ask it to decide how much water or food should be moved.
I deliberately did not do that.
In a crisis logistics system, I wanted critical quantities to be deterministic, reproducible and auditable.
So SETU separates the decision from the explanation.
The deterministic engine calculates the shortage, evaluates the safety window, detects relevant conflicts and determines the redistribution recommendation.
Then Amazon Bedrock with Claude 3 Haiku is used to explain that decision in natural language.
The principle is:
 Deterministic logic decides WHAT.   Bedrock explains WHY. 
This separation gives AI a useful role without making it the source of truth for the critical numbers.
That distinction became one of my favourite parts of the project because it changed the way I think about AI architecture.
Using AI everywhere is not necessarily good architecture.
Sometimes the better design is knowing exactly where not to use it.

Why AWS was a natural fit

SETU is fundamentally an event-driven system.
A field action creates an event. The event needs to be processed and stored. That event can trigger a workflow. The workflow can produce a new operational state. That state then needs to reach the people monitoring the situation.
AWS gave me managed services that map directly to those responsibilities.
API Gateway handles the entry points. Lambda handles processing. DynamoDB stores operational state. EventBridge connects events to workflows. Step Functions handles orchestration. WebSockets provide live updates to the command centre, while Bedrock provides the explanation layer.
This also meant I did not have to build and maintain one large always-running server simply to coordinate these operations.
The infrastructure is defined using CDK, which made it possible to reproduce the AWS environment rather than treating the deployed resources as a collection of manually configured components.
That became especially useful during the hackathon because deployment itself became part of the engineering problem.

Can SETU actually scale?

A hackathon deployment is not proof that a system can handle millions of users, so I don't want to make that claim.
What I can say is that SETU's architecture is designed so that its major responsibilities are separated across managed AWS services.
That gives the system a path to scale from a small deployment to a much larger operational network.
A single relief camp could produce events independently from another camp. API Gateway can act as the common entry point, Lambda can process those events without requiring a permanently running application server, DynamoDB can serve as the operational data layer, and EventBridge can decouple event creation from downstream processing.
Step Functions further separates orchestration from the individual processing functions.
The same pattern could therefore extend from one camp to multiple camps, districts and potentially larger regional operations without turning the entire application into one monolithic process.
But architecture is not the same thing as proof.
Before something like SETU could be considered for real disaster-response operations, it would need serious load testing, failure testing, observability, security reviews, stronger authentication, regional resilience and real-world field validation.
The goal of the hackathon was not to pretend those problems were solved.
It was to build an architecture where those problems can be addressed without throwing away the core system.

Why would anyone actually pay for SETU?

This was an important question for me because a dashboard by itself is not a product.
The potential value of SETU is the coordination layer.
Government disaster-management teams, humanitarian organizations, NGOs and emergency logistics operators may have people, vehicles, warehouses and relief supplies distributed across many locations. Their problem during a crisis is often not simply knowing that those resources exist. It is maintaining a trustworthy operational picture while information is arriving from disconnected places.
A system like SETU could provide one workflow connecting field events, inventory state, requests, conflicts and redistribution decisions.
The customer would not be paying for another dashboard.
They would be paying for continuity of operations and faster reconciliation when normal communication becomes unreliable.
A future commercial version could expand into organization-level deployments with role-based access, audit trails, regional operations, analytics, integrations with existing emergency-management systems and stronger observability.
There is still an important step before calling that a validated business: talking to actual organizations that run disaster-response operations and measuring whether SETU solves a sufficiently expensive coordination problem for them.
For now, the hypothesis is straightforward:
When coordination breaks during an emergency, reducing the gap between a field event and a trusted operational decision has value.

What offline-first actually taught me

Before building SETU, it was tempting to think about offline support as a frontend feature.
Something like: save a request locally, and send it later.
The implementation quickly showed me that offline-first is much more fundamental than that.
Once a device can create events while disconnected, the system has to account for events that exist locally before they exist in the cloud.
What happens if the same event is sent twice?
What happens if the central state changed while the device was offline?
What happens if two locations changed related inventory before either one received the other's update?
What happens when the device reconnects with stale information?
These are not edge cases anymore.
They become part of the core data model and synchronization strategy.
That was probably the biggest technical lesson I took away from SETU:
Offline-first is not a feature you add at the end. It changes the architecture from the beginning.

What I learned from building SETU during First Commit

The four-day build taught me more about distributed systems than I expected to learn from a hackathon.
I learned that architecture diagrams are easy to draw, but service contracts are where systems actually succeed or fail.
I learned that real-time systems need real state, not simulated success.
I learned that once offline events exist, idempotency and reconciliation stop being optional backend details and become part of the product itself.
I learned that AI does not need to control every decision to be valuable.
And I learned that the most useful debugging sessions were usually the ones that started with the assumption that everything was working.
The architecture was not the final product.
The failures were part of building it.

Where SETU is today

Today, the core workflow works end-to-end.
A field worker can create an event while offline. The event is stored locally in IndexedDB. When connectivity returns, the queued event is synchronized with AWS. The backend reconciles the event, deterministic logic evaluates the operational state, the command centre receives the updated state through WebSockets, and Bedrock can explain the resulting decision.
The deployed stack includes Amazon API Gateway, AWS Lambda, Amazon DynamoDB, Amazon EventBridge, AWS Step Functions, API Gateway WebSockets, Amazon Bedrock, AWS Amplify and AWS CDK.
There is still plenty I would build next: stronger production authentication, persistent conflict-resolution workflows, deeper observability, larger-scale load testing, additional disaster scenarios and real field validation.
But I wanted to finish one thing before trying to build everything.
One complete workflow that actually works.

Try SETU

A bridge when the connection disappears

I called the project SETU because the word means bridge.
That is what I wanted the system to become: a bridge between the people working in the field and the people coordinating from the command centre.
A bridge between an offline event and the centralized operational picture.
A bridge between deterministic calculations and human-readable explanations.
And ultimately, a bridge that does not disappear simply because the network does.
During a disaster, connectivity can fail.
Relief work cannot.
When the network breaks, relief shouldn't.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article