# Backend introduction

> The managed backend behind every Draftship app: data, users, integrations, functions and hosting.


Every app built on Draftship gets a backend automatically. There's nothing to provision.

| Part | What it gives you |
|---|---|
| [Entities](/docs/developers/backend/entities) | Schema-based tables with MongoDB-style queries. |
| [Security rules](/docs/developers/backend/security) | Row-level permissions per operation. |
| [Auth](/docs/developers/backend/auth) | Email and password accounts, roles and sessions per app. |
| [Integrations](/docs/developers/sdk/common-uses) | AI text, images, file uploads and email. |
| [Functions](/docs/developers/backend/functions) | Your own server code with admin access and secrets. |
| [Automations](/docs/logic/automations) | Schedules and data-change triggers. |
| [Agents](/docs/developers/backend/agents) | Chat assistants that use your data with each user's permissions. |
| Hosting | Each app at its own address, with custom domains on paid plans. |

## How apps reach it

The browser SDK (`lib/draftship.ts`) calls `/_ds/...` on the app's own address, so requests stay same-origin. Exported apps call the platform API directly; see [Apps API](/docs/developers/api/apps-api).

## Project layout

```
app/                        # pages (Next.js App Router)
app/api/functions/<name>/   # backend functions
components/  lib/           # your code
lib/draftship.ts            # browser SDK (managed)
lib/draftship-server.ts     # server SDK for functions (managed)
draftship/entities/*.json   # table schemas and security rules
draftship/automations/*.json
draftship/agents/*.json
```

Files marked *managed* are replaced on every build; don't edit them.
