> ## 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.

# ConsentAI quickstart

> Orientation for integrators and contributors — what the app is, Admin API scopes, extensions, and where to find the API reference.

# ConsentAI quickstart

## What is ConsentAI?

ConsentAI is a Shopify app that adds a required Terms & Conditions consent checkbox to storefront checkout surfaces and records tamper-evident evidence of each agreement. The app is built with React Router 7 (framework mode), Node.js, Prisma, and PostgreSQL.

Storefront traffic reaches the app only through Shopify's signed App Proxy. ConsentAI does not expose public settings or consent endpoints. It uses the app-managed Shopify Billing API — there is no hosted-pricing redirect and no Managed Pricing.

The app name "ConsentAI" is a brand name. There is no model, prompt, or AI-powered policy workflow.

## Admin API scopes

ConsentAI requests **eight scopes** from `shopify.app.toml`:

`read_metaobjects, write_metaobjects, read_metaobject_definitions, write_metaobject_definitions, read_products, write_products, read_themes, read_orders`

* Metaobject scopes version policy content into a `pcnaid_terms_policy` metaobject and define `pcnaid.terms_policy` product/collection metafield references.
* Product scopes manage metafield definitions.
* `read_themes` lets the server authoritatively detect whether the theme app embed is enabled.
* `read_orders` authorizes the authenticated `orders/create` webhook that links cart consent to Shopify orders. No `read_customers` scope is requested. The Partner Dashboard must have a Protected Customer Data declaration covering this order data.

## Theme App Extension

ConsentAI ships one Theme App Extension:

* **Name:** Pcnaid T\&C Checkbox
* **Type:** theme
* **Handle:** `tnc-checkbox`
* **Block:** `tnc_embed` (targets the `body` of page templates)

The extension reads settings from the signed App Proxy at `/apps/pcnaid-tnc/settings` and posts consent events to `/apps/pcnaid-tnc/consent`. It optionally reads product/collection metafields of type `pcnaid.terms_policy` for per-product overrides.

Two block settings are available: **Enable storefront checkbox** (boolean, default on) and **Debug mode** (boolean, default off).

## Plans and billing

| Plan | Trial | Key additions |
| - | - | - |
| Free | — | Cart consent gate, 7-day admin history |
| Pro | 14 days | Product/dynamic/accelerated surfaces, 30-day history |
| Advanced | 14 days | Custom CSS, multi-language, unlimited history, CSV export |

Plan selection happens inside the app via `billing.request()` / `billing.cancel()`.

## Architecture

See the [architecture overview](https://docs.pcnaid.com/nodes/shopify/consentai/developer/architecture-overview.md) for runtime and data flow. See the [API reference](https://docs.pcnaid.com/nodes/shopify/consentai/developer/api/index.md) for documented endpoints.


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