- Backend: Skygear Cloud
- Frontend:
- Rendering: React
- State Container: Redux
- Side Effect Model: redux-saga
- Data Model: Immutable.js
- Form Library: redux-form
- Type Checker: Flow
- Styling: Material-UI, styled-components
- Language: JavaScript
- git (deploy)
- node (ideally 6.10.0+)
app
├── containers (Containers)
├── components (Components)
├── cloud
│ └── functions.js (Skygear Cloud Functions)
└── utils (Utility Functions)
- Group containers/components by folder
- Files in a container/component folder (*optional)
- index.js (Component Definition)
- actions.js (Action Creators)*
- constants.js (Types of Action Creators)*
- reducer.js (Redux Reducer)*
- Files in a container/component folder (*optional)
- Use Flow instead of PropTypes
- Use ImmutableJS in Redux Store
This project uses redux-saga to handle side effects (e.g async requests, skygear db calls).
These are steps to make async requests:
- Modify
app/routes.js
to inject your sagas (usually located atcontainer/*/sagas.js
) - Dispatch your action that triggers async operations (e.g
FETCH_TABLE_LIST
) - Async operations are handled inside your watcher on
sagas.js
To learn more about redux-saga, Click here to read the official docs.
This project uses Skygear to handle all back end operations (e.g Authentication, Database).
To achieve customizations (e.g data validation, custom end points), Skygear Cloud Function is provided to run JavaScript codes on the cloud. Codes/Functions are triggered when needed. To learn more, Click here to read the official docs.
In this project, all cloud functions are defined in cloud/functions.js
.
- As it is written in ES6, you have to run
yarn run build:cloud
to transpile it to ES5. - Run
$ yarn run deploy:cloud
, all deploy procedures are done automatically. Make sure you have installedgit
.