# Architecture Overview

There are two scenarios for how to integrate with us.

## Default integration path

<figure><img src="https://3312294284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTEAuEVJ58LXgvhHb6vIT%2Fuploads%2F5OPIHijhiOizAuAXhLkc%2Farchitecture.png?alt=media&#x26;token=c48ed472-d990-462a-ac6f-428dce7bf7d7" alt="Integration Architecture"><figcaption></figcaption></figure>

GeroSense API assumes server-to-server communication, which usually involves three main elements:

* `Your client application` is something that your users interact with. Usually, a mobile app that has access to users' health data via Apple HealthKit, Health Connect, or any other health data provider.
* `Your API server` is a backend that acts as a proxy between your client application and the GeroSense API. Its responsibilities include authenticating users, sending their health data to GeroSense API, and receiving and caching results from it.
* `GeroSense API` is an API service that we provide to calculate users' health metrics like biological age and resilience based on their longitudinal health data, like a history of steps or heart rate measurements. To send requests to the GeroSense API, you must get authentication credentials from us.

Read [gerosense-api-reference](https://developer.gerosense.ai/gerosense-api-reference "mention") if you prefer this option.

## Integrate via Docker image instead of updating your API

If you use JWT-based authentication, there is a simplified integration path. Instead of updating your API server,  you can host our [premade Docker image](https://hub.docker.com/repository/docker/gerosense/api-proxy/general) as a proxy. It will confirm your users' identity and handle token-based authentications with our API. In this case, you only need to update your mobile application to work directly with the proxy.

<figure><img src="https://3312294284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTEAuEVJ58LXgvhHb6vIT%2Fuploads%2Fi3Dz8A9t5NyLWvbhXCqu%2FArchitecture-Docker.png?alt=media&#x26;token=871f8ebe-d6d3-4a9b-918e-3b1f4bdf4bf5" alt=""><figcaption></figcaption></figure>

If you use third-party authentication services like **Firebase** or **Supabase**, this is a recommended way of integrating with us.

Read [gerosense-api-proxy-reference](https://developer.gerosense.ai/gerosense-api-proxy-reference "mention") if you prefer this option.
