Skip to content

Commit e303870

Browse files
committed
docs: clarify data storage — what syncs to cloud vs local-only
1 parent 068ba24 commit e303870

2 files changed

Lines changed: 35 additions & 15 deletions

File tree

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,31 @@ AutiSense/
199199

200200
---
201201

202-
## Privacy Architecture
202+
## Data Architecture
203+
204+
### What's stored where
205+
206+
| Data | Storage | Syncs to Cloud? | Cross-Device? |
207+
|------|---------|-----------------|---------------|
208+
| **Screening sessions** | IndexedDB → DynamoDB | Yes (opt-in, anonymized) | Yes (after sync) |
209+
| **Biomarker scores** | IndexedDB → DynamoDB | Yes (opt-in, anonymized) | Yes (after sync) |
210+
| **User account** | DynamoDB | Always (Google OAuth) | Yes |
211+
| **Game progress & scores** | IndexedDB only | No | No |
212+
| **Daily streaks** | IndexedDB only | No | No |
213+
| **Weekly reports** | IndexedDB only | No | No |
214+
| **Chat history** | IndexedDB only | No | No |
215+
| **Child profiles** | IndexedDB only | No | No |
216+
| **Difficulty levels** | localStorage only | No | No |
217+
218+
> **Note**: Game progress, streaks, and weekly reports are stored locally in the browser only. Switching devices or clearing browser data will reset this data. This is by design -- game activity data never leaves the device.
219+
220+
### Privacy architecture
203221

204222
AutiSense follows a **zero-egress screening** model:
205223

206224
1. **On-device inference** -- All 4 AI models (YOLO, BodyTCN, FER+, FaceTCN) run in a Web Worker via ONNX Runtime Web. No video frames, keypoints, or inference results are transmitted to any server.
207-
2. **Local-first storage** -- All screening data lives in IndexedDB (Dexie). The app works fully offline.
208-
3. **Opt-in cloud sync** -- An explicit consent checkbox at Step 10 controls whether anonymized biomarker scores are synced to DynamoDB. Child names are stripped before upload.
225+
2. **Local-first storage** -- All game and screening data lives in IndexedDB (Dexie). The app works fully offline.
226+
3. **Opt-in cloud sync** -- Only anonymized screening sessions and biomarker scores are synced to DynamoDB. Child names are stripped before upload. Game activity stays local.
209227
4. **Cloud AI enrichment** -- Only aggregated biomarker scores (not raw data) are sent to Amazon Bedrock for report generation. This step is optional and has template-based fallbacks.
210228
5. **Data expiry** -- DynamoDB records have a 365-day TTL and auto-expire.
211229

docs/DOCS.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -406,18 +406,20 @@ All API routes have **mock fallbacks** — the app works without AWS credentials
406406

407407
### IndexedDB Schema (Dexie v5)
408408

409-
| Table | Primary Key | Indexes | Purpose |
410-
|-------|-------------|---------|---------|
411-
| `sessions` | `id` | `userId`, `createdAt`, `synced`, `status` | Screening sessions |
412-
| `biomarkers` | `++id` (auto) | `sessionId`, `userId`, `timestamp`, `taskId` | Per-task biomarker data |
413-
| `syncQueue` | `++id` (auto) | `sessionId`, `queuedAt`, `retryCount` | Offline sync queue |
414-
| `childProfiles` | `id` | `userId`, `createdAt` | Child profiles |
415-
| `feedPosts` | `++id` (auto) | `userId`, `createdAt` | Community feed posts |
416-
| `feedReactions` | `++id` (auto) | `[postId+userId+type]`, `postId`, `userId` | Per-user reaction tracking |
417-
| `gameActivity` | `++id` (auto) | `childId`, `date`, `gameId` | Game session records |
418-
| `streaks` | `childId` || Daily play streak tracking |
419-
| `weeklyReports` | `++id` (auto) | `childId`, `weekStart` | Weekly progress summaries |
420-
| `chatHistory` | `++id` (auto) | `childId`, `createdAt` | AI chat conversations |
409+
> **Important**: All IndexedDB data is stored in the user's browser only. Game progress, streaks, weekly reports, and chat history do NOT sync to the cloud. Switching devices or clearing browser data resets this data. Only `sessions` and `biomarkers` sync to DynamoDB (opt-in, anonymized).
410+
411+
| Table | Primary Key | Indexes | Syncs to Cloud? |
412+
|-------|-------------|---------|-----------------|
413+
| `sessions` | `id` | `userId`, `createdAt`, `synced`, `status` | **Yes** (opt-in, anonymized) |
414+
| `biomarkers` | `++id` (auto) | `sessionId`, `userId`, `timestamp`, `taskId` | **Yes** (opt-in, anonymized) |
415+
| `syncQueue` | `++id` (auto) | `sessionId`, `queuedAt`, `retryCount` | N/A (queue mechanism) |
416+
| `childProfiles` | `id` | `userId`, `createdAt` | **No** (local only) |
417+
| `gameActivity` | `++id` (auto) | `childId`, `date`, `gameId` | **No** (local only) |
418+
| `streaks` | `childId` || **No** (local only) |
419+
| `weeklyReports` | `++id` (auto) | `childId`, `weekStart` | **No** (local only) |
420+
| `chatHistory` | `++id` (auto) | `childId`, `createdAt` | **No** (local only) |
421+
| `feedPosts` | `++id` (auto) | `userId`, `createdAt` | **No** (unused — API serves feed) |
422+
| `feedReactions` | `++id` (auto) | `[postId+userId+type]`, `postId`, `userId` | **No** (unused — API serves feed) |
421423

422424
### Biomarker Fields
423425

0 commit comments

Comments
 (0)