Skip to content

Commit ad8761c

Browse files
committed
Merge version 0.1-beta
2 parents b8bb578 + e1f89d4 commit ad8761c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1678
-473
lines changed

README.md

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,179 @@
1+
## React Front end Boilerplate
2+
3+
In order to use the boilerplate you will need NodeJS to be installed on your system.
4+
5+
## Setup Node.js
6+
7+
In order to setup NodeJS you need to follow the current steps:
8+
9+
### Mac OS X
10+
11+
* Step1: Install Home brew
12+
13+
```
14+
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
15+
16+
$ brew -v
17+
```
18+
19+
* Step2: Install Node using Brew
20+
21+
```
22+
$ brew install node
23+
24+
$ node -v
25+
26+
$ npm -v
27+
```
28+
29+
### Linux Systems
30+
31+
* Step1: Install Node using apt-get
32+
33+
```
34+
$ sudo apt-get install curl python-software-properties
35+
36+
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
37+
38+
$ sudo apt-get install nodejs
39+
40+
$ node -v
41+
42+
$ npm -v
43+
```
44+
## Setup React Frontend Boilerplate Application
45+
46+
* Step1: Git clone the application
47+
48+
```
49+
$ git clone https://github.com/deakin-launchpad/react-frontend-boilerplate.git
50+
51+
$ cd react-frontend-boilerplate
52+
```
53+
54+
* Step2: Install node modules
55+
56+
```
57+
$ npm i
58+
59+
or
60+
61+
$ npm install
62+
```
63+
64+
* Step3: Start the application
65+
66+
```
67+
For Development Mode
68+
69+
$ npm start
70+
```
71+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
72+
73+
## Configuration
74+
75+
The basic configuration of the application is defined in JSON files. In the future, these files can be used to define application configuration during development. The config files are already created with basic configuration to start with.
76+
- Dev Mode
77+
1. File location: `src/configurations/devMode.json`.
78+
2. The Dev mode button allows users to login into an application without entering login credentials. Instead, they can be configured by updating `user & password` keys and will be auto-filled for quick login. This will only work when the application is connected to a server and the user already is registered inside the database.
79+
3. During development, the login using server can be skipped by changing `"bypassBackend": false` to `"bypassBackend": true` .
80+
4. The dev mode button position can be configured using keys namely `verticlePosition` which accepts `top or bottom` value & `horizontalPosition` accepts `left or right` value.
81+
- Application Layout
82+
1. File location `src/configurations/layout.json`.
83+
2. The application side menu can be configured easily using a JSON file to avoid writing long lines of code.
84+
```
85+
{
86+
items: [
87+
{
88+
"name": Name of button,
89+
"type": "button",
90+
"icon": "home", // COMMENT: Add icon name you would like to display
91+
"controller": "/home", // COMMENT: Add path name to you view
92+
"customTitle": "This is my custom title" // COMMENT: The title will be displayed along with icon in side menu
93+
}
94+
```
95+
3. You can find icon names from [Material Icons](https://material.io/resources/icons/?style=baseline).
96+
97+
- IDB config
98+
1. File location `src/database/idb/config.json`.
99+
2. The idb uses IndexedDB API to store a significant amount of structured data, including files/blobs.
100+
3. The boilerplate provides the basic configuration for idb where the main configurable key is `dbName`. The name provided in the file will be used for storage in the client browser.
101+
102+
- Socket
103+
1. File Location `src/configurations/socket.json`
104+
2. The boilerplate already has socket client which can be enabled by changing `"initSocket": false` to `"initSocket": true`
105+
3. If the socket requires to use the access token verification it can also be enabled by changing `"accessTokenVerification":false` to `"accessTokenVerification":true`
106+
4. Any other socket options can be defined on the `"socketDefaultOptions"` variable in the configuration.
107+
108+
1109
## Available Scripts
2110

111+
112+
3113
In the project directory, you can run:
4114

115+
116+
5117
### `npm start`
6118

119+
120+
7121
Runs the app in the development mode.
122+
8123
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
9124

125+
126+
10127
The page will reload if you make edits.
128+
11129
You will also see any lint errors in the console.
12130

131+
132+
13133
### `npm test`
14134

135+
136+
15137
Launches the test runner in the interactive watch mode.
138+
16139
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
17140

141+
142+
18143
### `npm run build`
19144

145+
146+
20147
Builds the app for production to the `build` folder.<br>
148+
21149
It correctly bundles React in production mode and optimizes the build for the best performance.
22150

151+
152+
23153
The build is minified and the filenames include the hashes.<br>
154+
24155
Your app is ready to be deployed!
25156

157+
158+
26159
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
27160

161+
162+
28163
### `npm run eject`
29164

165+
166+
30167
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
31168

169+
170+
32171
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
33172

173+
174+
34175
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
35176

36-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
177+
178+
179+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

0 commit comments

Comments
 (0)