Skip to content

PropelAuth/demo-b2b-coupon-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorial: Protecting a Multi-tenant Next.js client/server app with PropelAuth

This is the reference app for the "Protecting a Multi-tenant Next.js client/server app with PropelAuth" tutorial. Follow along to create a complete Next.js app that creates digital coupons on demand using OpenAI's API and PropelAuth to ensure only authorized users can create coupons.

What You'll Build

You'll create a multi-tenant (or B2B) Next.js app that creates digital coupons on demand using OpenAI's API. OpenAI will create a coupon image using a discount percentage entered by the user along with their assigned grocery store name. We'll use PropelAuth, a B2B/multi-tenant authentication provider, to ensure only authorized users can create coupons. Out-of-the-box, it provides account sign up, login, logout functionality and we’ll use their roles and permissions system to verify the user is in the correct role before allowing them to create a coupon.

Components

How to Run

  1. Clone this repository.
  2. In a terminal, change directory into the repo: cd demo-b2b-coupon-generator.
  3. Install all packages: npm install.
  4. Follow the quickstart guide to sign up for PropelAuth for free, configure a project, then configure the .env file with your environment variables.
  5. Build then run on localhost: npm run build && npm run start.

About

Demo app for "Protecting a Multi-tenant Next.js client/server app with PropelAuth" tutorial

Topics

Resources

Stars

Watchers

Forks

Contributors