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 fromshopify.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_policymetaobject and definepcnaid.terms_policyproduct/collection metafield references. - Product scopes manage metafield definitions.
read_themeslets the server authoritatively detect whether the theme app embed is enabled.read_ordersauthorizes the authenticatedorders/createwebhook that links cart consent to Shopify orders. Noread_customersscope 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 thebodyof page templates)
/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 selection happens inside the app via
billing.request() / billing.cancel().