or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

ai-agent.mdauthentication.mdcli.mdconfiguration.mdindex.mdmiddleware.md

index.mddocs/

0

# Parse Dashboard

1

2

Parse Dashboard is a standalone web application dashboard for managing Parse Server apps. It provides a comprehensive interface for database administration, cloud code management, push notifications, user authentication, and configuration management. The dashboard can be deployed as a standalone application or integrated as Express middleware into existing Node.js applications.

3

4

## Package Information

5

6

- **Package Name**: parse-dashboard

7

- **Package Type**: npm

8

- **Language**: JavaScript (React + Express.js)

9

- **Installation**: `npm install -g parse-dashboard` (global CLI) or `npm install parse-dashboard` (middleware)

10

11

## Core Imports

12

13

```javascript

14

const ParseDashboard = require('parse-dashboard');

15

const { startServer } = require('parse-dashboard/Parse-Dashboard/server');

16

```

17

18

For ES modules:

19

20

```javascript

21

import ParseDashboard from 'parse-dashboard';

22

```

23

24

Note: The `startServer` function is used internally by the CLI but can also be imported for programmatic server creation.

25

26

## Basic Usage

27

28

### Standalone CLI

29

30

```bash

31

parse-dashboard --appId myAppId --masterKey myMasterKey --serverURL http://localhost:1337/parse --appName "My App"

32

```

33

34

### Express Middleware Integration

35

36

```javascript

37

const express = require('express');

38

const ParseDashboard = require('parse-dashboard');

39

40

const dashboard = new ParseDashboard({

41

apps: [{

42

serverURL: 'http://localhost:1337/parse',

43

appId: 'myAppId',

44

masterKey: 'myMasterKey',

45

appName: 'My App'

46

}]

47

});

48

49

const app = express();

50

app.use('/dashboard', dashboard);

51

app.listen(4040);

52

```

53

54

## Architecture

55

56

Parse Dashboard is built around several key components:

57

58

- **Express Middleware**: Factory function that creates dashboard middleware for integration into Express applications

59

- **CLI Interface**: Command-line tool with comprehensive configuration options and environment variable support

60

- **Authentication System**: Multi-user authentication with support for basic auth, MFA (TOTP), and read-only access controls

61

- **Configuration Management**: Complex nested configuration system supporting multiple Parse Server apps and advanced features

62

- **AI Agent Integration**: OpenAI-powered assistant for natural language database operations

63

- **Web Interface**: React-based dashboard providing full Parse Server management capabilities

64

65

## Capabilities

66

67

### CLI Interface

68

69

Command-line interface for running Parse Dashboard as a standalone application with comprehensive configuration options and environment variable support.

70

71

```javascript { .api }

72

// Main CLI command: parse-dashboard [options]

73

// Available options:

74

interface CLIOptions {

75

appId?: string; // Parse App ID

76

masterKey?: string; // Parse Master Key

77

serverURL?: string; // Parse Server URL

78

dev?: boolean; // Development mode

79

config?: string; // Path to configuration file

80

host?: string; // Host to bind (default: 0.0.0.0)

81

port?: string; // Port to listen (default: 4040)

82

allowInsecureHTTP?: boolean; // Allow HTTP connections

83

// ... 10+ additional options

84

}

85

```

86

87

[CLI Interface](./cli.md)

88

89

### Express Middleware

90

91

Factory function for creating Parse Dashboard middleware that can be integrated into existing Express applications.

92

93

```javascript { .api }

94

/**

95

* Creates Parse Dashboard Express middleware

96

* @param config - Dashboard configuration object

97

* @param options - Optional middleware configuration

98

* @returns Express middleware function

99

*/

100

function ParseDashboard(config: DashboardConfig, options?: MiddlewareOptions): Function;

101

102

interface DashboardConfig {

103

apps: AppConfig[];

104

users?: UserConfig[];

105

agent?: AgentConfig;

106

useEncryptedPasswords?: boolean;

107

iconsFolder?: string;

108

trustProxy?: boolean;

109

enableResourceCache?: boolean;

110

enableSecurityChecks?: boolean;

111

}

112

113

interface MiddlewareOptions {

114

allowInsecureHTTP?: boolean;

115

cookieSessionSecret?: string;

116

cookieSessionMaxAge?: number;

117

dev?: boolean;

118

}

119

```

120

121

[Express Middleware](./middleware.md)

122

123

### Server Function

124

125

Standalone server function for creating and starting a Parse Dashboard server (used by CLI).

126

127

