Platform services
Database
The Database service provisions and connects databases for your project. It can attach to an existing shared server or spin up a dedicated one, for MongoDB, PostgreSQL, and Redis.
What it does
Dreambase POSTs webhook events to the Database service; the service acts on them — provisioning servers, running health checks, executing function calls — and calls back into the Dreambase API to report status, logs, and outputs such as a connection string.
Built on NestJS
The Database service is a NestJS application. Each integration exposes a singlePOST /<name>/webhook endpoint, and the app can run as a single Vercel serverless function or as a local Node process.Integrations
Each integration has its own dedicated reference page:
Database (generic)
A deployment-less placeholder for an external or unmanaged database.
MongoDB
Attach a database on a shared or dedicated MongoDB server.
MongoDB Server
Spin up and manage a local mongod server process.
PostgreSQL
Provision a database on a shared or dedicated PostgreSQL server.
PostgreSQL Server
Deploy a PostgreSQL server via Docker, Neon, Render, and more.
Redis
Provision a shared or dedicated Redis instance on the platform of your choice.
Each integration is its own webhook route:
/database/webhook/mongo/webhook/mongod/webhookmongod process/postgres/webhook/postgres-server/webhook/redis/webhookThe mongo and postgres routes attach a new database on an existing, shared server, while postgres-server provisions a dedicated server (via Docker or a cloud provider) and mongod manages a local mongod process for development. The redis route does both in one service — a namespaced slice of a shared server, or a dedicated instance on the provider of your choice.
Events it handles
All routes understand the same event names:
WEBHOOK_CHALLENGE— verify the webhook endpoint.HEALTH_CHECK— confirm the database is reachable.DEPLOYMENT_CREATED— provision/attach the database and return its connection details.DEPLOYMENT_DELETED— tear the database down.DOWNLOAD_STARTED— signal that a build/download has begun.FUNCTION_CALL— run a named database function.
Configuration
The service is configured through environment variables. The most important ones:
| Variable | Required | Description |
|---|---|---|
DREAMBASE_API_URL | yes | Base URL of the Dreambase API the service calls back into. |
CORS_ORIGINS | prod | Comma-separated allowed origins. |
MONGO_SHARED_SERVER_URL | optional | Shared MongoDB connection string (no database name). |
POSTGRES_SHARED_SERVER_URL | optional | Shared PostgreSQL connection string (no database name). |
REDIS_SHARED_SERVER_URL | optional | Shared Redis connection string (redis:///rediss://) for serverType=shared. |
PORT | optional | Local server port (default 3008; unused on Vercel). |
DISABLE_LOCAL_PROCESSES | optional | Force-treat the runtime as serverless (disables mongod/Docker spawning). |
ENABLE_LOCAL_PROCESSES | optional | Force-allow local process spawning on a detected serverless host. |
Serverless limitations
On serverless hosts there is no persistent local machine, so themongod route — which spawns and manages a local process — is meant for local or long-running deployments. Use the shared-server or provisioned-server routes when running serverless.