Skip to Content
LearnIntroduction

Introduction

What is Gluonic?

Gluonic is an offline-first synchronization engine for React and React Native applications. It handles data synchronization between your app and server, providing offline support, real-time updates, and optimistic UI out of the box.

What makes it unique: A synchronous data access API that eliminates loading states and complex async patterns while maintaining all the benefits of a full-featured sync engine.

Core Sync Engine Features

Offline-First Architecture

Your app works perfectly without network. Data is stored in a local database first, then synced to the server in the background when connected.

Optimistic Updates

UI updates instantly when users make changes. No waiting for server confirmation - changes apply immediately and sync in the background with automatic rollback on errors.

Real-Time Synchronization

Changes from other users appear instantly via WebSocket. Efficient delta synchronization transmits only what changed.

Durable Transaction Queue

Pending changes survive app restarts. Automatic retry logic handles network failures gracefully.

Conflict Resolution

Handles concurrent updates with version-based conflict detection and automatic resolution.

Unique: Synchronous Data Access

Unlike typical sync engines, Gluonic provides a synchronous API for accessing async data. Choose between two patterns:

Progressive Enhancement

// Handle loading inline - data appears as it loads const TaskList = observer(() => { const tasks = useCollectionModels<Task>('task') return tasks.map(task => ( <TaskRow task={task} assignee={task.assignee.value?.name ?? 'Unassigned'} /> )) })

Guaranteed Data with Suspense

// Suspense handles loading - data guaranteed in component <Suspense fallback={<Spinner />}> <TaskList /> </Suspense> const TaskList = observer(() => { const tasks = useCollectionModels<Task>('task') return tasks.map(task => ( <TaskRow task={task} assignee={task.assignee.suspense.name} // No optionals! /> )) })

Both approaches avoid async/await and promises in your component logic - that’s what makes them “synchronous”.

How it works:

  • Data loads on-demand (lazy loading)
  • Returns immediately (synchronous access)
  • MobX updates UI when data arrives
  • You choose: handle inline or use Suspense

Additional Unique Features

Object Graph

Connected model instances that automatically stay in sync. Navigate relationships naturally without manual joins or queries.

Reactive Models

MobX-powered reactive models. Components automatically re-render when data changes - no manual state management.

Lazy Loading

Relationships load on-demand in the background. Access triggers automatic hydration from local storage or network.

Identity Mapping

Same data ID always returns the same object instance. Enables efficient React rendering with referential equality.

Who is Gluonic For?

Gluonic is perfect for:

  • Mobile apps that need offline support
  • Collaborative tools with real-time updates
  • Field apps used in low-connectivity environments
  • B2B SaaS requiring self-hosted infrastructure
  • Consumer apps needing instant UI responsiveness

Technology Stack

Server

  • Works with Prisma, Drizzle, TypeORM, or custom database adapters
  • Supports PostgreSQL, MySQL, MongoDB, SQLite
  • Standard Node.js server (Fastify-based)
  • Self-hosted on your infrastructure

Client

  • Drizzle adapter for local storage (currently supported)
  • Works on React Native (via OP-SQLite) and Web (via better-sqlite3)
  • Universal codebase - write once, run everywhere
  • Full TypeScript support with decorators

How Does It Compare?

FeatureGluonicInstantDBConvexReplicache
Sync Engine✅ Full-featured✅ Full-featured✅ Full-featured✅ Full-featured
Offline-First✅ Built-in✅ Built-in✅ Built-in✅ Built-in
Synchronous API✅ Two patterns❌ Async hooks❌ Async hooks❌ Async queries
Self-Hosted✅ Yes❌ Cloud only❌ Cloud only✅ Yes
Database Agnostic✅ Yes (server)❌ Postgres only❌ Proprietary✅ Yes
React Native✅ First-class❌ No✅ Yes❌ Web only
Setup ComplexityMedium (35 lines)Low (10 lines)Low (15 lines)High (100+ lines)

Design Philosophy

Sync engine first: Gluonic is a complete sync engine with offline support, real-time updates, optimistic UI, and all the features you expect from a production sync solution.

Synchronous DX: What makes Gluonic unique is how you access synchronized data. Instead of async/await patterns everywhere, you get a synchronous API with two levels of control (progressive or Suspense).

Production-ready patterns: Inspired by proven sync engine architectures used in production applications serving millions of users.

Database agnostic: Use any database on the server (Prisma, TypeORM, Drizzle, MongoDB, etc.). Client uses Drizzle adapter for local storage.

Next Steps

Last updated on