# Applications overview (https://prood.com/docs/apps/overview)

Prood ships seven deployable Next.js applications, each with a distinct role in the commerce platform.

## Application map [#application-map]

| App | Port | Deploy target | Database | Primary packages |
| --- | --- | --- | --- | --- |
| **storefront** | 3000 | Vercel (per-tenant domains) | Auth + tenant lookup | `@prood/api-client`, `@prood/ui`, `@prood/types` |
| **dashboard** | 3002 | Vercel (`prood.com/dashboard`) | Auth + integrations + domains | `@prood/api-client`, `@prood/commerce`, `@prood/ui` |
| **checkout** | 3004 | Vercel (`prood.com/pay`) | None (Redis only) | `@prood/checkout-host`, `@prood/ui` |
| **api** | 3005 | Vercel (`prood.com/v1`, `/mcp`, `/api/auth`) | Full commerce + auth | `@prood/commerce`, `@prood/types` |
| **admin** | 3006 | Vercel (`prood.com/admin`) | Auth/session/admin tables | `@prood/auth`, `@prood/ui` |
| **web** | 3001 | Vercel (`prood.com`, the gateway) | None | `@prood/ui` |
| **docs** | 3003 | Vercel (`prood.com/docs`) | None | Fumadocs |

prood.com is one domain: `apps/web` is the gateway and rewrites each path to the app's own Vercel project. See [Deployment](/docs/guides/deployment).

## Interaction diagram [#interaction-diagram]

```mermaid
flowchart TB
  WEB[apps/web<br/>Marketing site]

  SF[storefront :3000]
  DB[dashboard :3002]
  API[apps/api :3005]
  CHK[checkout :3004]
  ADM[admin :3006]
  NEON[(Neon Postgres)]
  REDIS[(Upstash Redis)]

  WEB -.->|CTAs| SF

  SF -->|BFF + HTTP| API
  DB -->|admin-api| API
  SF -->|CHECKOUT_URL| CHK
  CHK -->|webhooks| API
  API --> NEON
  ADM --> NEON
  CHK --> REDIS
```

## Auth split [#auth-split]

Auth issuance is centralized on **apps/api** for the dashboard; the storefront keeps a local handler on each store origin. All apps share the same Neon database:

| App | Users | Auth HTTP handler | Auth plugins |
| --- | --- | --- | --- |
| **Storefront** | Customers (buyers) | Local `/api/auth` on storefront origin | Email/password |
| **Dashboard** | Merchants | **Remote** — browser calls `apps/api` (`NEXT_PUBLIC_AUTH_URL`) | Email/password + **organization** |
| **API** | All caller types | `/api/auth` on API origin | organization + **apiKey** + **agentAuth** |
| **Admin** | Platform operators | API-issued session, validated against shared DB | Better Auth admin/API key operations |

Customer accounts on the storefront are separate from merchant accounts on the dashboard. A person can be both, but they authenticate to different apps.

## Data access patterns [#data-access-patterns]

| App | Commerce data | How |
| --- | --- | --- |
| Storefront | Catalog, cart, orders | `@prood/api-client` → API (server components + BFF) |
| Dashboard | Products, orders, customers, stats | `@prood/api-client` → API `/v1/admin/*` |
| Dashboard | Integrations, domains | Direct `@prood/commerce` + Drizzle (not via API) |
| Checkout | Order status | Webhook forward → API |
| Admin | Users, orgs, sessions, API keys, agents | Direct shared auth/admin tables |
| API | Everything | `@prood/commerce` → `@prood/platform` |

## Deployment model [#deployment-model]

In production, each app is a **separate Vercel project** sharing the same Neon database:

| Project | Custom domains | Notes |
| --- | --- | --- |
| Storefront | Per-merchant domains + subdomains | Tenant resolved from Host |
| Dashboard | Single admin URL (e.g. `prood.com/dashboard`) | Org switching in session |
| Checkout | Single checkout URL (e.g. `prood.com/pay`) | Shared across all tenants |
| API | Single API URL (e.g. `prood.com/v1`) | All callers hit one origin |
| Admin | Restricted admin URL (e.g. `prood.com/admin`) | Platform operations only |
| Docs | `prood.com/docs` | Static + OpenAPI |

See [Deployment guide](/docs/guides/deployment) for the full checklist.

## Application guides [#application-guides]

<Cards>
  <Card title="Storefront" href="/docs/apps/storefront" description="Customer-facing catalog, cart, checkout redirect, and account." />
  <Card title="Dashboard" href="/docs/apps/dashboard" description="Merchant admin — products, orders, integrations, domains." />
  <Card title="Checkout" href="/docs/apps/checkout" description="Hosted payment app with Redis sessions." />
  <Card title="Commerce API" href="/docs/apps/api" description="REST API, MCP, Agent Auth, and webhooks." />
</Cards>
