This is a sample consumer app built by Descope to showcase the Descope Flows functionality with NextJS. It also includes useful hooks, utilities, and components to get started.
You can deploy this template to Vercel with the button below:
- Next.js: A React framework designed for building high-performance applications with an exceptional developer experience.
- Descope: Use no-code workflows to easily add authentication, authorization, and identity management to any customer-facing app.
- Vercel: Provides a seamless way to preview and deploy changes directly from git repositories.
- Tailwind CSS: A utility-first CSS framework that accelerates the process of UI development.
- Radix: Offers foundational components like modals and popovers for enhancing user interfaces.
- Lucide: Offers a collection of simple and precise icons for web projects.
next/font
: Enables custom font optimization, eliminating the need for external network requests, thereby boosting performance.ImageResponse
: Allows for the dynamic generation of Open Graph images at the edge for improved sharing capabilities.
useIntersectionObserver
: A React hook to detect when an element becomes visible or hidden in the viewport.useLocalStorage
: Enables the persistent storage of data within the browser's local storage.useScroll
: A React hook to monitor scroll events and positions within an application.nFormatter
: Simplifies the display of numbers by adding suffixes (e.g.,1.2k
for 1200).capitalize
: A utility function to capitalize the first letter of a string for improved readability.truncate
: Allows for the shortening of strings to a specific length, useful for creating concise text previews.use-debounce
: Debounces function calls or state updates, helping to optimize performance and reduce unnecessary processing.
- TypeScript: A static type-checking tool offering end-to-end type safety for robust development.
- Prettier: An opinionated code formatter that standardizes code style across projects.
- ESLint: A configurable linter tool tailored for Next.js and TypeScript projects, ensuring code quality and consistency.
In order to launch this app:
git clone git@github.com:descope-sample-apps/nextjs-demo-app-router.git
NEXT_PUBLIC_DESCOPE_PROJECT_ID="YOUR PROJECT ID" // Required for Descope authentication
You can get your project-id here.
npm i
Run this command to start the app:
npm run dev
Open http://localhost:3000 with your browser to see the result.