# bts.jsonc (/docs/bts-config)



## What is it? [#what-is-it]

`bts.jsonc` is a small config file written to your project root when you create a project. It captures the stack choices you selected (frontend, backend, API, DB/ORM, auth, addons, etc.). The file uses JSONC (JSON with comments) and includes a schema for editor hints.

Where: `./bts.jsonc`

## Why it exists [#why-it-exists]

* Required for the `add` command to detect your current stack
* Helps validate compatibility and pre‑fill sensible defaults

If `bts.jsonc` is missing, the `add` command cannot run because the project cannot be detected.

## Safe to delete (with a caveat) [#safe-to-delete-with-a-caveat]

It’s safe to delete for normal development; the generated code in `apps/*` and `packages/*` remains the source of truth. However, if you plan to use the `add` command later, you must keep `bts.jsonc` so the CLI can detect your project.

## Format [#format]

The file is JSONC with comments enabled and includes a `$schema` URL for tooling.

```jsonc
// Better-T-Stack project metadata
//
// Keep this file to use the `add` command.
// Add addons: bunx @wundero/bts@latest add
//
// Docs: https://www.better-t-stack.dev/docs
// Stack Builder: https://www.better-t-stack.dev/new
{
  "$schema": "https://r2.better-t-stack.dev/schema.json",
  "version": "x.y.z",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "reproducibleCommand": "bunx @wundero/bts@latest my-app --frontend tanstack-router ...",
  "frontend": ["tanstack-router"],
  "backend": "hono",
  "runtime": "bun",
  "database": "sqlite",
  "orm": "drizzle",
  "api": "trpc",
  "auth": "better-auth",
  "payments": "none",
  "addons": ["turborepo"],
  "addonOptions": {
    "wxt": {
      "template": "react",
    },
  },
  "examples": [],
  "dbSetup": "none",
  "dbSetupOptions": {
    "mode": "manual",
  },
  "webDeploy": "none",
  "serverDeploy": "none",
  "packageManager": "bun",
  "shadcn": {
    "preset": "b1x9M8ZeJW",
    "base": "baseui",
    "rtl": false,
    "pointer": false,
  },
}
```

Notes:

* Values mirror what you selected during project creation
* `reproducibleCommand` contains the normal CLI command generated when the project was created
* Deeply nested structured options remain in `addonOptions` or `dbSetupOptions` and may not be fully represented in the one-line command
* `addonOptions` stores nested configuration for prompt-driven addons
* `dbSetupOptions` stores structured database setup behavior for automation
* `shadcn` is only written when a shadcn theme is configured for a React web frontend
* The file may be updated when you run `add` (addons and addon-specific config)
* `payments` accepts `polar`, `stripe`, `autumn`, `dodo`, `creem`, `chargebee`, `commet`, or `none`; all providers require `better-auth`

## shadcn [#shadcn]

The optional `shadcn` object records the shadcn/ui theme applied to a React web frontend. It requires `next`, `tanstack-start`, `tanstack-router`, or `react-router`.

| Field     | Type    | Description                                                                                                                                                              |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `preset`  | string  | Preset code (e.g. `b1x9M8ZeJW`), named preset (`nova`, `vega`, `maia`, `lyra`, `mira`, `luma`, `sera`, or `rhea`), or preset URL. Required whenever `shadcn` is present. |
| `base`    | string  | Headless component base: `baseui` (default), `radixui`, or `react-aria`.                                                                                                 |
| `rtl`     | boolean | Enable right-to-left styles.                                                                                                                                             |
| `pointer` | boolean | Enable pointer cursor styles.                                                                                                                                            |

See also: [`add` command](/docs/cli#add)
