Provider pattern on top of indexeddb