# Architecture and data flow

How AppPortal connects installed apps, browsers, automation, and public content while keeping credentials, processing, and data ownership separate.

Source: https://appportal.io/docs/concepts/architecture

AppPortal connects capture in your app with investigation and delivery workflows. Start with the
caller: an installed app, a signed-in browser, a build pipeline, and a customer backend each use a
different credential boundary. Choose the [SDK for your framework](https://appportal.io/docs/sdks/compatibility), then
use this map to connect the other parts of your system.

## Choose the caller and credential

| Caller | Connection | Authority |
| --- | --- | --- |
| Installed application | Client API through its SDK | Environment-specific app credential and any user binding required by the capability |
| Customer Portal browser | Dashboard browser API | Signed-in session; server-held tokens and current account/app permissions |
| Recipient browser | Downloads browser and delivery APIs | Current recipient access or the specific authorized sharing capability |
| Customer backend | Automation API | Confidential server credential with the selected app/environment permissions |
| CI build job | Upload API | Upload credential for build registration, symbols, and artifacts |
| MCP client | Local CLI over stdio, then protected HTTP | CLI-managed OAuth profile with the user's selected scope |
| Public visitor | Smart Links, Pages, or Status | The corresponding public resolver, published content, or public status contract |
| Operations staff | Operations console | Separate staff identity and current operator authority |

An account owns apps; each app has environments and release targets. Selecting an account, app,
environment, or target narrows a request. It does not grant membership, change a user's role, or
turn an app credential into an administrative credential. See [account boundaries](https://appportal.io/docs/concepts/accounts-apps-environments),
[credentials](https://appportal.io/docs/concepts/keys), and [roles and teams](https://appportal.io/docs/concepts/roles-and-teams).

Keep server and upload credentials in your backend or CI secret store. Browser code uses the
browser session boundary. It never needs a server key, upload key, database password, or storage
account credential. MCP clients launch a local process; they do not need a remote MCP URL or a token
pasted into their configuration. Follow [Connect MCP clients](https://appportal.io/docs/api/mcp-clients) for that flow.

## Follow a record from capture to a query

1. Your SDK captures a record into its local queue. Restart recovery depends on the runtime and
   selected host; check [reliable background delivery](https://appportal.io/docs/concepts/reliable-delivery).
2. Background delivery submits records to the Client API. A local capture result and a server
   acceptance receipt describe different steps.
3. Processing prepares accepted records for their destination and query model.
4. The Portal or a permitted API query observes the processed data in the selected scope.

A capture call is not confirmation that a dashboard query already contains the record. Verify a
known event or crash using the [first-value guide](https://appportal.io/docs/getting-started/verify-first-value), then
follow the session in the [Customer Portal](https://appportal.io/docs/guides/customer-portal). Preserve the distinction
between an empty result, an unavailable dependency, denied access, and unknown coverage. Saved
configuration alone does not prove current runtime admission or enforcement.

## Keep upload, publication, and delivery distinct

An upload registers build identity and stores symbols or an app artifact. Check the resulting
artifact and processing state before requesting publication through the separately authorized
release workflow. An upload credential cannot publish a release. A download transfer records bytes
served; it does not establish that a recipient installed or launched the app. Follow
[Upload and publish a test build](https://appportal.io/docs/guides/distribution) for the complete workflow.

Messaging follows its own consent and channel boundaries. A send accepted for processing, provider
acceptance, and a delivery or interaction receipt are separate observations. Use the actual returned
state and coverage described in [messaging](https://appportal.io/docs/sdks/messaging).

## Understand data ownership and operations

AppPortal's account, identity, configuration, and commercial records provide the control plane for
these workflows. Telemetry/query data and binary files have separate destination choices. Enterprise
onboarding can connect supported customer-owned data services; review [supported services and data
ownership](https://appportal.io/docs/enterprise/overview) for the exact split. A storage selection does not expose its
credentials to an installed app or remove AppPortal's authentication and processing responsibilities.

Operations staff use the [Operations console guide](https://appportal.io/docs/enterprise/operator-guide). Deployment
owners use [Enterprise self-hosting and operations](https://appportal.io/docs/enterprise/self-hosting) to plan identity,
networking, secret management, migrations, monitoring, and recovery. [DevSpace](https://appportal.io/docs/getting-started/devspaces)
is the separate local development path.

## Select the matching API contract

The [API reference](https://appportal.io/docs/api/reference) groups operations by caller and credential boundary and
provides the same contract as a downloadable JSON document. Use its documented origin for your
deployment and check the represented source information. An API version or document checksum
identifies a contract; it does not by itself identify the release deployed at a host. Check the
installed CLI/SDK and deployment versions before applying examples from newer source documentation.
