# parse-community/parse-server architecture

> Architecture diagram of the GitHub repository parse-community/parse-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parse-community/parse-server
- Repository: https://github.com/parse-community/parse-server

## Overview

Parse Server is a Node.js backend that exposes a Parse-compatible API and can run standalone or within an Express application. The principal workflow is a client request entering the server, reaching API routes, being handled with authorization and domain logic, and reading or changing persisted data. The repository also documents GraphQL and Live Query, and its source tree identifies file, push, authentication, and Cloud Code capabilities. The sampled excerpts confirm storage-adapter and Live Query behavior; unsampled subsystem connections are shown only where supported by the documented product structure.

Main entry points: [`src/Routers`](https://github.com/parse-community/parse-server/tree/alpha/src/Routers) (API routers), [`src/Controllers/DatabaseController.js`](https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/DatabaseController.js) (Database controller), [`src/Adapters/Storage/StorageAdapter.js`](https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/StorageAdapter.js) (Storage interface), [`src/LiveQuery/ParseLiveQueryServer.ts`](https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParseLiveQueryServer.ts) (Live Query server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API handling"]
  node_server["Server entry<br/>[ParseServer.ts]"]
  node_restapi["REST controller"]
  node_routers["API routers"]
  node_auth["Authentication<br/>[Auth.js]"]
  node_user["User operations<br/>[UserController.js]"]
  node_graphql["GraphQL API"]
  node_graphqlrouter["GraphQL routing<br/>[GraphQLRouter.js]"]
end

subgraph group_data["Data and files"]
  node_database["Database controller"]
  node_restquery["REST queries<br/>[RestQuery.js]"]
  node_restwrite["REST writes<br/>[RestWrite.js]"]
  node_storage["Storage interface<br/>[StorageAdapter.js]"]
  node_mongo["Mongo adapter"]
  node_postgres["Postgres adapter"]
  node_files["File handling<br/>[FilesController.js]"]
  node_fileadapter["File adapters<br/>[FilesAdapter.js]"]
end

subgraph group_realtime["Realtime and tasks"]
  node_livecontroller["Live Query controller"]
  node_livequery["Live Query server"]
  node_websocket["WebSocket server"]
  node_pubsub["Pub/Sub<br/>[ParsePubSub.js]"]
end

subgraph group_extensions["Platform capabilities"]
  node_cloud["Cloud Code<br/>[Parse.Cloud.js]"]
  node_push["Push notifications<br/>[PushWorker.js]"]
end

node_client(("Parse client"))
node_datastore[("MongoDB / PostgreSQL")]
node_services(("External services"))

node_client -->|"sends requests"| node_server
node_server -->|"handles REST"| node_restapi
node_restapi -->|"dispatches routes"| node_routers
node_routers -->|"authorizes requests"| node_auth
node_routers -->|"handles data"| node_database
node_routers -->|"handles users"| node_user
node_database -->|"queries through"| node_restquery
node_database -->|"writes through"| node_restwrite
node_database -->|"uses adapter"| node_storage
node_storage -->|"implemented by"| node_mongo
node_storage -->|"implemented by"| node_postgres
node_mongo -->|"reads and writes"| node_datastore
node_postgres -->|"reads and writes"| node_datastore
node_routers -->|"handles files"| node_files
node_files -->|"uses adapter"| node_fileadapter
node_client -->|"sends GraphQL"| node_graphqlrouter
node_graphqlrouter -->|"dispatches to"| node_graphql
node_routers -->|"routes Cloud Code"| node_cloud
node_routers -->|"routes push"| node_push
node_livecontroller -->|"publishes changes"| node_livequery
node_client -->|"opens connection"| node_websocket
node_livequery -->|"initializes server"| node_websocket
node_livequery -->|"creates subscriber"| node_pubsub
node_services -.->|"delivers notifications"| node_push

click node_server "https://github.com/parse-community/parse-server/blob/alpha/src/ParseServer.ts"
click node_restapi "https://github.com/parse-community/parse-server/blob/alpha/src/ParseServerRESTController.js"
click node_routers "https://github.com/parse-community/parse-server/tree/alpha/src/Routers"
click node_auth "https://github.com/parse-community/parse-server/blob/alpha/src/Auth.js"
click node_user "https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/UserController.js"
click node_database "https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/DatabaseController.js"
click node_restquery "https://github.com/parse-community/parse-server/blob/alpha/src/RestQuery.js"
click node_restwrite "https://github.com/parse-community/parse-server/blob/alpha/src/RestWrite.js"
click node_storage "https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/StorageAdapter.js"
click node_mongo "https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/Mongo/MongoStorageAdapter.js"
click node_postgres "https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js"
click node_files "https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/FilesController.js"
click node_fileadapter "https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Files/FilesAdapter.js"
click node_graphql "https://github.com/parse-community/parse-server/blob/alpha/src/GraphQL/ParseGraphQLServer.js"
click node_graphqlrouter "https://github.com/parse-community/parse-server/blob/alpha/src/Routers/GraphQLRouter.js"
click node_cloud "https://github.com/parse-community/parse-server/blob/alpha/src/cloud-code/Parse.Cloud.js"
click node_push "https://github.com/parse-community/parse-server/blob/alpha/src/Push/PushWorker.js"
click node_livecontroller "https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/LiveQueryController.js"
click node_livequery "https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParseLiveQueryServer.ts"
click node_websocket "https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParseWebSocketServer.js"
click node_pubsub "https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParsePubSub.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_restapi,node_routers,node_auth,node_user,node_graphql,node_graphqlrouter,node_client toneBlue
class node_database,node_restquery,node_restwrite,node_storage,node_mongo,node_postgres,node_files,node_fileadapter,node_datastore toneAmber
class node_livecontroller,node_livequery,node_websocket,node_pubsub toneMint
class node_cloud,node_push toneRose
class node_services toneIndigo
```

## Components

### API handling

- [Server entry](https://github.com/parse-community/parse-server/blob/alpha/src/ParseServer.ts): `src/ParseServer.ts`
- [REST controller](https://github.com/parse-community/parse-server/blob/alpha/src/ParseServerRESTController.js): `src/ParseServerRESTController.js`
- [API routers](https://github.com/parse-community/parse-server/tree/alpha/src/Routers): `src/Routers`
- [Authentication](https://github.com/parse-community/parse-server/blob/alpha/src/Auth.js): `src/Auth.js`
- [User operations](https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/UserController.js): `src/Controllers/UserController.js`
- [GraphQL API](https://github.com/parse-community/parse-server/blob/alpha/src/GraphQL/ParseGraphQLServer.js): `src/GraphQL/ParseGraphQLServer.js`
- [GraphQL routing](https://github.com/parse-community/parse-server/blob/alpha/src/Routers/GraphQLRouter.js): `src/Routers/GraphQLRouter.js`

### Data and files

- [Database controller](https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/DatabaseController.js): `src/Controllers/DatabaseController.js`
- [REST queries](https://github.com/parse-community/parse-server/blob/alpha/src/RestQuery.js): `src/RestQuery.js`
- [REST writes](https://github.com/parse-community/parse-server/blob/alpha/src/RestWrite.js): `src/RestWrite.js`
- [Storage interface](https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/StorageAdapter.js): `src/Adapters/Storage/StorageAdapter.js`
- [Mongo adapter](https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/Mongo/MongoStorageAdapter.js): `src/Adapters/Storage/Mongo/MongoStorageAdapter.js`
- [Postgres adapter](https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js): `src/Adapters/Storage/Postgres/PostgresStorageAdapter.js`
- [File handling](https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/FilesController.js): `src/Controllers/FilesController.js`
- [File adapters](https://github.com/parse-community/parse-server/blob/alpha/src/Adapters/Files/FilesAdapter.js): `src/Adapters/Files/FilesAdapter.js`

### Realtime and tasks

- [Live Query controller](https://github.com/parse-community/parse-server/blob/alpha/src/Controllers/LiveQueryController.js): `src/Controllers/LiveQueryController.js`
- [Live Query server](https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParseLiveQueryServer.ts): `src/LiveQuery/ParseLiveQueryServer.ts`
- [WebSocket server](https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParseWebSocketServer.js): `src/LiveQuery/ParseWebSocketServer.js`
- [Pub/Sub](https://github.com/parse-community/parse-server/blob/alpha/src/LiveQuery/ParsePubSub.js): `src/LiveQuery/ParsePubSub.js`

### Platform capabilities

- [Cloud Code](https://github.com/parse-community/parse-server/blob/alpha/src/cloud-code/Parse.Cloud.js): `src/cloud-code/Parse.Cloud.js`
- [Push notifications](https://github.com/parse-community/parse-server/blob/alpha/src/Push/PushWorker.js): `src/Push/PushWorker.js`

### Other components

- **Parse client**
- **MongoDB / PostgreSQL**
- **External services**

## Connections

- Parse client → Server entry: sends requests
- Server entry → REST controller: handles REST
- REST controller → API routers: dispatches routes
- API routers → Authentication: authorizes requests
- API routers → Database controller: handles data
- API routers → User operations: handles users
- Database controller → REST queries: queries through
- Database controller → REST writes: writes through
- Database controller → Storage interface: uses adapter
- Storage interface → Mongo adapter: implemented by
- Storage interface → Postgres adapter: implemented by
- Mongo adapter → MongoDB / PostgreSQL: reads and writes
- Postgres adapter → MongoDB / PostgreSQL: reads and writes
- API routers → File handling: handles files
- File handling → File adapters: uses adapter
- Parse client → GraphQL routing: sends GraphQL
- GraphQL routing → GraphQL API: dispatches to
- API routers → Cloud Code: routes Cloud Code
- API routers → Push notifications: routes push
- Live Query controller → Live Query server: publishes changes
- Parse client → WebSocket server: opens connection
- Live Query server → WebSocket server: initializes server
- Live Query server → Pub/Sub: creates subscriber
- External services → Push notifications: delivers notifications
