This project is based on the Node API and Client Boilerplate. With Docker, you can start all the services (Node Express API Boilerplate, Create React App Boilerplate, and Postgres database) with one bash command.
- Docker for Node API Mockup Data and Client Boilerplates
- Docker for Rails API and Client Boilerplates
Download and install the Docker Community Edition.
Executable bash commands have been provided to easily execute Docker commands.
From the root
directory of the project, run the following commands:
Command | Description |
---|---|
bin/install |
Clone the apps, build the Docker containers, and initialise db |
bin/reinstall |
Delete the apps and run the installation process |
bin/start |
Start all the services (API, client, and database) |
bin/stop |
Stop all the services |
bin/console <container ID or Name> |
Access the terminal console of the API or client containers |
Note: To manage separate Docker instance for API or client,
open another terminal console and change the project directory from root
to api
or client
and run the commands above.
Command | Description |
---|---|
bin/pg/resetdb |
Drop and re-initialise database |
bin/pg/migrate |
Run new schema migration |
bin/pg/migrateundo |
Revert the recent schema migration |
bin/pg/seed <seed file> |
Run specific data seed file with or without .js extension |
bin/pg/seedundo <seed file> |
Revert the seed of specific data seed file |
bin/pg/psql |
Access the database console |
Note: Used bin/pg/psql <database container ID or Name>
to access the database console.
To run the commands above for separate API Docker instance, simply change the project directory from root
to api
.
Command | Description |
---|---|
bin/css/watch |
Watch and compile *.scss files on file changes (for Mac users only) |
bin/css/build |
Manually compile *.scss files |
Note: To run the commands above for separate client Docker instance, simply change the project directory from root
to client
.
Run the bin/install
to clone the API and client apps and to initialise the database.
If the installation process is successful, both the API and client services shall be started.
Use the following credentials to test different API responses. Default password for all accounts is password
.
Name | Description | |
---|---|---|
Super Admin User | superadmin@email.com |
Has wildcard access |
Admin User | admin@email.com |
Has wildcard access but Admin › Users › Delete is excluded |
Common User | user@email.com |
Can access My Profile , Admin › Dashboard , Users , Users › View, and Settings |
Referrer User | referrer@email.com |
When redirect is set without the domain, e.i. /admin/dashboard , user shall be redirected to internal page if no location path (referrer) found on the Sign In page |
Redirect User | redirect@email.com |
When redirect is set with complete URL, e.i. https://github.com/anthub-services , user shall be redirected to external page if no location path (referrer) found on the Sign In page |
Blocked User | blocked@email.com |
User is signed in but the account is blocked |
Unauthorized User | <any invalid email> |
Simply enter wrong email and/or password |