> For the complete documentation index, see [llms.txt](https://codifi-fdm.gitbook.io/codifi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codifi-fdm.gitbook.io/codifi-docs/cross-platform-features/hydra.md).

# Hydra

How Codifi's offline-first sync engine keeps your data safe in the field and instantly available across every platform.

**Hydra is Codifi's offline-first sync engine.** Every change a field crew makes — every Record edited, every photo attached, every map drawn — becomes an event in a local database first, then flows out to every other device and the server when connectivity allows. It's the reason you can hand an iPad to a surveyor in a dead zone and trust that nothing they capture will be lost.

> **Hydra moves the water. Ripple computes the waves.**
>
> Where [Ripple](/codifi-docs/cross-platform-features/ripple.md) is the formula engine that gives Codifi its in-form intelligence, Hydra is the data engine that gives Codifi its sync, history, and resilience. Together they're the two proprietary technologies that make Codifi different from a typical form-builder app.

***

## What Hydra Does

| Capability                     | What it means for field teams                                                                                                                                                                                                 |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **True offline-first**         | Records, media, and edits save to a local SQLite database on the device the moment they're created. The app does not "remember" them in memory and try to push later — they're already on disk before you put the iPad away.  |
| **Event-sourced sync**         | When connectivity returns, Hydra syncs only the changes (events), not the entire Project. A six-week-old Project with 10,000 Records syncs the day's 50 edits in seconds, not minutes.                                        |
| **Cross-platform consistency** | The same Hydra event format flows between mobile and web. A change made on the iPad in the field appears on the project manager's web dashboard moments after the cloud icon turns green — and vice versa.                    |
| **Full activity history**      | Every event Hydra processes carries who made it, when, on which platform (mobile / web / system), and from where (local capture or server). The Activity tab on every Project and Record is built straight from this history. |
| **Resilience**                 | If an iPad crashes mid-sync, Hydra picks up exactly where it left off when the app reopens. No partial uploads, no duplicate Records, no lost edits.                                                                          |

***

## Why It Matters

Most field-data tools claim to work offline. Most actually mean *the form will load offline; you'll lose data if you don't reconnect within X hours*. Hydra is built differently: **every change is a durable event from the moment it's captured.**

The practical consequences:

* **Crash recovery is a non-event.** If your iPad reboots in the middle of a Record, that Record's data is already in Hydra's local database. Open the app, the Record is there.
* **Long-duration offline work is supported, not tolerated.** Multi-day backcountry Projects don't degrade with time offline. The 47th day of offline capture syncs the same way as the first hour.
* **You don't have to choose between "save now" and "save fast."** Hydra writes locally in milliseconds, then handles the heavier server upload in the background. Surveyors don't experience the field-data sync stutter that plagues other apps.
* **The activity audit trail is automatic.** Reviewers and PIs can see every change made to a Record, who made it, on which platform, and when. No separate logging system, no opt-in switch.

***

## Faster in v3.3

Hydra's sync path was substantially rebuilt for v3.3. There is nothing new to configure and nothing to learn. It is simply quicker.

The difference is most obvious in the two places it used to hurt: the first download of a large Project, and coming back after a long stretch offline. Both move considerably faster than they did.

Two related changes in v3.3 build on the same engine:

* [**Nearby Sync**](/codifi-docs/mobile-app/getting-in-the-field/nearby-sync.md) lets devices exchange work directly with each other in the field, with no internet involved. It uses the same conflict handling as Cloud syncing, so two people editing the same Record behaves exactly as it always has.
* **Shared devices are handled more carefully.** Where several people use the same iPad, each person's work is now attributed and secured to them individually rather than to the device.

***

## Where You See Hydra in the App

Hydra is mostly invisible — that's by design. But two surfaces let you see it working:

1. **The Cloud icon in the navigation bar** — Hydra's sync status. Green checkmark = local database matches the server. Animated cloud = events are flowing. Red error = no connection or sync paused. See [Syncing & the Cloud Icon](/codifi-docs/mobile-app/getting-in-the-field/syncing-and-the-cloud-icon.md) for the full reference.
2. **Project and Record Activity timelines** — every entry on a Project's or Record's Activity tab is a Hydra event, rendered with who, what, when, and from which platform. Tap an entry to drill in.

***

## Pairs With Ripple

Hydra and Ripple are designed to work together. A typical Record write goes:

1. **User enters a value** in a field on the iPad.
2. **Ripple evaluates** any dependent calculated fields and visibility rules — instantly, locally, no network call.
3. **Hydra commits** the user's value (and any Ripple-computed values) as a durable event in local SQLite.
4. **The event syncs** to the server when the connection allows, and from there to every other platform.

Both engines run on every platform Codifi supports — mobile, web, and the backend — so the same evaluation and sync semantics hold whether you're in the field on an iPad or reviewing a Project from a desktop browser.

[**→ Learn more about Ripple**](/codifi-docs/cross-platform-features/ripple.md)

***

## Frequently Asked Questions

**How is this different from regular sync?** Most "offline mode" apps queue changes in memory or in a basic local cache, then push them as a single bulk operation when reconnecting. If anything goes wrong — crash, app update, version mismatch — you can lose everything in the queue. Hydra writes every change as a discrete event to a local SQLite database immediately. There's no queue to lose; there's a database that already has the event.

**Does Hydra work without an internet connection?** Yes — fully. The Codifi mobile app reads from and writes to the local Hydra database for every operation. The server is consulted when it's reachable, and ignored when it isn't.

**What happens if two devices edit the same Record offline?** Each device captures its events independently. When both come back online, Hydra reconciles the events in timestamp order. Most edits don't actually conflict (different fields on the same Record, for example, are independent). For genuine conflicts on the same field, the most recent timestamp wins, with the older value preserved in the activity history so reviewers can see both.

**Where is the data stored on my device?** Inside the Codifi app's sandboxed storage on iOS. It's not in the iOS Files app and it's not visible to other apps. When you uninstall Codifi, the local Hydra database goes with it — so always confirm your green cloud icon before uninstalling.

**Can I see the raw events?** The user-facing view is the Activity timeline on each Project and Record. The raw event log isn't exposed in the app UI; if you have a need to inspect events directly, contact your Project administrator.

***

## See Also

* [Ripple](/codifi-docs/cross-platform-features/ripple.md) — the formula engine
* [Syncing & the Cloud Icon](/codifi-docs/mobile-app/getting-in-the-field/syncing-and-the-cloud-icon.md) — how to read the sync indicator that Hydra drives
* [Glossary](/codifi-docs/glossary.md) — definitions of every Codifi term you'll encounter
