Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›Utilities

Platform Overview

  • Overview
  • Architecture
  • Core Concepts

Guides

  • Platform Setup
  • Building a Project
  • API UI

Services

  • API Server
  • Message Processor
  • Transponder
  • Reason
  • Scheduler
  • Messenger
  • Emailer
  • Rest Server
  • DB Curator

API

  • API
  • Interface
  • Project
  • System
  • Device
  • Blueprint
  • Collection
  • Child
  • History
  • Scenario
  • Script
  • Template
  • Timer
  • User
  • Users

Server Libraries

  • Log
  • Messages
  • Message Queue
  • Cache
  • Lock
  • Limit
  • Cluster Manager
  • Error
  • Exit

Utilities

  • Promise
  • Data Store
  • Factory
  • Path
  • Reasoner
  • Object Util
  • Array Util
  • String Util
  • Base62 Util
  • Value Cache
  • Validator
  • Lol

UI

  • API Redux
  • UI Builder
  • UI Elements
  • UI Redux
  • UI Mapbox Elements
  • UI Active Theme
  • UI Color Elements
  • UI Linear View Elements

Data Store

Data Store is a wrapper for Front-end and Back-end database connections. Data Store maintains the structure of the database and provides an API for interacting with the database. It is important to use Data Store for every component interacting with the database, so that it is always in the expected format.

Usage

npm install --save @leverege/data-store

Server Usage

To use with a serviceAccount, use

const DataStore = require( '@leverege/data-store' )

const store = DataStore.createRootStore( { type, serviceAccount, databaseUrl, root } )

const data = store.access( 'path/to/data' )
data.update( path, value, onComplete )
data.once( path, onComplete, onError )

Client Usage

to use as a client with signIn capability:

const DataStore = require( '@leverege/data-store/lib/web' )

const store = DataStore.createRootStore( { type, jwt, databaseUrl, root } )

store.access( 'path/to/data' )

← PromiseFactory →
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source