R2D1 / DOCS

Choose the backends. Then use one API.

Start with the two backend roles. A DocumentStore owns complete documents; an IndexStore owns the fields used for indexed lookup. After both are configured, the collection API is shared across every pairing.

COMMON API

The usage stays the same.

Getting Started

Set up both backend roles, define a document, and run the first indexed query.

Start the common path →

Core Concepts

Understand collections, metadata, authoritative documents, indexes, and cursors.

Read Core Concepts →

Querying

Filter indexed fields, apply one sort, and continue with opaque cursor pagination.

Read Querying →

Consistency and Recovery

Handle partial failures and rebuild the derived index from authoritative documents.

Read Consistency →
PUBLIC MODULES

The four published artifacts.

CORE + CLOUDFLARE

R2D1

dev.nexcraft:r2d1

Common API plus R2 and D1 adapters.

Configuration →
INDEX STORE

R2D1-JDBC

dev.nexcraft:r2d1-jdbc

H2, HSQLDB, and local SQLite index support.

JDBC setup →
DOCUMENT STORE

R2D1-FILESYSTEM

dev.nexcraft:r2d1-filesystem

Canonical local document files.

Filesystem setup →
FRAMEWORK INTEGRATION

R2D1-MICRONAUT

dev.nexcraft:r2d1-micronaut

Micronaut 5 bean and resource integration.

Micronaut setup →
DOCUMENTATION BOUNDARY

Examples follow the current code.

Backend pages explain vendor setup and ownership. The common API pages explain how to define, mutate, query, and recover collections without changing those backend choices.