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

# TeamCopilot quickstart

> Get oriented with TeamCopilot — scopes, extensions, sign-in model, and where the API reference is.

# TeamCopilot quickstart

## What is TeamCopilot?

TeamCopilot is a Shopify POS team operations app for scheduling, time-clock integrity, checklists, exception handling, and commission summaries. It runs as an embedded Shopify admin app on Cloudflare Workers with a PostgreSQL database.

## Shopify app scopes

Defined in `shopify.app.toml`:

* `read_orders` — Commission attribution from paid orders
* `read_locations` — Location sync from Shopify Admin

The app requests an expiring offline credential at installation and verifies granted scopes match the configured set.

## POS extension

One POS UI extension is included:

* **pos-time-clock** — Targets `pos.home.tile.render` (Tile.tsx: **Team Clock** heading) and `pos.home.modal.render` (Modal.tsx: clock-in/clock-out form with member ID and PIN fields). Uses Preact and `@shopify/ui-extensions` API 2026-04.

## Sign-in model

1. Shopify OAuth install flow at `/auth/*`.
2. App Bridge ID-token verification for every embedded page view.
3. Session token exchange for API authorization.
4. Role-based access via `shop_staff_access` PostgreSQL table: member, manager, admin.
5. The first unassigned Shopify account owner becomes an app administrator automatically.

## Public integration points

* **REST API** (embedded admin routes under `/api/*`) — see the [API overview](https://docs.pcnaid.com/nodes/shopify/teamcopilot/developer/api/index.md)
* **Webhooks** — `POST /webhooks/shopify` accepts app lifecycle, billing, order attribution, and GDPR compliance topics
* **Health endpoint** — `GET /health` returns release SHA and origin
* **POS time-clock extension** — calls `POST /api/time-clock/clock-in` and `POST /api/time-clock/clock-out`

## Next steps

* Read the [architecture overview](https://docs.pcnaid.com/nodes/shopify/teamcopilot/developer/architecture-overview.md) for runtime and data flow details.
* Browse the [API overview](https://docs.pcnaid.com/nodes/shopify/teamcopilot/developer/api/index.md) for route definitions.
* Review the [merchant guides](https://docs.pcnaid.com/nodes/shopify/teamcopilot/merchant/guides/index.md) to understand the user-facing workflows.

[Pcnaid Documentation](https://docs.pcnaid.com/namespace/index.md) › [Shopify Ecosystem](https://docs.pcnaid.com/hubs/shopify-ecosystem/index.md) › [TeamCopilot](https://docs.pcnaid.com/nodes/shopify/teamcopilot/index.md) › [Developer](https://docs.pcnaid.com/nodes/shopify/teamcopilot/developer/index)


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