CareQuest
A local-first care-record PWA with opt-in AWS serverless sync
CareQuest is a care-logging PWA for family caregivers. The product goal is simple — capture a care session in under 10 seconds with no typing and no sign-up — and the interesting part is the engineering that makes “no account required” a real default rather than a marketing line.
It’s live at veai.jp/carequest and open source.
Design constraint: local-first, cloud-optional
Every record is written to the browser’s localStorage first. Core features — logging, the weekly look-back, JSON/CSV export, deletion — all work with no network and no account. Cloud sync exists, but it is strictly opt-in: signing in via Amazon Cognito is what unlocks cross-device restore, and it is never on the critical path for using the app.
This constraint drives most of the architecture. The front end is a static export that runs entirely client-side; the serverless back end only ever sees data from users who have explicitly signed in.
Architecture
Browser (PWA / localStorage)
│
├─ Next.js 16 (static export, basePath: /carequest)
│ └─ TypeScript 5 · React 19 · Tailwind CSS 4
│
├─ Service Worker (offline support; git-SHA version injected at build)
│
└─ AWS CloudFront ── S3
│
└─ [opt-in, sign-in only]
API Gateway ── Lambda ── DynamoDB
Amazon Cognito (user pool auth)
The static site ships from S3 behind CloudFront. The service worker gives offline support and pins a build version by injecting the git SHA at build time, so a stale cache is diagnosable in the field. Signed-in traffic flows through API Gateway (Cognito authorizer) into a Lambda + DynamoDB path for sync.
Infrastructure as Code
The entire back end is provisioned with AWS CDK v2 (infra/) — nothing is clicked together in the console. A cdk synth produces:
- Amazon Cognito user pool for authentication
- DynamoDB table with point-in-time recovery enabled
- API Gateway with a Cognito authorizer and throttling (10 rps, burst 20)
- Lambda for the sync API
- 2× CloudWatch alarms and an AWS Budget ($10/mo) — cost and health guardrails baked into the stack
Tech stack
| Layer | Choice |
|---|---|
| Framework | Next.js 16 (static export) |
| Language | TypeScript 5, React 19 |
| Styling | Tailwind CSS 4 |
| Auth / sync | Amazon Cognito + aws-amplify v6 |
| IaC | AWS CDK v2 |
| Unit tests | Vitest 4 |
| E2E tests | Playwright |
| CI | GitHub Actions |
Notable details
- Privacy by default. With no account, records never leave the device. The community “Candlelight” widget — a live count of how many caregivers logged today — is served from aggregated, anonymized data only; no individual record is ever exposed.
- Data portability. Users can export everything as JSON/CSV, and account/cloud deletion is self-serve from within the app.
- Tested and shipped. Vitest unit tests and Playwright E2E run in GitHub Actions; the same pipeline deploys the static export to S3/CloudFront.
Curious about the code? The repository is public: github.com/larai-w/carequest.
