# rem0403/evie architecture

> Architecture diagram of the GitHub repository rem0403/evie, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rem0403/evie
- Repository: https://github.com/rem0403/evie

## Overview

EVIE is a shared, offline-capable care timeline for epilepsy and autism caregiving. Caregivers join a circle, record seizures or quick logs, and share entries with the circle; the timeline and care summary turn those records into handoffs and clinician-ready reports. Distinct product stages include circle setup and membership, seizure capture, everyday care logging, shared schedules and support, emergency/care-plan access, and reporting/export. The excerpts establish the app routing, key writes, Firebase persistence, and summary calculations; other README-described branches are represented at their documented subsystem paths, with relationships omitted where source evidence was unavailable.

Main entry points: [`src/data/entries.js`](https://github.com/rem0403/evie/blob/main/src/data/entries.js) (Entry records), [`src/App.jsx`](https://github.com/rem0403/evie/blob/main/src/App.jsx) (App navigation), [`src/screens/LogSeizure.jsx`](https://github.com/rem0403/evie/blob/main/src/screens/LogSeizure.jsx) (Seizure capture), [`src/screens/QuickLog.jsx`](https://github.com/rem0403/evie/blob/main/src/screens/QuickLog.jsx) (Quick logs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_circle["Circle &amp; access"]
  node_app["App navigation<br/>[App.jsx]"]
  node_setup["Circle setup<br/>[Setup.jsx]"]
  node_membership["Circle membership<br/>[circles.js]"]
end

subgraph group_capture["Care logging"]
  node_timeline["Shared timeline<br/>[Timeline.jsx]"]
  node_seizure["Seizure capture<br/>[LogSeizure.jsx]"]
  node_quicklog["Quick logs<br/>[QuickLog.jsx]"]
end

subgraph group_coordination["Care coordination"]
  node_careplan["Care plan<br/>[CarePlan.jsx]"]
  node_emergency["Emergency info<br/>[Emergency.jsx]"]
  node_schedule["Caregiver schedule<br/>[Schedule.jsx]"]
  node_handoff["Care handoff<br/>[Handoff.jsx]"]
  node_meds["Medication tracking<br/>[TodayMeds.jsx]"]
  node_goals["Goals &amp; practice<br/>[Goals.jsx]"]
  node_support["Support resources<br/>[Support.jsx]"]
end

subgraph group_insight["Summaries &amp; export"]
  node_summaryview["Doctor summary<br/>[Summary.jsx]"]
  node_analysis["Summary calculations<br/>[summary.js]"]
  node_export["PDF &amp; CSV export<br/>[export.js]"]
end

subgraph group_platform["Shared data layer"]
  node_auth["Sign-in &amp; sync<br/>[firebase.js]"]
  node_entries[("Entry records<br/>[entries.js]")]
  node_media[("Private attachments<br/>[clips.js]")]
end

node_caregiver(("Caregiver"))
node_firebase[("Firebase")]

node_caregiver -->|"opens app"| node_app
node_app -->|"ensures sign-in"| node_auth
node_app -->|"loads circle"| node_membership
node_caregiver -.->|"starts circle"| node_setup
node_setup -->|"creates circle"| node_membership
node_membership -->|"writes membership"| node_firebase
node_auth -->|"authenticates"| node_firebase
node_caregiver -.->|"starts timer"| node_seizure
node_seizure -.->|"saves seizure"| node_entries
node_seizure -->|"attaches clip"| node_media
node_caregiver -->|"records care"| node_quicklog
node_quicklog -->|"adds entry"| node_entries
node_quicklog -->|"saves attachments"| node_media
node_entries -->|"syncs records"| node_firebase
node_caregiver -.->|"views updates"| node_timeline
node_timeline -.->|"subscribes entries"| node_entries
node_caregiver -.->|"maintains plan"| node_careplan
node_caregiver -.->|"opens emergency info"| node_emergency
node_caregiver -.->|"plans coverage"| node_schedule
node_caregiver -.->|"takes over"| node_handoff
node_caregiver -.->|"logs dose"| node_meds
node_caregiver -.->|"tracks practice"| node_goals
node_caregiver -.->|"manages supports"| node_support
node_caregiver -.->|"requests report"| node_summaryview
node_summaryview -->|"calculates report"| node_analysis
node_analysis -.->|"provides metrics"| node_export
node_summaryview -->|"downloads report"| node_export
node_export -.->|"uses calculations"| node_analysis

click node_app "https://github.com/rem0403/evie/blob/main/src/App.jsx"
click node_setup "https://github.com/rem0403/evie/blob/main/src/screens/Setup.jsx"
click node_membership "https://github.com/rem0403/evie/blob/main/src/data/circles.js"
click node_auth "https://github.com/rem0403/evie/blob/main/src/firebase.js"
click node_timeline "https://github.com/rem0403/evie/blob/main/src/screens/Timeline.jsx"
click node_seizure "https://github.com/rem0403/evie/blob/main/src/screens/LogSeizure.jsx"
click node_quicklog "https://github.com/rem0403/evie/blob/main/src/screens/QuickLog.jsx"
click node_entries "https://github.com/rem0403/evie/blob/main/src/data/entries.js"
click node_media "https://github.com/rem0403/evie/blob/main/src/data/clips.js"
click node_careplan "https://github.com/rem0403/evie/blob/main/src/screens/CarePlan.jsx"
click node_emergency "https://github.com/rem0403/evie/blob/main/src/screens/Emergency.jsx"
click node_schedule "https://github.com/rem0403/evie/blob/main/src/screens/Schedule.jsx"
click node_handoff "https://github.com/rem0403/evie/blob/main/src/components/Handoff.jsx"
click node_meds "https://github.com/rem0403/evie/blob/main/src/components/TodayMeds.jsx"
click node_goals "https://github.com/rem0403/evie/blob/main/src/screens/Goals.jsx"
click node_support "https://github.com/rem0403/evie/blob/main/src/screens/Support.jsx"
click node_summaryview "https://github.com/rem0403/evie/blob/main/src/screens/Summary.jsx"
click node_analysis "https://github.com/rem0403/evie/blob/main/src/lib/summary.js"
click node_export "https://github.com/rem0403/evie/blob/main/src/lib/export.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_setup,node_membership toneBlue
class node_timeline,node_seizure,node_quicklog,node_firebase toneAmber
class node_careplan,node_emergency,node_schedule,node_handoff,node_meds,node_goals,node_support toneMint
class node_summaryview,node_analysis,node_export toneRose
class node_auth,node_entries,node_media,node_caregiver toneIndigo
```

## Components

### Circle & access

- [App navigation](https://github.com/rem0403/evie/blob/main/src/App.jsx): `src/App.jsx`
- [Circle setup](https://github.com/rem0403/evie/blob/main/src/screens/Setup.jsx): `src/screens/Setup.jsx`
- [Circle membership](https://github.com/rem0403/evie/blob/main/src/data/circles.js): `src/data/circles.js`

### Care logging

- [Shared timeline](https://github.com/rem0403/evie/blob/main/src/screens/Timeline.jsx): `src/screens/Timeline.jsx`
- [Seizure capture](https://github.com/rem0403/evie/blob/main/src/screens/LogSeizure.jsx): `src/screens/LogSeizure.jsx`
- [Quick logs](https://github.com/rem0403/evie/blob/main/src/screens/QuickLog.jsx): `src/screens/QuickLog.jsx`

### Care coordination

- [Care plan](https://github.com/rem0403/evie/blob/main/src/screens/CarePlan.jsx): `src/screens/CarePlan.jsx`
- [Emergency info](https://github.com/rem0403/evie/blob/main/src/screens/Emergency.jsx): `src/screens/Emergency.jsx`
- [Caregiver schedule](https://github.com/rem0403/evie/blob/main/src/screens/Schedule.jsx): `src/screens/Schedule.jsx`
- [Care handoff](https://github.com/rem0403/evie/blob/main/src/components/Handoff.jsx): `src/components/Handoff.jsx`
- [Medication tracking](https://github.com/rem0403/evie/blob/main/src/components/TodayMeds.jsx): `src/components/TodayMeds.jsx`
- [Goals & practice](https://github.com/rem0403/evie/blob/main/src/screens/Goals.jsx): `src/screens/Goals.jsx`
- [Support resources](https://github.com/rem0403/evie/blob/main/src/screens/Support.jsx): `src/screens/Support.jsx`

### Summaries & export

- [Doctor summary](https://github.com/rem0403/evie/blob/main/src/screens/Summary.jsx): `src/screens/Summary.jsx`
- [Summary calculations](https://github.com/rem0403/evie/blob/main/src/lib/summary.js): `src/lib/summary.js`
- [PDF & CSV export](https://github.com/rem0403/evie/blob/main/src/lib/export.js): `src/lib/export.js`

### Shared data layer

- [Sign-in & sync](https://github.com/rem0403/evie/blob/main/src/firebase.js): `src/firebase.js`
- [Entry records](https://github.com/rem0403/evie/blob/main/src/data/entries.js): `src/data/entries.js`
- [Private attachments](https://github.com/rem0403/evie/blob/main/src/data/clips.js): `src/data/clips.js`

### Other components

- **Caregiver**
- **Firebase**

## Connections

- Caregiver → App navigation: opens app (evidence: `src/App.jsx`)
- App navigation → Sign-in & sync: ensures sign-in (evidence: `src/App.jsx`)
- App navigation → Circle membership: loads circle (evidence: `src/App.jsx`)
- Caregiver → Circle setup: starts circle
- Circle setup → Circle membership: creates circle (evidence: `src/screens/Setup.jsx`)
- Circle membership → Firebase: writes membership (evidence: `src/data/circles.js`)
- Sign-in & sync → Firebase: authenticates (evidence: `src/firebase.js`)
- Caregiver → Seizure capture: starts timer
- Seizure capture → Entry records: saves seizure (evidence: `src/screens/LogSeizure.jsx`)
- Seizure capture → Private attachments: attaches clip (evidence: `src/screens/LogSeizure.jsx`)
- Caregiver → Quick logs: records care (evidence: `src/screens/QuickLog.jsx`)
- Quick logs → Entry records: adds entry (evidence: `src/screens/QuickLog.jsx`)
- Quick logs → Private attachments: saves attachments (evidence: `src/screens/QuickLog.jsx`)
- Entry records → Firebase: syncs records (evidence: `src/data/entries.js`)
- Caregiver → Shared timeline: views updates
- Shared timeline → Entry records: subscribes entries
- Caregiver → Care plan: maintains plan
- Caregiver → Emergency info: opens emergency info
- Caregiver → Caregiver schedule: plans coverage
- Caregiver → Care handoff: takes over
- Caregiver → Medication tracking: logs dose
- Caregiver → Goals & practice: tracks practice
- Caregiver → Support resources: manages supports
- Caregiver → Doctor summary: requests report
- Doctor summary → Summary calculations: calculates report (evidence: `src/screens/Summary.jsx`)
- Summary calculations → PDF & CSV export: provides metrics (evidence: `src/lib/export.js`)
- Doctor summary → PDF & CSV export: downloads report (evidence: `src/screens/Summary.jsx`)
- PDF & CSV export → Summary calculations: uses calculations (evidence: `src/lib/export.js`)
