
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@aws-amplify/datastore
Advanced tools
INTERNAL USE ONLY
This package contains the AWS Amplify DataStore category and is intended for internal use only. To integrate Amplify into your app, please use aws-amplify.
Amplify DataStore provides a programming model for leveraging shared and distributed data without writing additional code for offline and online scenarios, which makes working with distributed, cross-user data just as simple as working with local-only data.
| package | version | open issues | closed issues |
|---|---|---|---|
| @aws-amplify/datastore |
Please update these docs any time you find something that is incorrect or lacking. In particular, if a line in the docs prompts a question, take a moment to figure out the answer, then update the docs with the necessary detail.
Before you start reading through these docs, take a moment to understand how DataStore works at a high level. Additionally, we recommend first reading through docs.amplify.aws. The purpose of these docs is to dive deep into the codebase itself and understand the inner workings of DataStore for the purpose of contributing. Understanding these docs is not necessary for using DataStore. Lastly, before reading, take a look at the diagrams below.
Note: relationships with dotted lines are explained more in a separate diagram.
flowchart TD
%% API and Storage
api[[DS API]]-- observe -->storage{Storage Engine}
storage-- next -->adapter[[Adapter]]
adapter-->db[[Local DB]]
db-->api
sync[[Sync Engine*]]-.-storage
sync-.-appSync[(AppSync)]
Note: All green nodes belong to the Sync Engine.
* Merger first checks outbox
** Outbox sends outgoing messages to AppSync
flowchart TD
subgraph SyncEngine
index{index.ts}-- observe -->reach[Core reachability]
subgraph processors
mp[Mutation Processor]
sp[Subscription Processor]
syp[Sync Processor]
end
reach--next-->mp[Mutation Processor]
reach--next-->sp[Subscription Processor]
reach--next-->syp[Sync Processor]
subgraph outbox / merger
outbox[Outbox]
merger[Merger]
outbox---merger
end
end
api[DS API]-.->storage
mp-- 1. observe -->storage{Storage Engine}
storage-- 2. next -->merger[merger*]-- next -->storage
sp-- observe -->appsync[(AppSync)]
appsync-- next -->sp
syp---appsync
mp-->outbox[outbox**]
appsync<--->outbox
%% styling
classDef syncEngineClass fill:#8FB,stroke:#333,stroke-width:4px,color:#333;
class index,mp,sp,syp,merger,outbox syncEngineClass;
amplify-js/packages/datastore/src βββ authModeStrategies β βββ defaultAuthStraegy.ts β βββ index.ts β βββ multiAuthStrategy.ts βββ datastore β βββ datastore.ts # Entry point for DataStore βββ predicates β βββ index.ts β βββ sort.ts βββ ssr βββ storage # Storage Engine β βββ adapter # Platform-specific Storage Adapters β βββ getDefaultAdapter β βββ AsyncStorageAdapter.ts β βββ AsyncStorageDatabase.ts β βββ index.ts β βββ IndexedDBAdapter.ts β βββ InMemoryStore.native.ts β βββ InMemoryStore.ts β βββ storage.ts # Entry point for Storage βββ sync # Sync Engine β βββ dataStoreReachability β βββ index.native.ts β βββ index.ts β βββ processors # Sync Engine Processors β βββ mutation.ts β βββ subscription.ts β βββ sync.ts β βββ datastoreConnectivity.ts # Subscribe to reachability monitor β βββ index.ts # Entry point for Sync Engine β βββ merger.ts # doc β βββ outbox.ts # doc
redux-persist is a library that allows you to save the Redux store in persistent storage, such as local storage. It provides offline capabilities but lacks the real-time synchronization and conflict resolution features of @aws-amplify/datastore.
Dexie is a wrapper for IndexedDB, providing a more straightforward API for managing local databases. While it offers offline storage, it does not provide built-in real-time synchronization or integration with cloud services like @aws-amplify/datastore.
PouchDB is an open-source JavaScript database that syncs with CouchDB. It offers offline-first capabilities and real-time synchronization, similar to @aws-amplify/datastore, but requires a CouchDB server for cloud synchronization.
FAQs
AppSyncLocal support for aws-amplify
The npm package @aws-amplify/datastore receives a total of 794,634 weekly downloads. As such, @aws-amplify/datastore popularity was classified as popular.
We found that @aws-amplify/datastore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authoritiesβ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socketβs new workflow scanning support.