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.
- 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
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'
}
);
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' });