Skip to content

Commit 75c80e8

Browse files
phoenixcoded20gitbook-bot
authored andcommitted
GitBook: [master] 18 pages and one asset modified
1 parent e24b564 commit 75c80e8

19 files changed

+1199
-298
lines changed
402 KB
Loading

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
11
---
2-
description: Materially Documentation - ReactJS + Material UI Admin Template
2+
description: Berry - React Admin Template Documentation
33
---
44

55
# Welcome
66

7-
## ABOUT DOCS
7+
## ABOUT BERRY
88

9-
**Materially** is the most developer-friendly & highly customizable React **Hooks** + Redux with **Material UI**
9+
![](.gitbook/assets/og-berry-admin-template.png)
1010

11-
We’ve followed the best industry standards to make our product easy, fast & highly scalable to work with. Materially is the most convenient react hooks admin dashboard template for developers as it's made with React Hooks, Components, Create React App, Redux, clean code, and fully documented which allows you to build eye-catching, high-quality, high-performance responsive single-page applications.
11+
[Berry](https://berrydashboard.io) is the most `developer-friendly` & highly customizable React Admin Template based on [Material-UI](http://material-ui.com/).
1212

13-
## Features
13+
Berry comes with plenty of ready-to-use Material-UI components that will help you to build your site faster and saves your development time.
1414

15-
* Material UI
16-
* React Hooks
17-
* Thir-Party Authentication
18-
* Fully Responsive Layout
19-
* Dashboard, **380+ Widget** Cards
20-
* JSS Powered
21-
* **75+ Pages**
22-
* Live Menu Customize
23-
* 6 months of free support included
24-
* Easy to Build and Setup
25-
* Clear Cut Code style
15+
We’ve followed the best industry standards to make our product easy, fast & highly scalable to work with. It's made with this high-end technology stack - React Hooks, Components, Create React App & Redux.
2616

27-
## Technical Specification \(Credits 🙏\)
17+
## Technology Stack
2818

29-
* React Hooks \(**17.0.1**\)
30-
* [Material UI](https://material-ui.com/) \(4.11.0\)
31-
* SASS with JSS Powered
32-
* \*\*\*\*[Create React App](https://github.com/facebook/create-react-app) ****
19+
* Material-UI v5 components library
20+
* Authentication Methods - Auth0, Firebase, JWT
21+
* React Hooks API
22+
* Redux & React Context API for State Management
23+
* React Router
24+
* Axios
25+
* Create React App
26+
* Code Splitting
27+
* CSS-in-JS
28+
* Multi-Language
29+
30+
## Technology Stack
31+
32+
* [React Hooks \(17.0.2\)](https://reactjs.org/docs/hooks-intro.html)
33+
* [Material UI v5](https://next.material-ui.com/)
34+
* [Create React App](https://github.com/facebook/create-react-app)
3335
* [Redux](https://redux.js.org/)
3436
* [React Router](https://github.com/ReactTraining/react-router)
35-
* [Firebase](https://firebase.google.com/docs/auth)
36-
* [Auth0](https://auth0.com/)
37-
* [JWT](https://jwt.io/)
37+
* [Firebase](https://firebase.google.com/docs/auth), [Auth0](https://auth0.com/), [JWT](https://jwt.io/)
38+
* [Google Fonts](https://fonts.google.com/)
3839

3940
## Any Suggestion? OR Feedback
4041

41-
If you have any suggestions regarding “How To” recipes that should be on this page, Let’s know. We always appreciate your feedback.
42-
43-
Reach us at codedthemes\[at\].gmail\[dot\]com
42+
Feedback from our beloved community is always welcome. Feel free to reach out anytime at our [Support Panel.](https://codedthemes.support-hub.io) We would love to hear from you anytime.
4443

SUMMARY.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# Table of contents
22

33
* [Welcome](README.md)
4-
* [Getting Started](getting-started.md)
5-
* [Prerequisites](prerequisites.md)
6-
* [Installation](installation.md)
4+
* [Pre-requisites](pre-requisites.md)
5+
* [Quick Start](quick-start.md)
6+
* [Folder Structure](folder-structure.md)
7+
* [State Management](state-management.md)
8+
* [Internationalization](internationalization.md)
79
* [Authentication](authentication.md)
8-
* [Localization](localization.md)
9-
* [File Structure](file-structure.md)
10+
* [Axios API Calls](axios-api-calls.md)
1011
* [Routing](routing.md)
11-
* [Template Config](template-config.md)
12-
* [Layout Option](layout-option.md)
13-
* [Default Theme](default-theme.md)
14-
* [Color Management](color-management.md)
15-
* [State Management](state-management.md)
12+
* [Project Configuration](project-config.md)
13+
* [Theme/Style Configuration](theme-config.md)
1614
* [Support](support.md)
1715
* [Changelog](changelog.md)
16+
* [Color Management\_old](color-management.md)
17+
* [Getting Started-old](getting-started-old.md)
18+
* [Resources\_old](resources.md)
19+
* [Layout Option\_old](layout-option.md)
1820

authentication.md

Lines changed: 93 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
---
2-
description: Materially supports 3 popular Authentication methods.
2+
description: 'Auth0, JWT, Firebase setup'
33
---
44

55
# Authentication
66

7-
Materially supports 3 authentication methods: **Firebase Authentication, JSON Web Token, Auth0**.
7+
Berry supports three Authentication methods **`Firebase, JSON Web Token (JWT), Auth0.`**
88

9-
**FYI** - We provide Firebase Authentication by default.
9+
{% hint style="info" %}
10+
Firebase Authentication set by default
11+
{% endhint %}
1012

1113
## How does it work?
1214

1315
Only authenticated users can access dashboard pages. If a user is not authenticated, the user redirected to the login page.
1416

15-
We implemented to make this work the “Guard” concept from Angular. It is simply a component that wraps a route and checks for user authentication status before allowing the navigation.
16-
17-
We used two guards **GuestGuard** and **AuthGuard**, To find more information about guards, please visit the **Routes.js** page.
17+
We used two guards **`GuestGuard`** and **`AuthGuard`** . Guards have been configured in **`src\utils\route-guard\`** folder.
1818

19-
In the `src/layout/App.js`, we have specified auth provider **FirebaseProvider** like,
19+
In the **`src/layout/App.js`**, we have specified auth provider **`FirebaseProvider`** like,
2020

21-
```text
21+
{% code title="App.js" %}
22+
```javascript
2223
import { FirebaseProvider } from "../contexts/FirebaseContext";
2324
```
25+
{% endcode %}
2426

25-
App component wrap with the provider, like
27+
App component wrap with the **`<FirebaseProvider>`**
2628

27-
```text
29+
```javascript
2830
<ThemeProvider theme={theme(customization)}>
2931
<FirebaseProvider>
3032
<Routes />
@@ -33,15 +35,16 @@ App component wrap with the provider, like
3335
</ThemeProvider>
3436
```
3537

36-
Using **FirebaseProvider**, we can use the context directly by importing `useContext` from React and specifying the context **FirebaseContext** that we want to use or we can use the custom hook **`useAuth`** from `src/hooks/useAuth.js`
38+
Using **`<FirebaseProvider>`**, we can use the context directly by importing **`useContext`** from React and specifying the context **`FirebaseContext`** or we can use the custom hook **`useAuth`** from `src/hooks/useAuth.js`
3739

3840
## Auth Configuration:
3941

4042
{% hint style="info" %}
4143
You can edit this file at **`[ ../src/config.js]`**
4244
{% endhint %}
4345

44-
```text
46+
{% code title="config.js" %}
47+
```javascript
4548
// JWT JSON Web Token method
4649
jwt: {
4750
secret: 'SECRET-KEY',
@@ -66,99 +69,137 @@ auth0: {
6669
domain: 'DOMAIN'
6770
}
6871
```
69-
70-
### <a id="switching-between-auth-methods"></a>
72+
{% endcode %}
7173

7274
## Switching between Authentication methods
7375

7476
### **Firebase to JWT**
7577

76-
**Set JWT Config** - Open file '**config.js**' at directory '../src/config.js' and set **jwt** configuration.
78+
**Set JWT Config**
79+
80+
Open file **`config.js`** from directory **`..\src\config.js`** and set **`jwt`** configuration.
7781

78-
```text
79-
export default {
80-
...
81-
jwt: {
82+
{% code title="config.js" %}
83+
```javascript
84+
...
85+
jwt: {
8286
secret: 'SECRET-KEY',
8387
timeout: '1 days'
8488
}
85-
}
89+
...
8690
```
91+
{% endcode %}
92+
93+
**Change Login Form**
8794

88-
**Change Login Form** - Open file '**index.js**' at directory '../src/views/Login/index.js', and use the **JWTLogin** component.
95+
Open file **`index.js`** at directory **`..\src\views\pages\authentication\login\index.js`** and use the **`JWTLogin`** component.
8996

90-
```text
97+
{% code title="login\\index.js" %}
98+
```javascript
9199
// Replace at line 8:
92100
import JWTLogin from './JWTLogin';
93101

94-
// Replace at line 21:
95-
<JWTLogin />
102+
103+
// Also find & edit below code block
104+
<Grid item xs={12}>
105+
<JWTLogin />
106+
{/* <Auth0Login /> */}
107+
{/* <FirebaseLogin /> */}
108+
</Grid>
96109
```
110+
{% endcode %}
97111

98-
**AuthProvider for Layout** - Open file '**App.js**' at directory '../src/layout/App.js' and use **JWTProvider**
112+
**Change AuthProvider**
99113

100-
```text
101-
// Replace at line 6;
114+
Open file **`App.js`** at directory **`..\src\App.js`** and use **`JWTProvider`**
115+
116+
{% code title="App.js" %}
117+
```javascript
118+
// Replace at line 6:
102119
import { JWTProvider } from "./contexts/JWTContext";
103120

104-
// Replace from line 22:
121+
// Also find & edit below code block
105122
<JWTProvider>
106123
<Routes />
107124
<Snackbar />
108125
</JWTProvider>
109126
```
127+
{% endcode %}
128+
129+
**Change auth Hooks**
110130

111-
**Change auth Hooks** - Open file '**useAuth.js**' at directory '../src/hooks/useAuth.js' and use **JWTContext**
131+
Open file **`useAuth.js`** at directory `..\src\hooks\useAuth.js` and use **`JWTContext`**
112132

113-
```text
133+
{% code title="useAuth.js" %}
134+
```javascript
114135
// Replace from line 2:
115136
import JWTContext from '../contexts/JWTContext';
116137
const useAuth = () => useContext(JWTContext);
117138
```
118-
119-
### \*\*\*\*
139+
{% endcode %}
120140

121141
### **Firebase to Auth0**
122142

123-
**Set Auth Config** - Open file '**config.js**' at directory '../src/config.js' and set **auth0** configuration.
143+
**Set Auth0 Config**
144+
145+
Open file **`config.js`** from directory **`..\src\config.js`** and set **`jwt`** configuration.
124146

125-
```text
126-
export default {
127-
...
128-
auth0: {
129-
client_id: 'CLIENT-ID',
130-
domain: 'DOMAIN'
147+
{% code title="config.js" %}
148+
```javascript
149+
...
150+
auth0: {
151+
client_id: 'client_id',
152+
domain: 'yourdomain.com'
131153
}
132-
}
154+
...
133155
```
156+
{% endcode %}
134157

135-
**Change Login Form** - Open file '**index.js**' at directory '../src/views/Login//index.js', and use **Auth0Login** component.
158+
**Change Login Form**
136159

137-
```text
160+
Open file **`index.js`** at directory **`..\src\views\pages\authentication\login\index.js`** and use the **`Auth0Login`** component.
161+
162+
{% code title="\\login\\index.js" %}
163+
```javascript
138164
// Replace at line 8:
139165
import Auth0Login from './Auth0Login';
140166

141-
// Replace at line 21:
142-
<Auth0Login />
167+
168+
// Also find & edit below code block
169+
<Grid item xs={12}>
170+
{/* <JWTLogin /> */}
171+
<Auth0Login />
172+
{/* <FirebaseLogin /> */}
173+
</Grid>
143174
```
175+
{% endcode %}
144176

145-
**AuthProvider for Layout** - Open file '**App.js**' at directory '../src/layout/App.js' and use **Auth0Provider**
177+
**Change AuthProvider**
146178

147-
```text
148-
// Replace at line 6;
149-
import { Auth0Provider } from "./contexts/Auth0Context";
179+
Open file **`App.js`** at directory **`..\src\App.js`** and use **`Auth0Provider`**
150180

151-
// Replace from line 22:
181+
{% code title="App.js" %}
182+
```javascript
183+
// Replace at line 6:
184+
import {Auth0Provider} from "./contexts/Auth0Context";
185+
186+
// Also find & edit below code block
152187
<Auth0Provider>
153-
{renderRoutes(routes)}
188+
<Routes />
189+
<Snackbar />
154190
</Auth0Provider>
155191
```
192+
{% endcode %}
193+
194+
**Change auth Hooks**
156195

157-
**Change auth Hooks** - Open file '**useAuth.js**' at directory '../src/hooks/useAuth.js' and use **Auth0Context**
196+
Open file **`useAuth.js`** at directory **`..\src\hooks\useAuth.js`** and use **`Auth0Context`**
158197

159-
```text
198+
{% code title="useAuth.js" %}
199+
```javascript
160200
// Replace from line 2:
161201
import Auth0Context from '../contexts/Auth0Context';
162202
const useAuth = () => useContext(Auth0Context);
163203
```
204+
{% endcode %}
164205

0 commit comments

Comments
 (0)