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

# Developer Documentation

> Technical entry points for the embedded Shopify app, extensions, authenticated APIs, webhooks, and deployment.

# Developer Documentation

Age Verification is a React Router 7 application built with Shopify's React Router package (`@shopify/shopify-app-react-router`), Prisma, PostgreSQL, and React. It ships three Shopify extension packages: a theme app extension, a checkout UI extension, and a POS UI extension.

## Integration surfaces

* **Embedded admin** — Shopify-managed install and admin authentication, with App Bridge and Polaris web components loaded from Shopify's CDN.
* **Storefront** — a theme app embed and cart app block calling a Shopify-signed app proxy at `/apps/age-verification`.
* **Checkout** — a Shopify Plus checkout UI block driven by app-owned shop and customer metafields.
* **Shopify POS** — a smart-grid tile, modal, and post-purchase block calling a POS-session-token-authenticated backend route.
* **Provider callbacks** — signed Stripe Identity and Didit webhook routes.
* **Shopify webhooks** — subscriptions, uninstall, customer creation, and the three privacy-compliance topics handled at `/webhooks`.
* **Outbound verification events** — an optional Pro feature that posts signed JSON to a merchant-configured public HTTPS endpoint.

## Installation lifecycle

The Shopify server is configured with `AppDistribution.AppStore`, and the app uses the new embedded authentication strategy. That configuration does not by itself establish that a public App Store listing is live. After authentication, the app refreshes legacy offline tokens when needed, ensures the shop and Free subscription records exist, creates Shopify data definitions, and registers webhooks.

The requested Admin API scopes are:

`read_customers`, `write_customers`, `read_products`, `write_products`, `read_metaobjects`, `write_metaobjects`, `read_metaobject_definitions`, `write_metaobject_definitions`, and `read_markets`.

## Repository commands

| Command | Implemented script |
| - | - |
| `npm run dev` | Start `shopify app dev` |
| `npm run build` | Build the React Router 7 application with Vite (`react-router build`) |
| `npm run setup` | Generate Prisma, deploy migrations, and run the audit-chain backfill |
| `npm run typecheck` | Type-check the app and POS extension |
| `npm run test` | Run the Vitest suite |
| `npm run preflight:production` | Verify committed production linkage and API-version settings |
| `npm run cleanup:privacy` | Run retention, redaction, and expired-rate-counter cleanup |

The package requires Node.js 18.20.0 or newer and uses npm workspaces for the checkout and POS extensions.

> **[Quickstart](https://docs.pcnaid.com/nodes/shopify/age-verification/developer/quickstart.md)**
>
> Get oriented with the app, its scopes, extensions, and public integration points.

> **[Architecture overview](https://docs.pcnaid.com/nodes/shopify/age-verification/developer/architecture-overview.md)**
>
> Follow requests across Shopify, the React Router server, PostgreSQL, and identity providers.

> **[Merchant REST API](https://docs.pcnaid.com/nodes/shopify/age-verification/developer/api/index.md)**
>
> Review only the routes and payload fields implemented in the source repository.


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