```javascript { .api }

128

/**

129

* Creates and starts standalone Parse Dashboard server

130

* @param options - Server configuration options including CLI options

131

*/

132

function startServer(options: ServerOptions): void;

133

134

interface ServerOptions extends MiddlewareOptions {

135

host?: string; // Host to bind (default: 0.0.0.0)

136

port?: string; // Port to listen (default: 4040)

137

mountPath?: string; // Mount path (default: /)

138

sslKey?: string; // Path to SSL private key

139

sslCert?: string; // Path to SSL certificate

140

trustProxy?: boolean; // Trust proxy headers

141

config?: string; // Path to configuration file

142

appId?: string; // Parse App ID (for CLI configuration)

143

masterKey?: string; // Parse Master Key (for CLI configuration)

144

serverURL?: string; // Parse Server URL (for CLI configuration)

145

graphQLServerURL?: string; // GraphQL Server URL (for CLI configuration)

146

appName?: string; // App display name (for CLI configuration)

147

agent?: string; // JSON string of agent configuration

148

}

149

```

150

151

### Configuration Management

152

153

Comprehensive configuration system supporting multiple Parse Server apps, authentication, features, and advanced customization options.

154

155

```javascript { .api }

156

interface AppConfig {

157

serverURL: string;

158

appId: string;

159

masterKey: string | (() => string);

160

appName: string;

161

graphQLServerURL?: string;

162

readOnlyMasterKey?: string;

163

masterKeyTtl?: number;

164

appNameForURL?: string; // Custom URL slug for the app

165

production?: boolean;

166

iconName?: string;

167

primaryBackgroundColor?: string;

168

secondaryBackgroundColor?: string;

169

columnPreference?: ColumnPreference;

170

classPreference?: ClassPreference;

171

scripts?: ScriptConfig[];

172

}

173

174

interface ColumnPreference {

175

[className: string]: ColumnConfig[];

176

}

177

178

interface ColumnConfig {

179

name: string;

180

visible: boolean;

181

preventSort?: boolean;

182

filterSortToTop?: boolean;

183

}

184

185

interface ClassPreference {

186

[className: string]: {

187

filters?: FilterConfig[];

188

};

189

}

190

191

interface FilterConfig {

192

name: string;

193

filter: FilterConstraint[];

194

}

195

196

interface FilterConstraint {

197

field: string;

198

constraint: string;

199

value?: any;

200

}

201

202

interface ScriptConfig {

203

title: string;

204

classes: string[];

205

cloudCodeFunction: string;

206

showConfirmationDialog?: boolean;

207

confirmationDialogStyle?: string;

208

}

209

```

210

211

[Configuration](./configuration.md)

212

213

### Authentication System

214

215

Multi-user authentication system with support for basic authentication, multi-factor authentication (TOTP), and read-only access controls.

216

217

```javascript { .api }

218

interface UserConfig {

219

user: string;

220

pass: string;

221

readOnly?: boolean;

222

apps?: UserAppConfig[];

223

mfa?: string;

224

mfaAlgorithm?: string;

225

mfaDigits?: number;

226

mfaPeriod?: number;

227

}

228

229

interface UserAppConfig {

230

appId: string;

231

readOnly?: boolean;

232

}

233

234

class Authentication {

235

constructor(validUsers: UserConfig[], useEncryptedPasswords: boolean, mountPath: string);

236

initialize(app: Express.Application, options: AuthOptions): void;

237

authenticate(userToTest: any, usernameOnly?: boolean): AuthResult;

238

}

239

240

interface AuthOptions {

241

cookieSessionSecret?: string;

242

cookieSessionMaxAge?: number;

243

mountPath?: string;

244

}

245

246

interface AuthResult {

247

isAuthenticated: boolean;

248

matchingUsername: string | null;

249

otpMissingLength: number | false;

250

otpValid: boolean;

251

appsUserHasAccessTo: UserAppConfig[] | null;

252

isReadOnly: boolean;

253

}

254

```

255

256

[Authentication](./authentication.md)

257

258

### AI Agent Integration

259

260

OpenAI-powered AI assistant that provides natural language interface for database operations and Parse Server management.

261

262

```javascript { .api }

263

interface AgentConfig {

264

models: ModelConfig[];

265

}

266

267

interface ModelConfig {

268

name: string;

269

provider: string;

270

model: string;

271

apiKey: string;

272

}

273

274

// AI Agent API endpoint: POST /apps/:appId/agent

275

interface AgentRequest {

276

message: string;

277

modelName: string;

278

conversationId?: string;

279

permissions: {

280

createObject: boolean;

281

updateObject: boolean;

282

deleteObject: boolean;

283

createClass: boolean;

284

deleteClass: boolean;

285

};

286

}

287

```

288

289

[AI Agent](./ai-agent.md)