Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›Services

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

API Server

Api-Server is the core of the Leverege Platform. It interacts with all the micro-services and contains all of the rest routes that the Imagine UI interacts with.

Documentation for all of the routes available can be found at Leverege Api. The routes allow access to every aspect of the Leverege System. Routes can be used to create Blueprints, devices, users, projects and Systems. It can also be used to edit and view them. There are routes to interact with most of the micro-services.

Configuration

Required

NameDescription
MODEL_FIREBASE_SERVICE_ACCOUNTservice account key to firebase database for models
MODEL_FIREBASE_DATABASE_URLurl to firebase database for models
TEMPLATE_DIRpath to the directory templates are stored
LOCAL_AUTH_SECRETlocal secret for connecting to the Auth server or service
AUTH0_DOMAINdomain name for Auth0 authentication
AUTH0_CLIENT_IDclient id for Auth0
AUTH0_CLIENT_SECRETclient secret for Auth0
AUTH0_CLIENT_SECRET_B64Base 64 encoded key for Auth0
DATA_FIREBASE_CONFIGfirebase database config
DATA_FIREBASE_SERVICE_ACCOUNTfirebase database service account
DATA_BIGQUERY_SERVICE_ACCOUNTBigQuery database service account
DATA_BIGQUERY_PROJECTBigQuery database project
SQL_USERsql user
SQL_PASSWORDsql password
SQL_HOSTsql host
SQL_PORTsql port
SQL_CAsql ssl ca
SQL_CLIENT_CERTsql ssl cert
SQL_CLIENT_KEYsql ssl key
PG_USERpostgreSQL user
PG_PASSWORDpostgreSQL password
PG_DATABASEpostgreSQL database
SIMULATOR_URLurl to where simulator is hosted
MODEL_SQL_USERuser of model sql db
MODEL_SQL_PASSWORDpassword of model sql db
NPMRC_VALUEcontents will be made into .npmrc file

Optional

NameDescriptionDefault
APP_NAMEname of app for firebase config'api-server'
SQL_CAsql ssl caundefined
SQL_CLIENT_CERTsql ssl certundefined
SQL_CLIENT_KEYsql ssl keyundefined
TRANSPORT_CONFIGconfig for readers and writers{ type, host, port }
NSQ_HOST_ADDRhost address for NSQ, if TRANSPORT_CONFIG is not specified'127.0.0.1'
NSQ_HOST_PORTport for NSQ, if TRANSPORT_CONFIG is not specified4150
SERVER_PORTserver port that api will listen on8181
LOCAL_AUTH_ISSUERauth token issuer'https://imagine.leverege.com'
LOCAL_AUTH_AUDIENCEauth token audience''
LOCAL_AUTH_EXPIRATIONexpiration time of auth token'1d'
INITIAL_USERSdefault user accounts for imaginenull
CACHE_CONFIGconfiguration for the cache db{ type, connection : { host, port } }
LOCK_CONFIGconfiguration for the lock db{ type, connection : { host, port } }
BQ_HISTORY_TAGStags that are applied to the BigQuery database'[ 'long' ]'
SQL_POOL_CONNECTION_LIMITlimit of the number of sql connections10
MYSQL_HISTORY_TAGStags that are applied to the MySql database'[ 'short' ]'
PG_POOL_CONNECTION_LIMITlimit of the number of postgreSQL connections10
PG_PORTpostgreSQL port5432
PG_HOSTpostgreSQL host'localhost'
PG_HISTORY_TAGStags that are applied to the PostgreSQL database'[ 'tdb' ]'
MODEL_SQL_HOSTmodel sql db host'localhost'
MODEL_SQL_PORTmodel sql db port3306
API_SERVICE_TOPICtopic that is assigned to the apiWorker message processor'api-service-topic'
GCF_FIREBASE_SERVICE_ACCOUNTservice account for google cloud functionsDATA_FIREBASE_SERVICE_ACCOUNT
SCRIPT_BUILD_DIRdirectory where scripts will be deployed to'/tmp'
REASONER_LIB_VERSIONdeployed reasoner version'1.0.7'
SCHEDULER_URLurl where scheduler is hosted'http://localhost:9937'
← API UIMessage Processor →
  • Configuration
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source