Snoraire · as built on the team’s main code, 22 October · status updated 29 October 2026
How Snoraire runs, and how a change reaches users.
In short
The phone does the heavy lifting. Recording and analysing a night happen on the phone, even offline. The server signs people in and keeps their results.
Every change is checked automatically. Before code is merged it is formatted, checked, tested, built, scanned for leaked passwords and for known security weaknesses, and its database changes are rehearsed.
Releases are repeatable and reversible. The same pipeline deploys the server and builds the app. If a new server version fails its check, it rolls back automatically.
Test and live are separate. Staging and production have their own server, database, passwords and app builds.
The system at a glance
The app talks to one Snoraire service on AWS. That service uses AWS for passwords, stored versions, logs and alarms, and outside services for the database, file storage and email. Alarms reach the team on Telegram through the relay service. Dashed box: planned.
Each part and the AWS service behind it
Part
AWS service
What it does
Snoraire service
AWS Lambda (container, Arm) with a Function URL
The app’s server: sign-in and email login codes, saving and restoring results, and research uploads. It runs only when called, so idle time costs almost nothing. Sign-in used to be a separate service and was merged into this one.
Relay service
AWS Lambda (container, Arm)
Receives alarms and deployment events and posts them to the team’s Telegram channels.
Server versions
Amazon ECR
Stores each built server version. The last 5 are kept so a bad release can be rolled back.
Passwords and keys
AWS Secrets Manager
Holds the database password, email key, storage keys and sign-in secret, separately for staging and production.
Logs and alarms
Amazon CloudWatch
Keeps server logs and raises an alarm when errors spike.
Alert routing
Amazon EventBridge + SQS
Sends alarms to the relay service. A holding queue (dead-letter queue) keeps any alert that fails to send.
Infrastructure records
Amazon S3
Stores the encrypted record of what has been set up in each environment, with locking so two changes can’t clash.
Access control
AWS IAM with GitHub sign-in (OIDC)
The pipeline gets short-lived, narrowly limited access for each job. No permanent AWS keys are stored in GitHub.
From code change to users: the CI/CD pipeline
CI (continuous integration) checks every change automatically. CD (continuous delivery) deploys a checked change in the same way every time.
A change is checked automatically, merged, then released to the server and to the app stores’ test tracks from the same code version. Staging server releases run on merge; production and app builds run on request.
Pipeline
When it runs
What it does
Develop CI
Every pull request and merge, plus a daily run
All the automatic checks in step 2. A change cannot merge until they pass.
Snoraire mobile
Every pull request
Publishes a preview of the app change with EAS Update and runs the native smoke tests.
Infrastructure
Pull requests that change AWS setup; apply by hand
Shows the planned AWS changes, then applies them only after someone confirms.
Staging CD
Merge to the main code; production on request
The full release in step 3: database changes, server deploy with rollback and relay deploy. App builds for the stores run when requested, only after the server release passes.
Device smoke
On request
Installs and starts the latest test build on a real Android phone.
Release notes
After checks pass on the release branch
Creates version numbers and change notes automatically (release-please).
Three versions of the app: staging, research and production
The same code produces three separate versions of the app. Each has its own name on the phone, its own update channel and its own store listing, so research code can never reach ordinary users by accident.
Staging
Research
Production
Purpose
Testing the next release
Collecting overnight audio, with consent, to improve the snore analysis
The real app for beta testers and, later, the public
Who gets it
The team and testers
Internal research participants only; never sold in a store
Beta testers, then everyone
Server it talks to
Staging
Staging
Production
Uploads sound recordings?
No
Yes, to the research audio store
No
How it is installed
TestFlight and Google Play internal testing
Direct install on registered test phones
TestFlight and Google Play internal now; App Store and Google Play at launch
Latest build
Version 0.1.8 and newer
17 October (iPhone and Android, version 0.1.8)
Android 4 and 6, iPhone 8 (19–20 October)
Status
Running
Partly set up Builds work. The store-testing version (TestFlight and Play) is set up in code but its Apple app record has not been created yet, and no automated release pipeline exists for it.
Running
The September cloud design proposed a different route: one ordinary app with research switched on per person after consent. The team later chose a separate research app instead, which keeps audio collection out of the ordinary app entirely.
Environments
Environment
Who uses it
Server
App builds
Development
Engineers
A developer’s own computer
Development builds on engineers’ phones
Preview
Reviewers of a change
Staging
EAS Update preview per pull request
Research
Internal research participants
Staging server; audio to the research store
Separate research app, installed directly on test phones
Staging (test)
The team and testers
AWS Lambda, staging database and storage
TestFlight and Play internal testing
Production (live)
Beta testers, then the public
AWS Lambda, production database and storage
TestFlight and Play internal now; App Store and Google Play at launch
Outside services
Service
Used for
Notes
Expo (EAS)
Building the iPhone and Android apps (Build), sending them to the stores (Submit), app previews (Update) and running the app release steps (Workflows)
Builds come straight from the shared code, not a laptop.
Apple App Store Connect / TestFlight
iPhone test distribution, then App Store release
Store listing is at “Prepare for Submission”.
Google Play Console
Android internal testing, then Play release
Internal testing submission succeeded on 20 October.
GitHub and GitHub Actions
Code, reviews and all automated pipelines
Jobs run on in-house build machines; outside contributions use GitHub’s own machines.
Neon
The Postgres database
Separate staging and production databases. Where it physically stores data is still to confirm.
Cloudflare R2
File storage for consented research audio
Separate staging and production storage. Data location still to confirm.
Resend
Sending email login codes
Login email received in production on 19 October.
PostHog
Crash and usage tracking from the app
Production settings saved; real-phone events still to confirm.
Telegram
Team alerts: operations, business and support
Delivery of live alerts still to confirm.
Zoho CRM
Care-team callback requests
Planned Singapore access in place; Malaysia access pending.
What is running today
Area
Status
Still to do
Automatic checks
Running On every change since mid-October.
—
Staging server
Running Sign-in, sign-out and recovery from a failed update checked on 13 October.
Confirm the newest version is deployed; test on real phones.
Production server
Running since 19 October. Health checks, sign-in, sign-out, file storage and login email passed.
Test rolling back to an older version; confirm usage events from a real phone.
App store builds
Done Android builds 4 and 6 and iPhone build 8 (19–20 October). Android in Play internal testing; iPhone in TestFlight.
Store listings, screenshots and review before public release.
Saving and restoring results
Designed V1 has accounts with email login codes (decided 26 October).
Build the results database and routes; test saving, restoring and deleting on real phones.
Research audio uploads
Designed Not switched on.
Consent checks and an off switch before any audio is collected.
App updates without a store release
Previews only Used for pull request previews.
Decide whether to use them for live users.
Safety and reliability
All traffic and stored data are encrypted. Passwords and keys live in AWS Secrets Manager, separately for staging and production.
The pipeline signs in to AWS with short-lived access for each job; nothing permanent is stored in GitHub.
Logs never contain sound recordings, health results, login tokens or consent details.
A failed server release rolls back automatically. Database backups are proven by restoring them.
Speed target: everyday actions under 2 seconds; the first request after a quiet spell under 5 seconds.
Still to decide with Easmed
How long results and audio are kept, and how deleting an account works.
Who is on call for the live system, with a backup.
Where Neon and Cloudflare physically store data. Choosing Singapore for AWS does not decide this.
The expected peak number of users, and a monthly cost limit.
Snoraire running costs
Current Easmed AWS spending comes from the daily billing snapshot. The six-month forecast models 100, 1,000 and 10,000 monthly users. Peak load, recovery and support still need validation before we set a budget.
Built from the team’s main code as of 22 October 2026 (pipeline files, AWS setup and Expo configuration), the Airese AWS API and cloud sync spec (17 September, updated 26 October), and the deployment records of 13, 19 and 20 October. Account numbers, web addresses, app IDs and other internal identifiers are left out on purpose. The 18 November 2026 v4 workbook extends the AWS, Neon and Base44 model with peak-load costs and a service guide.