Architecture
CareToSher is an iOS app backed by a small serverless API on AWS. Everything (the app, the API, the infrastructure and these docs) lives in one repository (ADR 0002).
- The iOS app is the only client. It signs in with Cognito and calls the API with the caregiver's ID token.
- API Gateway checks the token, then passes every request to one API Lambda written in Go.
- The generator Lambda runs once a day and writes the upcoming scheduled entries and on-duty stretches, so the API only has to read them.
- DynamoDB holds everything, one table per kind of record.
- AppConfig serves feature flags. SNS carries feedback emails and alarm emails. CloudWatch holds the logs and the alarms.
- caretosher.com is a static site (privacy, terms, support) on S3 and CloudFront.
There are two copies of everything in AWS: dev (each push to an open pull request deploys to it)
and prod (each merge to main deploys to it). See Infrastructure.
The repository
| Folder | What it is | Page |
|---|---|---|
api/ | The Go HTTP API and its acceptance scenarios | API |
ios/ | The SwiftUI app | iOS app |
services/generator/ | The daily generator Lambda | Generator |
shared/openapi/ | The API contract, the source of truth for the API's shape | Contract and codegen |
shared/types-go/, types-ts/, types-swift/ | Clients generated from the contract | Contract and codegen |
shared/go-common/ | Go code the API and generator share: entities, DynamoDB stores, config, logging, flags | API |
infra/ | AWS CDK in TypeScript: every AWS resource | Infrastructure |
web/site/ | The static caretosher.com pages | Website |
docs/ | This site, and the product spec (PRD.md) until it moves here | |
scripts/ | Checks for the screen catalog and these docs |