> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vitasync.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The parts of VitaSync and what talks to what.

VitaSync is an app on your phone with an optional cloud backup behind it. This tab explains the mechanism for curious users and beta testers. It names methods where that helps.

```mermaid theme={null}
flowchart LR
  subgraph phone["Your Android phone"]
    direction TB
    app["VitaSync app"]
    store[("Encrypted local store")]
    hc["Health Connect"]
    st["Screen time<br/>(usage access)"]
    app --> store
    hc -. "read, with permission" .-> app
    st -. "read, with permission" .-> app
  end
  off["Open Food Facts<br/>food database"]
  app -. "search terms" .-> off
  subgraph cloud["Only after you turn on cloud backup"]
    db[("Your private account:<br/>entries and settings")]
  end
  store <-. "changed fields,<br/>in the background" .-> db
```

## Three ideas the design rests on

**Local first.** Every log is written to the phone at once. The app works with no connection. Cloud backup is a background copy, never a step in logging. See [Local first](/how-it-works/local-first).

**The day is the unit.** All your data hangs off one record per calendar day. Storage, backup and merging all work on days. See [A day of data](/how-it-works/a-day-of-data).

**Nothing leaves the phone unasked.** Uploading needs one recorded choice, made on this phone. That choice is never copied to the cloud, so restoring a backup cannot switch uploading back on. See [Privacy](/how-it-works/privacy).

## What is where

| Part | Where it runs | What it holds |
| - | - | - |
| VitaSync app | Your phone | Logging, Insights, Health Connect reading |
| Local store | Your phone | Every entry and setting, encrypted |
| Your account | Our server (Supabase) | A private copy of entries and settings, only once cloud backup is on |
| Food database | Open Food Facts | Foods and barcodes. It receives your search term, nothing else |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.