Next.js - Weather Search App
Next.js - Weather Search App
Next.js - Weather Search App
This is an example app demonstrating how to use Schematic in a Next.js app with Clerk authentication. This app uses schematic-react for usage tracking and entitlement management via feature flags, and uses schematic-components for an embedded Customer Portal experience. The Github repo is here and can be cloned to run locally.
In order to use this example app, you’ll need:
In order to make full use of the capabilities of Schematic components, you’ll also need:
Set up your Schematic account; add features for “Weather Search”, “Humidity”, and “Wind Speed”, create some plans and entitlements for these features, connect your Stripe account, and connect your Clerk account.
Set up your .env file:
.env file:.env file:<SchematicProvider> provider:identify function from the useSchematicEvents hook; this is called in the ClientWrapper component, which wraps all client-side code.track function from the useSchematicEvents hook:useSchematicFlag hook in various locations:SchematicEmbed component: