This section will help you walk through the minimum required setup to run the project.
For easy to config the Wordpress site, you can download the site from https://github.com/inspireui/mstore, this was already config and install all plugin that use for the app, or if you have your existing website, you can following by below setting.
Wordpres Plugins install
- JSON API: A RESTful API for WordPress, this plugin is used for only the registration feature (other request from the API we use default REST API from Wordpress site)
- JSON API User: Extends the JSON API for RESTful user registration, authentication, password reset...
- Better Rest API Featured Image: for some reason the image is not populate correctly so that need to install this plugin to support to show the image.
- OneSignal Push Notifications (optional): push notify to the mobile app, or web using OneSignal dashboard admin. This feature is support on Pro version.
Download links:
- https://github.com/PI-Media/json-api
- https://wordpress.org/plugins/json-api-user/
- https://wordpress.org/plugins/better-rest-api-featured-images/
- https://wordpress.org/plugins/wp-rest-api-cache/
Enable Worpdress setting
Permalink URL setting:
Go to Common Setting, change the URL to Post name, this is required for the setting otherwise some images could not loading.
Membership registration:
Enable the option Anyone can register.
Enable Post a comment
And from the functions.php
file (this could be added as the child function from your template) add following code:
function filter_rest_allow_anonymous_comments() {
return true;
}
add_filter('rest_allow_anonymous_comments','filter_rest_allow_anonymous_comments');
App config
Go the project folder, open the file: src/common/appConfig.json and follow 2 simple steps to setup the app:
- Step 1: Change your Wordpress site URL
- Step 2: Config the home UI layout