altair-redux
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

logo

Altair Redux

The project purpose is to demonstrate how redux can be used to consolidate an apps storage, utilities and logic between mobile clients (react-native) and web clients (react).

Redux and Redux Saga is the backbone for this project and many of the design decisions and patterns stem from it.

Altair is a simple customer management application I built as a coding test.

Requirements

  • Firebase - a realtime database for web/mobile applications created by Google Inc.
  • Algolia Search - used to index our firebase data store and to provide fulltext search.
  • NodeJS (8.7.0)
  • Yarn or NPM

Usage

Web usage

To hook up an application to the altair-redux store:

import { configureStore } from 'altair-redux';
import localForage from 'localforage';

Acquire your firebase web config from the firebase console.

// firebase configuration
const config = {
	apiKey: '',
	authDomain: '',
	databaseURL: '',
	projectId: '',
	storageBucket: '',
	messagingSenderId: ''
}
const store = configureStore(
  localForage,
  config,
  {
    userProfile: 'users',
    useFirestoreForProfile: true
  },
  {
    appId: 'ALGOLIA_APP_ID'
  }
);

React native usage

import { AsyncStorage } from 'react-native';
import { configureStore } from 'altair-redux';
const store = configureStore(AsyncStorage, {}, {
	enableRedirectHandling : false,
	userProfile : 'users',
	useFirestoreForProfile : true
}, { appId: 'ALGOLIA_APP_ID', searchKey: 'ALGOLIA_SEARCH_KEY' });

Package Sidebar

Install

npm i altair-redux

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • codebus