Skip to content

Commit

Permalink
Merge pull request #11 from KevinAst/next5
Browse files Browse the repository at this point in the history
make feature organization (i.e. directory collections) less type-based
  • Loading branch information
KevinAst authored Mar 3, 2019
2 parents 02c1a92 + a494673 commit 3a51a47
Show file tree
Hide file tree
Showing 119 changed files with 112 additions and 139 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/**/*
.expo/*
npm-debug.*
src/features/support/firebaseInit/config/firebaseAppConfig.js
src/features/services/discoveryService/discoveryServiceGooglePlaces/config/googlePlacesApiKey.js
src/features/util/firebaseInit/config/firebaseAppConfig.js
src/features/discovery/discoveryService/discoveryServiceGooglePlaces/config/googlePlacesApiKey.js
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using [Expo](https://expo.io/).
### Eatery Pool

The main screen of eatery-nod is the **Eatery Pool** (_please refer to
the [eateries feature](src/features/views/eateries)_).
the [eateries feature](src/features/eateries)_).

This visualizes your persistent pool of restaurants to select from
(the list can optionally be filtered).
Expand All @@ -24,13 +24,13 @@ selection.
The "detailed" view provides direct communication to the establishment
(phone them, visit their web site, or navigate to their address).

![Screen Flow](src/features/views/eateries/docs/ScreenFlow.png)
![Screen Flow](src/features/eateries/docs/ScreenFlow.png)


### Discovery

Your pool of eateries is maintained through **Discovery** (_please
refer to the [discovery feature](src/features/views/discovery)_).
refer to the [discovery feature](src/features/discovery)_).

You don't have to maintain the details of your pool by hand. Rather,
you simply search the restaurants using the **disovery** feature.
Expand All @@ -40,13 +40,13 @@ This is the same source that is used when you issue a Google Search
Within the discovery view, you simply toggle the check next to the
entry. **Red** entries are in your pool, **Grey** entries are not.

![Screen Flow](src/features/views/discovery/docs/ScreenFlow.png)
![Screen Flow](src/features/discovery/docs/ScreenFlow.png)


### Authorization

Authorization is provided through the [auth
feature](src/features/init/auth), requiring a validated email/password
feature](src/features/auth), requiring a validated email/password
before promoting any application screens.

![Screen Flow](src/features/init/auth/docs/ScreenFlow.png)
![Screen Flow](src/features/auth/docs/ScreenFlow.png)
File renamed without changes.
41 changes: 22 additions & 19 deletions src/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@

The **eatery-nod** application is composed of the following **features**:

- [**init**](init/README.md): a collection of **"Initialization Related"** features
- [**device**](init/device/README.md): initializes the device for use by the app
- [**auth**](init/auth/README.md): promotes complete user authentication
- [**views**](views/README.md): a collection of **"UI Related"** features
- [**eateries**](views/eateries/README.md): manages and promotes the eateries view
- [**discovery**](views/discovery/README.md): manages and promotes the discovery view
- [**leftNav**](views/leftNav/README.md): promotes the app-specific Drawer/SideBar on the app's left side
- [**currentView**](views/currentView/README.md): maintains the currentView state with get/set cross-feature bindings
- [**services**](services/README.md): a collection of **"Service Related"** features _(that are "mockable")_
- [**deviceService**](services/deviceService/README.md): promotes several device related services
- [**authService**](services/authService/README.md): a persistent authentication service (retaining active user)
- [**eateryService**](services/eateryService/README.md): a persistent "Eateries" DB service, monitoring real-time Eatery DB activity
- [**discoveryService**](services/discoveryService/README.md): retrieves restaurant information from a geographical data source, emitting Discovery/Eatery objects
- [**support**](support/README.md): a collection of **"Support Utility"** features
- [**bootstrap**](support/bootstrap/README.md): provide critical-path app initialization through the `'bootstrap.*'` use contract
- [**firebaseInit**](support/firebaseInit/README.md): promote a utility function to initialize the eatery-nod firebase DB
- [**diag**](diag/README.md): a collection of **"Diagnostic Related"** features
- [**logActions**](diag/logActions/README.md): logs all dispatched actions and resulting state
- [**sandbox**](diag/sandbox/README.md): promotes a variety of interactive tests, used in development, that can easily be disabled
- [**device**](device/README.md): initializes the device for use by the app
- [**deviceService**](device/deviceService/README.md): promotes several device related services
- [**auth**](auth/README.md): promotes complete user authentication
- [**authService**](auth/authService/README.md): a persistent authentication service (retaining active user)
- [**authServiceFirebase**](auth/authService/authServiceFirebase/AuthServiceFirebase.js): the **real** AuthServiceAPI derivation based on Firebase
- [**authServiceMock**](auth/authService/authServiceMock/AuthServiceMock.js): the **mock** AuthServiceAPI derivation
- [**eateries**](eateries/README.md): manages and promotes the eateries view
- [**eateryService**](eateries/eateryService/README.md): a persistent "Eateries" DB service, monitoring real-time Eatery DB activity
- [**eateryServiceFirebase**](eateries/eateryService/eateryServiceFirebase/EateryServiceFirebase.js): the **real** EateryServiceAPI derivation based on Firebase
- [**eateryServiceMock**](eateries/eateryService/eateryServiceMock/EateryServiceMock.js): the **mock** EateryServiceAPI derivation
- [**discovery**](discovery/README.md): manages and promotes the discovery view
- [**discoveryService**](discovery/discoveryService/README.md): retrieves restaurant information from a geoxsgraphical data source, emitting Discovery/Eatery objects
- [**discoveryServiceGooglePlaces**](discovery/discoveryService/discoveryServiceGooglePlaces/DiscoveryServiceGooglePlaces.js): the **real** DiscoveryServiceAPI derivation based on GooglePlaces API
- [**discoveryServiceMock**](discovery/discoveryService/discoveryServiceMock/DiscoveryServiceMock.js): the **mock** DiscoveryServiceAPI derivation
- [**util**](util/README.md): a collection of **"Support Utility"** features
- [**leftNav**](util/leftNav/README.md): promotes the app-specific Drawer/SideBar on the app's left side
- [**currentView**](util/currentView/README.md): maintains the currentView state with get/set cross-feature bindings
- [**bootstrap**](util/bootstrap/README.md): provide critical-path app initialization through the `'bootstrap.*'` use contract
- [**firebaseInit**](util/firebaseInit/README.md): promote a utility function to initialize the eatery-nod firebase DB
- [**diagnostic**](diagnostic/README.md): a collection of **"Diagnostic Related"** features
- [**logActions**](diagnostic/logActions/README.md): logs all dispatched actions and resulting state
- [**sandbox**](diagnostic/sandbox/README.md): promotes a variety of interactive tests, used in development, that can easily be disabled
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import AuthServiceFirebase from './AuthServiceFirebase';

// feature: authServiceFirebase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import AuthServiceMock from './AuthServiceMock';

// feature: authServiceMock
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import PropTypes from 'prop-types';
import {Body,
Button,
Expand All @@ -12,10 +12,10 @@ import {Body,
Text,
Title,
View} from 'native-base';
import commonStyles from '../../../views/commonStyles';
import commonStyles from '../../commonStyles';
import signInFormMeta from '../signInFormMeta';
import ITextField from '../../../../util/iForms/comp/ITextField';
import {toast} from '../../../../util/notify';
import ITextField from '../../../util/iForms/comp/ITextField';
import {toast} from '../../../util/notify';

/**
* SignInScreen: gather user sign-in credentials.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import {Body,
Button,
Container,
Expand All @@ -11,7 +11,7 @@ import {Body,
Title,
View} from 'native-base';
import PropTypes from 'prop-types';
import commonStyles from '../../../views/commonStyles';
import commonStyles from '../../commonStyles';
import _authAct from '../actions';
import * as _authSel from '../state';

Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {expandWithFassets} from 'feature-u';
import _auth from './featureName';
import _authAct from './actions';
import signInFormMeta from './signInFormMeta';
import discloseError from '../../../util/discloseError';
import {toast} from '../../../util/notify';
import discloseError from '../../util/discloseError';
import {toast} from '../../util/notify';

/**
* Start our authorization process, once the bootstrap initialization process is complete.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {featureRoute,
PRIORITY} from 'feature-router';
import SignInVerifyScreen from './comp/SignInVerifyScreen';
import SignInScreen from './comp/SignInScreen';
import SplashScreen from '../../../util/comp/SplashScreen';
import SplashScreen from '../../util/comp/SplashScreen';

// ***
// *** The routes for this feature.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Yup from 'yup';
import IFormMeta from '../../../util/iForms/IFormMeta';
import IFormMeta from '../../util/iForms/IFormMeta';
import _authAct from './actions';
import * as _authSel from './state';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {createSelector} from 'reselect';
import _auth from './featureName';
import signInFormMeta from './signInFormMeta';
import _authAct from './actions';
import User from '../../services/authService/User';
import User from './authService/User';

// ***
// *** Our feature reducer, managing state for our authorization process.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Font,
Location,
Permissions} from 'expo';
import {AsyncStorage} from 'react-native';
import featureFlags from '../../../util/featureFlags';
import featureFlags from '../../../featureFlags';

const credentialsKey = 'eatery-nod:credentials';
const credentialsSeparator = '/';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import {createFeature} from 'feature-u';
import _device from './featureName';
import platformSetup from './misc/platformSetup';
import {createBootstrapFn} from '../../support/bootstrap/bootstrapFn';
import Notify from '../../../util/notify';
import {createBootstrapFn} from '../util/bootstrap/bootstrapFn';
import Notify from '../../util/notify';
import _deviceAct from './actions';
import reducer,
{isGuiReady,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# diag directory
# diagnostic directory

The **diag** directory is a collection of **"Diagnostic Related"**
The **diagnostic** directory is a collection of **"Diagnostic Related"**
features.

- [**logActions**](logActions/README.md): logs all dispatched actions and resulting state
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {createFeature} from 'feature-u';
import _logActions from './featureName';
import logic from './logic';
import featureFlags from '../../../util/featureFlags';
import featureFlags from '../../../featureFlags';

// feature: logActions
// log all dispatched actions and resulting state (full details in README)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createLogic} from 'redux-logic';
import _logActions from './featureName';
import featureFlags from '../../../util/featureFlags';
import featureFlags from '../../../featureFlags';

let lastState = null;

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createFeature} from 'feature-u';
import fassets from './fassets';
import featureFlags from '../../../util/featureFlags'
import featureFlags from '../../../featureFlags'

// feature: sandbox
// promote interactive tests (full details in README)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import PropTypes from 'prop-types';
import {Body,
Button,
Expand All @@ -16,8 +16,8 @@ import {Body,
View} from 'native-base';
import commonStyles from '../../commonStyles';
import discoveryFilterFormMeta from '../discoveryFilterFormMeta';
import ITextField from '../../../../util/iForms/comp/ITextField';
import IRadioField from '../../../../util/iForms/comp/IRadioField';
import ITextField from '../../../util/iForms/comp/ITextField';
import IRadioField from '../../../util/iForms/comp/IRadioField';


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {withFassets} from 'feature-u';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import _discovery from '../featureName';
import _discoveryAct from '../actions';
import {Body,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {withFassets} from 'feature-u';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import {Body,
Button,
Container,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Yup from 'yup';
import IFormMeta from '../../../util/iForms/IFormMeta';
import IFormMeta from '../../util/iForms/IFormMeta';
import _discoveryAct from './actions';
import * as _discoverySel from './state';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import DiscoveryServiceGooglePlaces from './DiscoveryServiceGooglePlaces';

// feature: discoveryServiceGooglePlaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import isString from 'lodash.isstring';

import {discoverySearchPage1, // NOTE: tight coupling with EateryServiceMock (IT's OK ... were a MOCK :-)
discoverySearchPage2,
eateriesMockDB} from '../../eateryService/eateryServiceMock/EateryServiceMock';
eateriesMockDB} from '../../../eateries/eateryService/eateryServiceMock/EateryServiceMock';

/**
* DiscoveryServiceMock is the **mock** DiscoveryServiceAPI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import DiscoveryServiceMock from './DiscoveryServiceMock';

// feature: discoveryServiceMock
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {withFassets} from 'feature-u';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import {TouchableWithoutFeedback} from 'react-native';
import {Body,
Button,
Expand All @@ -16,7 +16,7 @@ import {Body,
Right,
Text,
Title} from 'native-base';
import SplashScreen from '../../../../util/comp/SplashScreen';
import SplashScreen from '../../../util/comp/SplashScreen';
import commonStyles from '../../commonStyles';
import _eateriesAct from '../actions';
import * as _eateriesSel from '../state';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {Linking} from 'react-native';
import {withFassets} from 'feature-u';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import {Body,
Button,
Container,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import PropTypes from 'prop-types';
import {Body,
Button,
Expand All @@ -16,8 +16,8 @@ import {Body,
View} from 'native-base';
import commonStyles from '../../commonStyles';
import eateryFilterFormMeta from '../eateryFilterFormMeta';
import ITextField from '../../../../util/iForms/comp/ITextField';
import IRadioField from '../../../../util/iForms/comp/IRadioField';
import ITextField from '../../../util/iForms/comp/ITextField';
import IRadioField from '../../../util/iForms/comp/IRadioField';

/**
* EateryFilterScreen: gather filter information (selection criteria)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {withFassets} from 'feature-u';
import withState from '../../../../util/withState';
import withState from '../../../util/withState';
import _eateries from '../featureName';
import _eateriesAct from '../actions';
import {Body,
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Yup from 'yup';
import IFormMeta from '../../../util/iForms/IFormMeta';
import IFormMeta from '../../util/iForms/IFormMeta';
import _eateriesAct from './actions';
import * as _eateriesSel from './state';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import EateryServiceFirebase from './EateryServiceFirebase';

// feature: eateryServiceFirebase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createFeature} from 'feature-u';
import featureFlags from '../../../../util/featureFlags';
import featureFlags from '../../../../featureFlags';
import EateryServiceMock from './EateryServiceMock';

// feature: eateryServiceMock
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import _eateries from './featureName';
import * as _eateriesSel from './state';
import _eateriesAct from './actions';
import {expandWithFassets} from 'feature-u';
import discloseError from '../../../util/discloseError';
import discloseError from '../../util/discloseError';

/**
* Our persistent monitor that manages various aspects of a given pool.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import featureName from './featureName';
import EateriesListScreen from './comp/EateriesListScreen';
import EateryDetailScreen from './comp/EateryDetailScreen';
import EateryFilterScreen from './comp/EateryFilterScreen';
import SplashScreen from '../../../util/comp/SplashScreen';
import SplashScreen from '../../util/comp/SplashScreen';

// ***
// *** The routes for this feature.
Expand Down
File renamed without changes.
Loading

0 comments on commit 3a51a47

Please sign in to comment.