> ## Documentation Index
> Fetch the complete documentation index at: https://sdk.docs.xano.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What you built

> A tour of the project that npx @xano/sdk init writes: the backend in xano/, the frontend in frontend/, the files to commit, and which npm script deploys to which target.

`npx @xano/sdk init my-app` writes one project with two halves: a Xano backend in `xano/`
and a Vite frontend in `frontend/`, under a single `package.json`. This page walks through the
React scaffold. The Svelte one has the same backend half.

## The layout

```text theme={null}
my-app/
├── xano/
│   ├── index.ts            your backend: tables, APIs, functions, registered on one workspace
│   ├── EXAMPLE.md          a walkthrough for your first table and endpoint
│   ├── .env.example        names of the backend's env vars (values go in xano/.env)
│   ├── lambdas/            type-checking config for lambda code
│   ├── xano.lock           written by the first deploy or export
│   └── routes.gen.ts       written once the backend has an endpoint
├── frontend/
│   ├── index.html
│   └── src/
│       ├── App.tsx
│       └── lib/api.ts      where the frontend calls the backend
├── package.json            scripts, dependencies, and the Xano Engine pin
├── xano.profile.json       which signed-in Xano profile this project deploys with
├── AGENTS.md               a brief for coding agents working in this project
├── .mcp.json               connects Claude Code to the Xano Engine's MCP server
├── .cursor/mcp.json        the same, for Cursor
├── .github/workflows/check.yml   runs npm run xano:check on every push and pull request
└── README.md
```

`xano/index.ts` starts empty but already compiles and deploys. Everything you author is a
**def object** (a `table()`, a `query()`, an `apiGroup()`) registered on the
`workspace("my-app")` it default-exports. [How it works](/start/how-it-works) explains the
model, and [Your first change](/build/first-change) adds a table and an endpoint.

## What to commit

Commit the whole project except what `.gitignore` already leaves out. Three files are easy to
get wrong:

| File | Why it is committed |
| - | - |
| `xano/xano.lock` | Pins each object's identity and each API group's URL slug, so a rename stays a rename instead of a delete and re-create. Every build updates it. |
| `package.json` | Holds the Xano Engine pin the first deploy writes, so everyone on the project runs the same Engine version. |
| `xano/routes.gen.ts` | The route manifest the frontend takes its paths and request types from. `npm run xano:check` fails when it is stale. |

The Engine pin looks like this:

```json theme={null}
{
  "xanosdk": {
    "@xano/sdk": { "engine": "vX.Y.Z" }
  }
}
```

The pin moves only when you say so: a deploy offers a newer Engine and never applies it without
a yes, and `npx xanosdk local update` moves it on purpose. See
[Xano Engine](/run/xano-engine).

Two backend files are never committed: `xano/.env` holds the values of your backend's
environment variables, and `xano/.secrets.json` holds documentation tokens. `.env.local` holds
the `VITE_XANO_HOST` the Engine deploy writes, and is per machine.

## Which script deploys where

| Script | What it does | Target |
| - | - | - |
| `npm run xano:deploy` | Type-checks, then deploys the backend with `--keep-data`, so your rows survive the redeploy. Writes the backend URL into `.env.local`. | The Xano Engine on your machine |
| `npm run xano:deploy:ephemeral` | Builds the frontend, then deploys the backend and the built frontend together. | An ephemeral in Xano's cloud (needs an account) |
| `npm run xano:deploy:frontend` | Rebuilds the frontend and republishes it, without touching the backend. | The Engine or ephemeral you last deployed to |
| `npm run xano:test` | Runs the tests on the backend you last deployed. Compiles nothing. | The Engine or ephemeral you last deployed to |
| `npm run xano:check` | Checks the routes, types and `xano.lock` without writing anything. This is what CI runs. | Nothing |
| `npm run xano:export` | Compiles the backend to `workspace.json` (do not commit it). | Nothing |
| `npm run dev` | Starts the Vite dev server against `VITE_XANO_HOST`. | Your browser |

Your workspace is reached through a release, never through a script: deploy to an ephemeral
with tests, cut a release, then promote it. [Deploy to Xano](/ship/overview) covers that path.

## Next

* [How it works](/start/how-it-works): def objects, bundles, and where the SDK sits next to
  XanoScript and the Xano editor.
* [Your first change](/build/first-change): add a table and an endpoint.
* [Where your code goes](/ship/where-code-goes): every deploy command and what it writes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.