# Shopifex v3.0.0 - Table of Contents > Phoenix boilerplate for Shopify Embedded App SDK ## Pages - [README](readme.md) - [Changelog](changelog.md) - [Shopifex Parity Matrix](parity-matrix.md) - [Upgrading from Shopifex 2.x to 3.0](upgrading.md) ## Modules - [Mix.Shopifex](Mix.Shopifex.md): Utilities module for mix tasks. - [Mix.Shopifex.Grant](Mix.Shopifex.Grant.md) - [Mix.Shopifex.Migration](Mix.Shopifex.Migration.md): Utilities module for ecto migrations in mix tasks. - [Mix.Shopifex.Plan](Mix.Shopifex.Plan.md) - [Mix.Shopifex.Shop](Mix.Shopifex.Shop.md) - [Shopifex](Shopifex.md): Boilerplate for building Shopify **embedded** apps with Phoenix. - [Shopifex.API](Shopifex.API.md): Shopify GraphQL Admin API transport. - [Shopifex.Auth](Shopifex.Auth.md): Shopify access-token lifecycle for background / non-embedded paths. - [Shopifex.ChargeBinding](Shopifex.ChargeBinding.md): Signs and verifies charge bindings for payment flows. - [Shopifex.ManagedInstall.Callbacks](Shopifex.ManagedInstall.Callbacks.md): Extensibility hooks for the managed-installation flow (`Shopifex.Plug.ManagedInstall`). - [Shopifex.ManagedInstall.Callbacks.Default](Shopifex.ManagedInstall.Callbacks.Default.md): Default managed-install callbacks: persist a new shop via `Shopifex.Shops.create_shop/1` and run no extra side effects on install. - [Shopifex.PaymentGuard](Shopifex.PaymentGuard.md): Context behaviour responsible for fetching and using payment grants. - [Shopifex.Plug](Shopifex.Plug.md): An API for accessing the Shopify session data for the current request. - [Shopifex.Plug.EnsureScopes](Shopifex.Plug.EnsureScopes.md): Ensures that the shop currently loaded in the session has all of the scopes defined under `config :shopifex, scopes: "foo"` (or the `:required_scopes` plug option). - [Shopifex.Plug.FetchFlash](Shopifex.Plug.FetchFlash.md): Fetches the flash into `conn.assigns.flash`. - [Shopifex.Plug.LoadInIframe](Shopifex.Plug.LoadInIframe.md): Allows the response to render inside the Shopify admin iframe. - [Shopifex.Plug.LoadProxyShop](Shopifex.Plug.LoadProxyShop.md): Resolves the shop from a verified Shopify app-proxy request and makes it available via `Shopifex.Plug.current_shop/1`. - [Shopifex.Plug.ManagedInstall](Shopifex.Plug.ManagedInstall.md): Handles Shopify's managed app installation flow via token exchange, and keeps the embedded session's offline access token fresh. - [Shopifex.Plug.PaymentGuard](Shopifex.Plug.PaymentGuard.md): Add payment guards to your routes or controllers! - [Shopifex.Plug.ShopifyApiAuth](Shopifex.Plug.ShopifyApiAuth.md): Authenticates async API requests from an embedded SPA front end using the Shopify App Bridge session token. - [Shopifex.Plug.ShopifySession](Shopifex.Plug.ShopifySession.md) - [Shopifex.Plug.ShopifyWebhook](Shopifex.Plug.ShopifyWebhook.md): Authenticates a Shopify request and builds the Shopifex session. - [Shopifex.Plug.ValidateHmac](Shopifex.Plug.ValidateHmac.md): Ensures the current request carries a valid Shopify query / app-proxy HMAC signature and, when present, a fresh `timestamp`. - [Shopifex.RedirectAfter.Ecto](Shopifex.RedirectAfter.Ecto.md): Persistent, multi-node-safe implementation of the `Shopifex.RedirectAfterAgent` behaviour, backed by a database table instead of an in-memory `Agent`. - [Shopifex.RedirectAfterAgent](Shopifex.RedirectAfterAgent.md): Caches the post-payment charge binding keyed by Shopify charge id, so `complete_payment/2` can recover and verify it when Shopify redirects the merchant back. - [Shopifex.Scopes](Shopifex.Scopes.md): Normalises Shopify access-scope lists so every scope check in the library agrees on the same input. - [Shopifex.SessionToken](Shopifex.SessionToken.md): Verifies Shopify App Bridge session tokens (`id_token`) directly. - [Shopifex.Shop](Shopifex.Shop.md): A specification for how Shopifex is to interact with your Shopify shops table. - [Shopifex.ShopDomain](Shopifex.ShopDomain.md): Validates the `shop` query param Shopify sends on every install/auth request against Shopify's own `*.myshopify.com` pattern. - [Shopifex.Shops](Shopifex.Shops.md): The Shops context. This module calls the default Shopifex.ShopsContextClient, which in turn calls the functions defined in the ShopsContext behaviour. You can swap out the default client for your own implementation by setting the :shops_context_client config value for the :shopifex app to a module that uses Shopifex.ShopsContext and overrides various functions. - [Shopifex.ShopsContext](Shopifex.ShopsContext.md) - [Shopifex.ShopsContextClient](Shopifex.ShopsContextClient.md) - [Shopifex.Test](Shopifex.Test.md): Test helpers for apps built on Shopifex. - [Shopifex.TokenRefreshLease](Shopifex.TokenRefreshLease.md): Cross-node lease used to serialize refreshes of Shopify's one-time-use offline refresh tokens. - [Shopifex.TokenResponse](Shopifex.TokenResponse.md): Builds the shop attrs map persisted from a decoded Shopify OAuth access-token response. - [ShopifexWeb](ShopifexWeb.md): The entrypoint for the Shopifex web interface — controllers and function-component HTML modules. - [ShopifexWeb.AuthController](ShopifexWeb.AuthController.md): You can use this module inside of another controller to handle initial iFrame load and shop installation - [ShopifexWeb.AuthHTML](ShopifexWeb.AuthHTML.md): HTML rendered by `ShopifexWeb.AuthController` and the session plug — currently the store-selector / install page. - [ShopifexWeb.AuthJSON](ShopifexWeb.AuthJSON.md): JSON responses for the session plug (e.g. the `403` returned to unauthenticated API requests). - [ShopifexWeb.CacheBodyReader](ShopifexWeb.CacheBodyReader.md): Include `body_reader: {ShopifexWeb.CacheBodyReader, :read_body, []}` in your `endpoint.ex` file in Plug.Parser options - [ShopifexWeb.ErrorHTML](ShopifexWeb.ErrorHTML.md): Renders error pages. By default returns the status message derived from the template name (e.g. `"404.html"` -> "Not Found"). - [ShopifexWeb.ErrorJSON](ShopifexWeb.ErrorJSON.md): Renders JSON errors. By default returns `%{errors: %{detail: }}`. - [ShopifexWeb.Gettext](ShopifexWeb.Gettext.md): A module providing Internationalization with a gettext-based API. - [ShopifexWeb.Layouts](ShopifexWeb.Layouts.md): Shopifex's built-in layouts, rendered as function components. - [ShopifexWeb.LiveSession](ShopifexWeb.LiveSession.md): Helpers and hooks for integrating LiveView with Shopifex. - [ShopifexWeb.PageHTML](ShopifexWeb.PageHTML.md): HTML rendered for app-bridge redirects (e.g. the scope-reinstall bounce in `Shopifex.Plug.EnsureScopes`). - [ShopifexWeb.PaymentController](ShopifexWeb.PaymentController.md): Controller behaviour for Shopify billing, plan selection, and charge verification. - [ShopifexWeb.PaymentHTML](ShopifexWeb.PaymentHTML.md): HTML for the plans/billing page rendered by `ShopifexWeb.PaymentController`. - [ShopifexWeb.Routes](ShopifexWeb.Routes.md): Provides macros for easily responding to Shopify requests within your Shopifex router. - [ShopifexWeb.WebhookController](ShopifexWeb.WebhookController.md): Dispatches verified Shopify webhooks to a handle_topic/3 clause you define in your own controller. - Exceptions - [Shopifex.InstallError](Shopifex.InstallError.md) - [Shopifex.Plug.SetCSPHeader](Shopifex.Plug.SetCSPHeader.md): Adds Content-Security-Policy response header to the provided `Plug.Conn` in order to securely load embedded application in the Shopify admin panel. - [Shopifex.RuntimeError](Shopifex.RuntimeError.md) - [Shopifex.UpdateError](Shopifex.UpdateError.md) - [ShopifexError](ShopifexError.md) ## Mix Tasks - [mix shopifex.gen.controllers](Mix.Tasks.Shopifex.Gen.Controllers.md): Generates schema files. mix shopifex.gen.controller mix shopifex.gen.controller --namespace shopify_app ## Arguments * `--namespace` - namespace to prepend table, schema and controller module name * `--context-app` - context app to use for path and module names - [mix shopifex.gen.migration](Mix.Tasks.Shopifex.Gen.Migration.md): Generates migration file. mix shopifex.gen.migrations -r MyApp.Repo mix shopifex.gen.migrations -r MyApp.Repo --namespace shopify_app This generator will add the shopifex migration file in `priv/repo/migrations`. The repository must be set under `:ecto_repos` in the current app configuration or given via the `-r` option. By default, the migration will be generated to the "priv/YOUR_REPO/migrations" directory of the current application but it can be configured to be any subdirectory of `priv` by specifying the `:priv` key under the repository configuration. ## Arguments * `-r`, `--repo` - the repo module * `--binary-id` - use binary id for primary keys * `--namespace` - namespace to prepend table, schema and controller module name - [mix shopifex.gen.schemas](Mix.Tasks.Shopifex.Gen.Schemas.md): Generates schema files. mix shopifex.gen.schemas mix shopifex.gen.schemas --binary-id --namespace shopify_app ## Arguments * `--binary-id` - use binary id for primary keys * `--namespace` - namespace to prepend table, schema and controller module name * `--context-app` - context app to use for path and module names - [mix shopifex.install](Mix.Tasks.Shopifex.Install.md): Generates migrations, schema module files, and prints the config to add. mix shopifex.install ## Arguments * `--context-app` - context app to use for path and module names * `--no-migration` - don't create migration file * `--no-schemas` - don't create schema module files