Project Configuration
Configuration option for whole Berry Template
Berry has a single source of truth for default configuration which lets users manage it effectively. It also makes it scalable for new configurations. you can set config like font, border, theme layout, locale, etc. All those can be configured at ..src/config.js
Text
Text
Text
Text
Option
Default
Data Type
Description
basename
/
String
build time set subdomain or path of project directory
defaultPath
/dashboard/default
string
default path once login success
fontFamily
'Roboto', sans-serif
String
set font family
borderRadius
12
number
border-radius for card and textboxes
outlinedFilled
true
boolean
defines backfill color for textboxes. setting it false will show transparent background for outline textboxes
theme
light
String
light, dark
18n
en
String
en - English
fr - français
ro - Română
zh - 中国人
rtlLayout
false
boolean
set layout from right to left.
jwt
-
Object
JSON web token configuration
firebase
-
Object
Firebase Authentication config
auth0
-
Object
auth0 login config
javascript
Typescript
1
const config = {
2
// basename: only at build time to set, and don't add '/' at end off BASENAME for breadcrumbs, like '/berry-material-react/react/default'
3
basename: '/',
4
defaultPath: '/dashboard/default',
5
fontFamily: `'Roboto', sans-serif`,
6
borderRadius: 12,
7
outlinedFilled: true,
8
theme: 'light',
9
i18n: 'en', // 'en' - English, 'fr' - French, 'ro' - Romanian, 'zh' - Chinese
10
rtlLayout: false,
11
jwt: {
12
secret: 'SECRET-KEY',
13
timeout: '1 days'
14
},
15
firebase: {
16
apiKey: 'apiKey',
17
authDomain: 'authDomain',
18
projectId: 'berry-material-react',
19
storageBucket: 'berry-material-react.appspot.com',
20
messagingSenderId: 'messagingSenderId',
21
appId: 'appId',
22
measurementId: 'measurementId'
23
},
24
auth0: {
25
client_id: 'client_id',
26
domain: 'demo-localhost.us.auth0.com'
27
}
28
};
29
30
export default config;
Copied!
1
import { PaletteMode } from '@material-ui/core';
2
3
const config: {
4
basename: string;
5
defaultPath: string;
6
fontFamily: string;
7
borderRadius: number;
8
outlinedFilled: boolean;
9
theme: PaletteMode;
10
presetColor: string;
11
i18n: string;
12
rtlLayout: boolean;
13
jwt: {
14
secret: string;
15
timeout: string;
16
};
17
firebase: {
18
apiKey: string;
19
authDomain: string;
20
projectId: string;
21
storageBucket: string;
22
messagingSenderId: string;
23
appId: string;
24
measurementId: string;
25
};
26
auth0: {
27
client_id: string;
28
domain: string;
29
};
30
} = {
31
// basename: only at build time to set, and Don't add '/' at end off
32
// BASENAME for breadcrumbs, also Don't put only '/' use blank('') instead
33
// like '/berry-material-react/react/default'
34
basename: '',
35
defaultPath: '/dashboard/default',
36
fontFamily: `'Roboto', sans-serif`,
37
borderRadius: 12,
38
outlinedFilled: true,
39
theme: 'light', // light, dark
40
presetColor: 'default', // default, theme1, theme2, theme3, theme4, theme5
41
// 'en' - English, 'fr' - French, 'ro' - Romanian, 'zh' - Chinese
42
i18n: 'en',
43
rtlLayout: false,
44
jwt: {
45
...
46
},
47
firebase: {
48
...
49
},
50
auth0: {
51
...
52
}
53
};
54
55
export default config;
Copied!
Last modified 13d ago
Copy link