# Data Flow & Architecture Overview

## Purpose

This document provides a high-level view of how data flows from a partner system into Reach Reporting. It is designed to help both technical and non-technical teams align on system boundaries, responsibilities, and how the pieces fit together.

## Core Data Flow

### Partner System

- The partner owns the source data — typically financial, operational, or entity-related information.
- The partner’s system is the authoritative source, with data replicated in our system for use.


### Partner API (Hosted by Partner)

- The partner implements a set of standardized API endpoints defined by Reach Reporting.
- These endpoints expose data in a structured, accessible format.
- Data is read-only from Reach’s perspective.
- Authentication is required (e.g., token-based).
- No data is pushed from Reach to the partner.


### Reach Sync Layer

- Reach initiates secure API calls to pull data from the partner’s endpoints. Syncs occur:
  - Automatically during off-hours to avoid interfering with customer workflows.
  - Manually when triggered by the customer (subject to daily usage limits).
- The sync layer:
  - Handles authentication and logging.
  - Monitors for errors and retries when necessary.
  - Coordinates job scheduling.


### Reach Data Storage & Transformation

- Once data is pulled, it is stored securely within the Reach platform.
- Data is mapped to Reach’s internal data models for use across dashboards and reports.
- Data may be:
  - **Normalized**: aligning naming conventions or account structures.
  - **Formatted**: standardizing dates, currencies, or number formats.
  - **Enriched**: deriving additional values such as calculated fields, trend indicators, forecasted values, or AI-generated insights based on the raw source data.
- Errors or structural issues are flagged for internal review to ensure quality and consistency before reaching the customer interface.


### Customer Experience (Inside Reach Reporting)

Customers can now view and interact with their data through:

- Custom dashboards
- Financial reports
- Budgeting and forecasting tools
- AI-powered insights


## Ownership Summary

| Component | Responsible Party | Notes |
|  --- | --- | --- |
| Source Data | Partner | Original system of record remains on the partner’s infrastructure |
| API Hosting & Auth | Partner | Partner maintains the endpoints and secures them appropriately |
| API Specification | Reach | Reach defines and controls the structure of the integration |
| Sync Scheduling | Reach | Reach controls automated and manual sync logic and enforcement |
| Data Storage & Mapping | Reach | Data is stored within Reach and transformed for reporting use |
| Visualization & Display | Reach | Reach owns dashboarding, reporting, and user interface logic |
| Ongoing Maintenance | Shared | Partner maintains data availability and format; Reach manages syncs, transformation, and visualization logic |


## Notes

- Syncs are designed to run reliably and efficiently without interrupting primary partner workflows.
- Customers may trigger manual syncs, subject to fair-use limits per day.
- Data pulled from the partner API is stored securely in Reach's system to enable efficient rendering and historical reporting.