# Deploy your app

Foundation builds and hosts your frontend from your Git repo. You add one config file; Foundation does
the rest.

## The one file you add: `mvp.config.json`

At your app repo root:

```json
{
  "build": "npm install && npm run build",
  "files": "dist",
  "entry": "index.html",
  "sdk": "^1.0.0"
}
```

| Field | Meaning |
|---|---|
| `build` | Command Foundation runs before deploying |
| `files` | Build output directory to upload |
| `entry` | Entry file inside `files` |
| `sdk` | SDK compatibility hint |
| `node` | Optional Node major version |

Adjust `files` and `entry` only if your framework builds somewhere other than `dist` / `index.html`.

## What happens on deploy

Foundation reads `mvp.config.json` from GitHub, downloads the repo, runs your build, uploads the output
directory, and writes `/foundation-env.json` next to the built assets. The SDK reads that file
automatically in production — so production code needs no identity values and no `baseUrl`.

> Don't create `/foundation-env.json` yourself for production — Foundation writes it.

## Before you ship — checklist

- `mvp.config.json` exists at the repo root with `build`, `files`, and `entry`.
- The build command succeeds and produces the `files` directory containing the `entry` file.
- The SDK initializes from explicit config locally, and from `/foundation-env.json` in production.
- Production doesn't depend on `baseUrl`.
- Built assets contain no private secrets.

## Reference

- [Deploy contract](/agents/foundation-deploy-contract.md) — canonical
- [Deployments](/platform/deployment) — shared vs dedicated
- [Set up the SDK](/build/sdk)
