0
# Configuration
1
2
Parse Dashboard uses a comprehensive configuration system that supports multiple Parse Server apps, advanced features, and extensive customization options.
3
4
## Capabilities
5
6
### App Configuration
7
8
Configuration for individual Parse Server applications:
9
10
```javascript { .api }
11
interface AppConfig {
12
/**
13
* Parse Server URL (required)
14
* The URL of your Parse Server instance
15
*/
16
serverURL: string;
17
18
/**
19
* Parse App ID (required)
20
* The application identifier for your Parse app
21
*/
22
appId: string;
23
24
/**
25
* Master Key (required)
26
* Can be a string or function that returns the master key
27
*/
28
masterKey: string | (() => string);
29
30
/**
31
* App display name (required)
32
* Human-readable name shown in the dashboard
33
*/
34
appName: string;
35
36
/**
37
* GraphQL Server URL (optional)
38
* URL for GraphQL endpoint if different from serverURL
39
*/
40
graphQLServerURL?: string;
41
42
/**
43
* Read-only Master Key (optional)
44
* Master key with read-only permissions
45
*/
46
readOnlyMasterKey?: string;
47
48
/**
49
* Master Key TTL (optional)
50
* Time-to-live for master key in seconds
51
*/
52
masterKeyTtl?: number;
53
54
/**
55
* Custom URL slug (optional)
56
* Custom identifier for URL paths
57
*/
58
appNameForURL?: string;
59
60
/**
61
* Production flag (optional)
62
* Indicates if this is a production environment
63
*/
64
production?: boolean;
65
66
/**
67
* App icon filename (optional)
68
* Icon file in the iconsFolder
69
*/
70
iconName?: string;
71
72
/**
73
* Primary background color (optional)
74
* CSS color value for app background
75
*/
76
primaryBackgroundColor?: string;
77
78
/**
79
* Secondary background color (optional)
80
* CSS color value for secondary backgrounds
81
*/
82
secondaryBackgroundColor?: string;
83
84
/**
85
* Column display preferences (optional)
86
* Configuration for data browser column behavior
87
*/
88
columnPreference?: ColumnPreference;
89
90
/**
91
* Class-level preferences (optional)
92
* Configuration for class-specific features
93
*/
94
classPreference?: ClassPreference;
95
96
/**
97
* Custom scripts (optional)
98
* Cloud Function scripts available in the dashboard
99
*/
100
scripts?: ScriptConfig[];
101
}
102
```
103
104
### Column Preferences
105
106
Configuration for data browser column display and behavior:
107
108
```javascript { .api }
109
interface ColumnPreference {
110
[className: string]: ColumnConfig[];
111
}
112
113
interface ColumnConfig {
114
/**
115
* Column/field name
116
*/
117
name: string;
118
119
/**
120
* Whether column is visible by default
121
*/
122
visible: boolean;
123
124
/**
125
* Prevent sorting on this column
126
*/
127
preventSort?: boolean;
128
129
/**
130
* Sort this column to top in filter popup
131
*/
132
filterSortToTop?: boolean;
133
}
134
```
135
136
### Class Preferences
137
138
Configuration for class-specific features and persistent filters:
139
140
```javascript { .api }
141
interface ClassPreference {
142
[className: string]: {
143
/**
144
* Persistent filters for the class
145
*/
146
filters?: FilterConfig[];
147
};
148
}
149
150
interface FilterConfig {
151
/**
152
* Filter display name
153
*/
154
name: string;
155
156
/**
157
* Filter constraints
158
*/
159
filter: FilterConstraint[];
160
}
161
162
interface FilterConstraint {
163
/**
164
* Field name to filter on
165
*/
166
field: string;
167
168
/**
169
* Constraint type (eq, ne, lt, gt, etc.)
170
*/
171
constraint: string;
172
173
/**
174
* Filter value (optional)
175
*/
176
value?: any;
177
}
178
```
179
180
### Script Configuration
181
182
Configuration for custom Cloud Function scripts available in the dashboard:
183
184
```javascript { .api }
185
interface ScriptConfig {
186
/**
187
* Script display title
188
*/
189
title: string;
190
191
/**
192
* Classes this script applies to
193
*/
194
classes: string[];
195
196
/**
197
* Cloud Function name to execute
198
*/
199
cloudCodeFunction: string;
200
201
/**
202
* Show confirmation dialog before execution
203
*/
204
showConfirmationDialog?: boolean;
205
206
/**
207
* Confirmation dialog style/type
208
*/
209
confirmationDialogStyle?: string;
210
}
211
```
212
213
### Global Configuration
214
215
Top-level configuration object structure:
216
217
```javascript { .api }
218
interface DashboardConfig {
219
/**
220
* Parse Server applications (required)
221
*/
222
apps: AppConfig[];
223
224
/**
225
* Dashboard users for authentication (optional)
226
*/
227
users?: UserConfig[];
228
229
/**
230
* Use encrypted passwords (bcrypt) (optional)
231
* Default: false (plain text comparison)
232
*/
233
useEncryptedPasswords?: boolean;
234
235
/**
236
* Folder containing app icons (optional)
237
* Path to directory with icon files
238
*/
239
iconsFolder?: string;
240
241
/**
242
* Trust proxy headers (optional)
243
* Enable when behind reverse proxy
244
*/
245
trustProxy?: boolean;
246
247
/**
248
* Enable browser resource caching (optional)
249
* Default: true
250
*/
251
enableResourceCache?: boolean;
252
253
/**
254
* Enable security status checks (optional)
255
* Default: true
256
*/
257
enableSecurityChecks?: boolean;
258
259
/**
260
* AI Agent configuration (optional)
261
*/
262
agent?: AgentConfig;
263
}
264
```
265
266
**Configuration Examples:**
267
268
```javascript
269
// Basic single app configuration
270
const config = {
271
apps: [{
272
serverURL: 'http://localhost:1337/parse',
273
appId: 'myAppId',
274
masterKey: 'myMasterKey',
275
appName: 'My Application'
276
}]
277
};
278
279
// Multi-app configuration with customization
280
const multiAppConfig = {
281
apps: [
282
{
283
serverURL: 'http://prod-server.com/parse',
284
appId: 'prodAppId',
285
masterKey: 'prodMasterKey',
286
appName: 'Production App',
287
production: true,
288
iconName: 'prod-icon.png',
289
primaryBackgroundColor: '#1e3a8a',
290
readOnlyMasterKey: 'readOnlyKey'
291
},
292
{
293
serverURL: 'http://localhost:1337/parse',
294
appId: 'devAppId',
295
masterKey: () => process.env.DEV_MASTER_KEY,
296
appName: 'Development App',
297
production: false,
298
iconName: 'dev-icon.png',
299
primaryBackgroundColor: '#059669'
300
}
301
],
302
users: [{
303
user: 'admin',
304
pass: 'securePassword123'
305
}],
306
iconsFolder: './dashboard-icons',
307
useEncryptedPasswords: true,
308
enableSecurityChecks: true
309
};
310
311
// Configuration with column preferences
312
const configWithPreferences = {
313
apps: [{
314
serverURL: 'http://localhost:1337/parse',
315
appId: 'myAppId',
316
masterKey: 'myMasterKey',
317
appName: 'My App',
318
columnPreference: {
319
'User': [
320
{ name: 'objectId', visible: false },
321
{ name: 'username', visible: true, filterSortToTop: true },
322
{ name: 'email', visible: true },
323
{ name: 'createdAt', visible: true, preventSort: false }
324
],
325
'Post': [
326
{ name: 'title', visible: true, filterSortToTop: true },
327
{ name: 'content', visible: true },
328
{ name: 'author', visible: true }
329
]
330
},
331
classPreference: {
332
'User': {
333
filters: [
334
{
335
name: 'Active Users',
336
filter: [
337
{ field: 'emailVerified', constraint: 'eq', value: true },
338
{ field: 'createdAt', constraint: 'gte' }
339
]
340
}
341
]
342
}
343
}
344
}]
345
};
346
347
// Configuration with custom scripts
348
const configWithScripts = {
349
apps: [{
350
serverURL: 'http://localhost:1337/parse',
351
appId: 'myAppId',
352
masterKey: 'myMasterKey',
353
appName: 'My App',
354
scripts: [
355
{
356
title: 'Send Welcome Email',
357
classes: ['User'],
358
cloudCodeFunction: 'sendWelcomeEmail',
359
showConfirmationDialog: true,
360
confirmationDialogStyle: 'info'
361
},
362
{
363
title: 'Generate Report',
364
classes: ['Order', 'User'],
365
cloudCodeFunction: 'generateSalesReport',
366
showConfirmationDialog: true
367
}
368
]
369
}]
370
};
371
372
// Environment-based configuration
373
const envConfig = {
374
apps: [{
375
serverURL: process.env.PARSE_SERVER_URL,
376
appId: process.env.PARSE_APP_ID,
377
masterKey: process.env.PARSE_MASTER_KEY,
378
appName: process.env.APP_NAME,
379
graphQLServerURL: process.env.GRAPHQL_SERVER_URL,
380
production: process.env.NODE_ENV === 'production'
381
}],
382
users: process.env.DASHBOARD_USERS ? JSON.parse(process.env.DASHBOARD_USERS) : undefined,
383
trustProxy: process.env.TRUST_PROXY === 'true',
384
enableResourceCache: process.env.ENABLE_CACHE !== 'false'
385
};
386
```
387
388
## Configuration File Loading
389
390
Parse Dashboard can load configuration from JSON files:
391
392
```bash
393
parse-dashboard --config ./dashboard-config.json
394
```
395
396
Example configuration file:
397
398
```json
399
{
400
"apps": [
401
{
402
"serverURL": "http://localhost:1337/parse",
403
"appId": "myAppId",
404
"masterKey": "myMasterKey",
405
"appName": "My Application",
406
"production": false
407
}
408
],
409
"users": [
410
{
411
"user": "admin",
412
"pass": "password123"
413
}
414
],
415
"useEncryptedPasswords": true,
416
"iconsFolder": "./icons"
417
}
418
```