Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt

Use this file to discover all available pages before exploring further.

Deploy Your App automatically detects your framework, package manager, and build scripts by inspecting your repository’s package.json and lockfiles — no manual configuration needed for most projects. However, when you need a custom build step, a non-standard server entry point, or you are working inside a monorepo, you can override these defaults through the project settings API or the dashboard.

Project Settings Fields

The following fields are accepted by PATCH /api/v1/projects/:id and control how deployments are built and started.
FieldTypeDescription
namestringDisplay name for the project
defaultBranchstringThe branch to deploy on push. Defaults to main
buildCommandstring | nullOverride the build script (e.g. npm run build:prod). When null, the auto-detected default is used
startCommandstring | nullOverride the container start command (e.g. node dist/server.js). When null, the framework default is used
rootDirectorystring | nullSubdirectory containing package.json, relative to the repository root (e.g. apps/web). Required for monorepos

Auto-Detection Defaults

When no override is provided, the builder detects the framework by inspecting dependencies and devDependencies in package.json and applies the following defaults:
FrameworkDetected ByOutput DirectoryDefault Start Command
Next.jsnext dependency.nextnpm start (or package-manager variant, e.g. yarn start, bun x next start -p 3000)
Vitevite dependencydistN/A — output is extracted as static files
Create React Appreact-scripts dependencybuildN/A — output is extracted as static files (uses the vite Docker template)
Node.jsexpress, fastify, koa, @nestjs/core, hono, or an existing start script / index.js(none)npm start (or package-manager variant)
For all detected framework types the build command defaults to the package manager’s standard build invocation (e.g. npm run build, pnpm run build, yarn build, bun run build). For Node.js projects that have no start script but do have an index.js at the repository root, the builder automatically falls back to node index.js as the suggested start command.

Package Manager Detection

The builder reads lockfiles in your repository (or rootDirectory) and selects the package manager accordingly. When multiple lockfiles are present a warning is logged and the highest-priority match wins.
LockfilePackage ManagerInstall CommandBuild Command
pnpm-lock.yamlpnpmpnpm install --frozen-lockfilepnpm run build
yarn.lockyarnyarn install --frozen-lockfileyarn build
bun.lock / bun.lockbbunbun install --frozen-lockfilebun run build
package-lock.jsonnpmnpm cinpm run build
(none found)npmnpm installnpm run build

Docker Build Arguments

Overrides are passed into Dockerfiles as build arguments. The Dockerfile templates live in infra/docker/ at the repository root, with one subdirectory per framework (nextjs, nodejs, vite) and one file per package manager (e.g. Dockerfile.npm, Dockerfile.pnpm).
Build ArgDescriptionExample
BUILD_COMMANDOverrides the build script executed during the Docker build stagenpm run build:production
START_COMMANDOverrides the CMD used to start the container (Node.js projects only)node dist/server.js
ROOT_DIRSets the working subdirectory inside the Docker build contextapps/api
These args are injected automatically by the builder based on your project settings — you do not pass them directly unless you are building images manually.

Updating Project Settings via API

curl -X PATCH https://your-domain.com/api/v1/projects/PROJECT_ID \
  -H 'Content-Type: application/json' \
  -b 'session=YOUR_SESSION_COOKIE' \
  -d '{
    "buildCommand": "npm run build:prod",
    "startCommand": "node dist/server.js",
    "rootDirectory": "apps/api"
  }'
A successful response returns the updated project object:
{
  "message": "Project updated successfully",
  "data": {
    "project": {
      "id": "PROJECT_ID",
      "buildCommand": "npm run build:prod",
      "startCommand": "node dist/server.js",
      "rootDirectory": "apps/api"
    }
  }
}
To clear an override and revert to auto-detection, send null for the field:
curl -X PATCH https://your-domain.com/api/v1/projects/PROJECT_ID \
  -H 'Content-Type: application/json' \
  -b 'session=YOUR_SESSION_COOKIE' \
  -d '{
    "buildCommand": null,
    "startCommand": null
  }'

Monorepo Setup

When your repository contains multiple applications, set rootDirectory to the subdirectory that contains the package.json for the app you want to deploy — for example apps/web or packages/server. The builder copies the entire repository into the Docker build context and then switches into that subdirectory, so workspace-level lockfiles and shared packages remain accessible.
A package.json file must exist at the resolved rootDirectory path. If it is missing, the build fails immediately with a descriptive error:
CRITICAL: package.json missing at /path/to/apps/web. Found files: ...
Double-check that rootDirectory matches the exact path relative to your repository root and that the directory is committed to your branch.

Build docs developers (and LLMs) love