
Ending "It Was Already Like That": How We Built AssetTrace on AWS
AssetTrace gives both sides of a rental handover one locked, timestamped record of condition, then uses Amazon Bedrock to compare it on return. Here is how we built it serverless in four days, and the decisions that mattered.
Ask anyone who has rented a flat, lent out a scooter or returned a borrowed bike, and you will hear some version of the same story. Something is scratched, someone says "it was already like that," and nobody can prove otherwise. The photos are on one person's phone, they can be edited or lost, and the other person never agreed to them.
For the First Commit hackathon by WeMakeDevs and AWS, our team, Pandoras Box, decided to build a small, focused fix for that moment. The result is AssetTrace: a shared, tamper-evident record of condition, captured at handover and compared again at return.
What AssetTrace does
There are two roles, an Owner and a Renter. The flow is deliberately short:
- The Owner captures a baseline through a guided camera flow with named capture points (front, left side, kitchen and so on), plus a short context video as additional capture-context evidence.
- Every photo is hashed with SHA-256 in the browser and stored with its capture time, optional GPS and the identity of whoever took it.
- The Renter reviews the baseline and acknowledges it. Only when both sides have acknowledged can the baseline be locked, and after that it is read-only.
- On return, the Renter captures the same points again.
- The Owner runs an AI comparison, and both parties get one condition report.
We were careful about scope. AssetTrace records evidence and produces AI observations for human review. It does not claim legal validity, and when the model is unsure it says so.
The architecture
Everything runs on AWS in us-east-1, and every service is there for a reason:
Service | What it does in AssetTrace |
|---|---|
Amazon Cognito | Sign-up, email confirmation and sign-in, so each piece of evidence belongs to a confirmed account |
Amazon API Gateway (HTTP API) | A JWT authorizer validates tokens on every route except register, confirm and login |
AWS Lambda (Node.js 22) | One function serving all 14 routes: business rules, presigned URLs, Bedrock calls |
Amazon S3 | Photos and videos, uploaded directly from the phone |
Amazon DynamoDB | Three tables for inspections, evidence and comparisons |
Amazon Bedrock (Nova 2 Lite) | Multimodal comparison of baseline and return photos |
AWS Amplify Hosting | Serves the React frontend over HTTPS |
Amazon CloudWatch | Logs and structured error entries |
AWS SAM | The backend defined as one template |
The frontend is a React and TypeScript web app. Camera capture, hashing and geolocation all happen on the phone, and the backend is entirely serverless, so it costs almost nothing when nobody is doing a handover.
Three decisions that shaped the build
1. Media never touches Lambda, and the client is never trusted
Photos and videos are large, and we did not want them flowing through a function. Instead, the phone asks the API for an upload URL, Lambda returns a 10-minute presigned S3 URL, and the browser uploads straight to S3. That also means the browser never holds AWS credentials.
The catch is that a client can say it uploaded something that it did not. So after the upload, when the phone saves the evidence metadata through the API, Lambda checks that the object actually exists in S3 before recording it. Duplicate evidence IDs are refused with a DynamoDB conditional write.
2. Let the database enforce the lock
The whole product depends on one promise: once a baseline is locked, nobody can change it. If that promise lived only in the UI, it would be worth very little. So the lock is a server-side rule, backed by a DynamoDB condition expression, and the return is frozen once every capture point is saved. The comparison endpoint is Owner-only and only works after the baseline is locked.
This was one of the most satisfying parts of the project. Conditional writes turned a fuzzy trust requirement into a few lines of code that either succeed or fail.
3. Ask the model for less, then check its work
For the comparison, Lambda pulls the baseline and return images from S3 and sends them to Amazon Nova 2 Lite through the Bedrock Converse API, at temperature 0. For each capture point, the model has to label the result as Existing, New, Uncertain or No visible change, with a confidence score and a short explanation.
We treat the model's answer as untrusted input. The JSON is parsed and strictly validated (allowed statuses, confidence between 0 and 1), and if anything is malformed the request fails with an explicit error instead of storing a guess. "Uncertain" is a first-class result on purpose. For a tool that people may argue about, an honest "I can't tell" is worth more than a confident wrong answer.
Bedrock is also the main variable-cost step, so it only runs when the Owner explicitly asks for it, never automatically.
What surprised us
- Timeouts shape design. API Gateway's HTTP API has a 30-second integration limit, so our Lambda timeout is 29 seconds. A comparison that involves several images has to fit inside that window, which pushed us to keep the prompt and output tight.
- Browsers care about HTTPS. Camera and geolocation only work on secure origins, so having a hosted HTTPS build early mattered more than we expected when testing on real phones.
- A mock mode paid off. We put a service layer in front of mock and real adapters, controlled by a single environment flag. That let everyone work on the UI without touching billable AWS resources, then switch to the real backend when ready.
Future Scope
As the next step, we would extend AssetTrace with global secondary indexes for more efficient lookups, stronger production-grade security configuration, objection and dispute handling, PDF reports, and persistent device telemetry. We would also explore automated suspicious-capture detection while keeping the core inspection and comparison workflow unchanged.
Try it
The live demo is at https://assettrace.d2re85crrtyc3z.amplifyapp.com and the code is on GitHub at https://github.com/utk1college/AssetTrace . Open it on a phone, create two accounts, and walk a wall from baseline to report. It is a small problem, but we tried to solve it end to end, and AWS gave us the pieces to do that in four days.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article